mattermost/server/einterfaces/mocks/CloudInterface.go

597 lines
15 KiB
Go
Raw Permalink Normal View History

Upgrade Go to 1.24.3 (#31220) * Upgrade Go to 1.24.3 Updates the following files: - server/.go-version: 1.23.9 → 1.24.3 - server/build/Dockerfile.buildenv: golang:1.23.9-bullseye → golang:1.24.3-bullseye - server/go.mod: go 1.23.0 → go 1.24.3, toolchain go1.23.9 → go1.24.3 - server/public/go.mod: go 1.23.0 → go 1.24.3, toolchain go1.23.9 → go1.24.3 Also fixes non-constant format string errors introduced by Go 1.24.3's stricter format string checking: - Added response() helper function in slashcommands/util.go for simple string responses - Removed unused responsef() function from slashcommands/util.go - Replaced responsef() with response() for translated strings that don't need formatting - Fixed fmt.Errorf and fmt.Fprintf calls to use proper format verbs instead of string concatenation - Updated marketplace buildURL to handle format strings conditionally 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Update generated mocks for Go 1.24.3 Regenerated mocks using mockery v2.53.4 to ensure compatibility with Go 1.24.3. This addresses mock generation failures that occurred with the Go upgrade. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Update to bookworm and fix non-existent sha Signed-off-by: Stavros Foteinopoulos <stafot@gmail.com> * fix non-constant format string --------- Signed-off-by: Stavros Foteinopoulos <stafot@gmail.com> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Stavros Foteinopoulos <stafot@gmail.com>
2025-06-10 14:04:57 -04:00
// Code generated by mockery v2.53.4. DO NOT EDIT.
// Regenerate this file using `make einterfaces-mocks`.
package mocks
import (
multipart "mime/multipart"
model "github.com/mattermost/mattermost/server/public/model"
mock "github.com/stretchr/testify/mock"
)
// CloudInterface is an autogenerated mock type for the CloudInterface type
type CloudInterface struct {
mock.Mock
}
[CLD-6324] Cloud IP Filtering (#24726) * Initial comit for ip filtering service implementation * Add audit logs for IP Filters * start of webapp work * Stashing * Updates based on Agniva's feedback around service vs einterface * Updates completed * Commit before refactoring, everything's working * First pass of cleanup complete, front-end tests added * actually add files * Updates to some translation strings, running i18n-extract * Lock everything behind a feature flag * Fix tests, try to fix some linter stuff * Fixed linter for JS, on to scss * Fixed linter for scss * Fix linter * More fixes for pipeline * Support for IPV6 * Remove tsx file that was removed in masteR * Revert package.json and package-lock.json to master, add cidr-regex dep into channels/package.json * Another commit to force fix Github * Fixes around IPV6. Some suggestions from Matt re: UX review. Fixing pipelines for tests and types on new cidr-regex package * Changes to address Matt's feedback * A few more changes for clean up * Add support for permissions * Fix vet for OpenAPI spec * Actually add the yaml file for openapi * Add permission migration to allow support for IP Filtering * Fix tests * Final fixes from Matt * Remove cancel button from page, update link outs to documentation * Update test to account for removed cancel button * Adjustments based on feedback from Harrison * More fixes from PR feedback * Add a t to fix translations that doesn't seem to be breaking anyone else? * More fix * updates for PR feedback * Fix linter * Fix types * Now fix the linter again * Add back tests because Harrison was able to get them running * Adjustments for PR feedback * Remove admin_definition.jsx * Fix linter * [CLD-6453] IP Filtering notification email for sysadmins (#25224) * Initial commit for IP filtering alert email * Updates to style for email, addition of ip_filtering email: * Fix pipelines * Adjustments from Matt's feedback * Padding changes * template diff (#25249) Co-authored-by: Gabe Jackson <3694686+gabrieljackson@users.noreply.github.com> * Fix hardcoded true, remove bool return value --------- Co-authored-by: Mattermost Build <build@mattermost.com> Co-authored-by: Gabe Jackson <3694686+gabrieljackson@users.noreply.github.com> * Lock feature behind enterprise license. Drop cidr-regex in favour of ipaddr.js dependency. Refactor isIpAddressWithinRanges to use ipaddr.js * Add a couple server tests * fix linter * Fix types from merge conflicts --------- Co-authored-by: Mattermost Build <build@mattermost.com> Co-authored-by: Gabe Jackson <3694686+gabrieljackson@users.noreply.github.com>
2023-11-14 09:12:04 -05:00
// ApplyIPFilters provides a mock function with given fields: userID, ranges
func (_m *CloudInterface) ApplyIPFilters(userID string, ranges *model.AllowedIPRanges) (*model.AllowedIPRanges, error) {
ret := _m.Called(userID, ranges)
if len(ret) == 0 {
panic("no return value specified for ApplyIPFilters")
}
[CLD-6324] Cloud IP Filtering (#24726) * Initial comit for ip filtering service implementation * Add audit logs for IP Filters * start of webapp work * Stashing * Updates based on Agniva's feedback around service vs einterface * Updates completed * Commit before refactoring, everything's working * First pass of cleanup complete, front-end tests added * actually add files * Updates to some translation strings, running i18n-extract * Lock everything behind a feature flag * Fix tests, try to fix some linter stuff * Fixed linter for JS, on to scss * Fixed linter for scss * Fix linter * More fixes for pipeline * Support for IPV6 * Remove tsx file that was removed in masteR * Revert package.json and package-lock.json to master, add cidr-regex dep into channels/package.json * Another commit to force fix Github * Fixes around IPV6. Some suggestions from Matt re: UX review. Fixing pipelines for tests and types on new cidr-regex package * Changes to address Matt's feedback * A few more changes for clean up * Add support for permissions * Fix vet for OpenAPI spec * Actually add the yaml file for openapi * Add permission migration to allow support for IP Filtering * Fix tests * Final fixes from Matt * Remove cancel button from page, update link outs to documentation * Update test to account for removed cancel button * Adjustments based on feedback from Harrison * More fixes from PR feedback * Add a t to fix translations that doesn't seem to be breaking anyone else? * More fix * updates for PR feedback * Fix linter * Fix types * Now fix the linter again * Add back tests because Harrison was able to get them running * Adjustments for PR feedback * Remove admin_definition.jsx * Fix linter * [CLD-6453] IP Filtering notification email for sysadmins (#25224) * Initial commit for IP filtering alert email * Updates to style for email, addition of ip_filtering email: * Fix pipelines * Adjustments from Matt's feedback * Padding changes * template diff (#25249) Co-authored-by: Gabe Jackson <3694686+gabrieljackson@users.noreply.github.com> * Fix hardcoded true, remove bool return value --------- Co-authored-by: Mattermost Build <build@mattermost.com> Co-authored-by: Gabe Jackson <3694686+gabrieljackson@users.noreply.github.com> * Lock feature behind enterprise license. Drop cidr-regex in favour of ipaddr.js dependency. Refactor isIpAddressWithinRanges to use ipaddr.js * Add a couple server tests * fix linter * Fix types from merge conflicts --------- Co-authored-by: Mattermost Build <build@mattermost.com> Co-authored-by: Gabe Jackson <3694686+gabrieljackson@users.noreply.github.com>
2023-11-14 09:12:04 -05:00
var r0 *model.AllowedIPRanges
var r1 error
if rf, ok := ret.Get(0).(func(string, *model.AllowedIPRanges) (*model.AllowedIPRanges, error)); ok {
return rf(userID, ranges)
}
if rf, ok := ret.Get(0).(func(string, *model.AllowedIPRanges) *model.AllowedIPRanges); ok {
r0 = rf(userID, ranges)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.AllowedIPRanges)
}
}
if rf, ok := ret.Get(1).(func(string, *model.AllowedIPRanges) error); ok {
r1 = rf(userID, ranges)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// ChangeSubscription provides a mock function with given fields: userID, subscriptionID, subscriptionChange
func (_m *CloudInterface) ChangeSubscription(userID string, subscriptionID string, subscriptionChange *model.SubscriptionChange) (*model.Subscription, error) {
ret := _m.Called(userID, subscriptionID, subscriptionChange)
if len(ret) == 0 {
panic("no return value specified for ChangeSubscription")
}
var r0 *model.Subscription
var r1 error
if rf, ok := ret.Get(0).(func(string, string, *model.SubscriptionChange) (*model.Subscription, error)); ok {
return rf(userID, subscriptionID, subscriptionChange)
}
if rf, ok := ret.Get(0).(func(string, string, *model.SubscriptionChange) *model.Subscription); ok {
r0 = rf(userID, subscriptionID, subscriptionChange)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.Subscription)
}
}
if rf, ok := ret.Get(1).(func(string, string, *model.SubscriptionChange) error); ok {
r1 = rf(userID, subscriptionID, subscriptionChange)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
2022-12-29 15:07:06 -05:00
// CheckCWSConnection provides a mock function with given fields: userId
func (_m *CloudInterface) CheckCWSConnection(userId string) error {
ret := _m.Called(userId)
2022-12-29 14:58:05 -05:00
if len(ret) == 0 {
panic("no return value specified for CheckCWSConnection")
}
2022-12-29 14:58:05 -05:00
var r0 error
2022-12-29 15:07:06 -05:00
if rf, ok := ret.Get(0).(func(string) error); ok {
r0 = rf(userId)
2022-12-29 14:58:05 -05:00
} else {
r0 = ret.Error(0)
}
return r0
}
// CreateAuditLoggingCert provides a mock function with given fields: userID, fileData
func (_m *CloudInterface) CreateAuditLoggingCert(userID string, fileData *multipart.FileHeader) error {
ret := _m.Called(userID, fileData)
if len(ret) == 0 {
panic("no return value specified for CreateAuditLoggingCert")
}
var r0 error
if rf, ok := ret.Get(0).(func(string, *multipart.FileHeader) error); ok {
r0 = rf(userID, fileData)
} else {
r0 = ret.Error(0)
}
return r0
}
// CreateOrUpdateSubscriptionHistoryEvent provides a mock function with given fields: userID, userCount
func (_m *CloudInterface) CreateOrUpdateSubscriptionHistoryEvent(userID string, userCount int) (*model.SubscriptionHistory, error) {
ret := _m.Called(userID, userCount)
if len(ret) == 0 {
panic("no return value specified for CreateOrUpdateSubscriptionHistoryEvent")
}
var r0 *model.SubscriptionHistory
var r1 error
if rf, ok := ret.Get(0).(func(string, int) (*model.SubscriptionHistory, error)); ok {
return rf(userID, userCount)
}
if rf, ok := ret.Get(0).(func(string, int) *model.SubscriptionHistory); ok {
r0 = rf(userID, userCount)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.SubscriptionHistory)
}
}
if rf, ok := ret.Get(1).(func(string, int) error); ok {
r1 = rf(userID, userCount)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetCloudCustomer provides a mock function with given fields: userID
func (_m *CloudInterface) GetCloudCustomer(userID string) (*model.CloudCustomer, error) {
ret := _m.Called(userID)
if len(ret) == 0 {
panic("no return value specified for GetCloudCustomer")
}
var r0 *model.CloudCustomer
var r1 error
if rf, ok := ret.Get(0).(func(string) (*model.CloudCustomer, error)); ok {
return rf(userID)
}
if rf, ok := ret.Get(0).(func(string) *model.CloudCustomer); ok {
r0 = rf(userID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.CloudCustomer)
}
}
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(userID)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetCloudLimits provides a mock function with given fields: userID
func (_m *CloudInterface) GetCloudLimits(userID string) (*model.ProductLimits, error) {
ret := _m.Called(userID)
if len(ret) == 0 {
panic("no return value specified for GetCloudLimits")
}
var r0 *model.ProductLimits
var r1 error
if rf, ok := ret.Get(0).(func(string) (*model.ProductLimits, error)); ok {
return rf(userID)
}
if rf, ok := ret.Get(0).(func(string) *model.ProductLimits); ok {
r0 = rf(userID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.ProductLimits)
}
}
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(userID)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetCloudProduct provides a mock function with given fields: userID, productID
func (_m *CloudInterface) GetCloudProduct(userID string, productID string) (*model.Product, error) {
ret := _m.Called(userID, productID)
if len(ret) == 0 {
panic("no return value specified for GetCloudProduct")
}
var r0 *model.Product
var r1 error
if rf, ok := ret.Get(0).(func(string, string) (*model.Product, error)); ok {
return rf(userID, productID)
}
if rf, ok := ret.Get(0).(func(string, string) *model.Product); ok {
r0 = rf(userID, productID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.Product)
}
}
if rf, ok := ret.Get(1).(func(string, string) error); ok {
r1 = rf(userID, productID)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetCloudProducts provides a mock function with given fields: userID, includeLegacyProducts
func (_m *CloudInterface) GetCloudProducts(userID string, includeLegacyProducts bool) ([]*model.Product, error) {
ret := _m.Called(userID, includeLegacyProducts)
if len(ret) == 0 {
panic("no return value specified for GetCloudProducts")
}
var r0 []*model.Product
var r1 error
if rf, ok := ret.Get(0).(func(string, bool) ([]*model.Product, error)); ok {
return rf(userID, includeLegacyProducts)
}
if rf, ok := ret.Get(0).(func(string, bool) []*model.Product); ok {
r0 = rf(userID, includeLegacyProducts)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.Product)
}
}
if rf, ok := ret.Get(1).(func(string, bool) error); ok {
r1 = rf(userID, includeLegacyProducts)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
[CLD-6324] Cloud IP Filtering (#24726) * Initial comit for ip filtering service implementation * Add audit logs for IP Filters * start of webapp work * Stashing * Updates based on Agniva's feedback around service vs einterface * Updates completed * Commit before refactoring, everything's working * First pass of cleanup complete, front-end tests added * actually add files * Updates to some translation strings, running i18n-extract * Lock everything behind a feature flag * Fix tests, try to fix some linter stuff * Fixed linter for JS, on to scss * Fixed linter for scss * Fix linter * More fixes for pipeline * Support for IPV6 * Remove tsx file that was removed in masteR * Revert package.json and package-lock.json to master, add cidr-regex dep into channels/package.json * Another commit to force fix Github * Fixes around IPV6. Some suggestions from Matt re: UX review. Fixing pipelines for tests and types on new cidr-regex package * Changes to address Matt's feedback * A few more changes for clean up * Add support for permissions * Fix vet for OpenAPI spec * Actually add the yaml file for openapi * Add permission migration to allow support for IP Filtering * Fix tests * Final fixes from Matt * Remove cancel button from page, update link outs to documentation * Update test to account for removed cancel button * Adjustments based on feedback from Harrison * More fixes from PR feedback * Add a t to fix translations that doesn't seem to be breaking anyone else? * More fix * updates for PR feedback * Fix linter * Fix types * Now fix the linter again * Add back tests because Harrison was able to get them running * Adjustments for PR feedback * Remove admin_definition.jsx * Fix linter * [CLD-6453] IP Filtering notification email for sysadmins (#25224) * Initial commit for IP filtering alert email * Updates to style for email, addition of ip_filtering email: * Fix pipelines * Adjustments from Matt's feedback * Padding changes * template diff (#25249) Co-authored-by: Gabe Jackson <3694686+gabrieljackson@users.noreply.github.com> * Fix hardcoded true, remove bool return value --------- Co-authored-by: Mattermost Build <build@mattermost.com> Co-authored-by: Gabe Jackson <3694686+gabrieljackson@users.noreply.github.com> * Lock feature behind enterprise license. Drop cidr-regex in favour of ipaddr.js dependency. Refactor isIpAddressWithinRanges to use ipaddr.js * Add a couple server tests * fix linter * Fix types from merge conflicts --------- Co-authored-by: Mattermost Build <build@mattermost.com> Co-authored-by: Gabe Jackson <3694686+gabrieljackson@users.noreply.github.com>
2023-11-14 09:12:04 -05:00
// GetIPFilters provides a mock function with given fields: userID
func (_m *CloudInterface) GetIPFilters(userID string) (*model.AllowedIPRanges, error) {
ret := _m.Called(userID)
if len(ret) == 0 {
panic("no return value specified for GetIPFilters")
}
[CLD-6324] Cloud IP Filtering (#24726) * Initial comit for ip filtering service implementation * Add audit logs for IP Filters * start of webapp work * Stashing * Updates based on Agniva's feedback around service vs einterface * Updates completed * Commit before refactoring, everything's working * First pass of cleanup complete, front-end tests added * actually add files * Updates to some translation strings, running i18n-extract * Lock everything behind a feature flag * Fix tests, try to fix some linter stuff * Fixed linter for JS, on to scss * Fixed linter for scss * Fix linter * More fixes for pipeline * Support for IPV6 * Remove tsx file that was removed in masteR * Revert package.json and package-lock.json to master, add cidr-regex dep into channels/package.json * Another commit to force fix Github * Fixes around IPV6. Some suggestions from Matt re: UX review. Fixing pipelines for tests and types on new cidr-regex package * Changes to address Matt's feedback * A few more changes for clean up * Add support for permissions * Fix vet for OpenAPI spec * Actually add the yaml file for openapi * Add permission migration to allow support for IP Filtering * Fix tests * Final fixes from Matt * Remove cancel button from page, update link outs to documentation * Update test to account for removed cancel button * Adjustments based on feedback from Harrison * More fixes from PR feedback * Add a t to fix translations that doesn't seem to be breaking anyone else? * More fix * updates for PR feedback * Fix linter * Fix types * Now fix the linter again * Add back tests because Harrison was able to get them running * Adjustments for PR feedback * Remove admin_definition.jsx * Fix linter * [CLD-6453] IP Filtering notification email for sysadmins (#25224) * Initial commit for IP filtering alert email * Updates to style for email, addition of ip_filtering email: * Fix pipelines * Adjustments from Matt's feedback * Padding changes * template diff (#25249) Co-authored-by: Gabe Jackson <3694686+gabrieljackson@users.noreply.github.com> * Fix hardcoded true, remove bool return value --------- Co-authored-by: Mattermost Build <build@mattermost.com> Co-authored-by: Gabe Jackson <3694686+gabrieljackson@users.noreply.github.com> * Lock feature behind enterprise license. Drop cidr-regex in favour of ipaddr.js dependency. Refactor isIpAddressWithinRanges to use ipaddr.js * Add a couple server tests * fix linter * Fix types from merge conflicts --------- Co-authored-by: Mattermost Build <build@mattermost.com> Co-authored-by: Gabe Jackson <3694686+gabrieljackson@users.noreply.github.com>
2023-11-14 09:12:04 -05:00
var r0 *model.AllowedIPRanges
var r1 error
if rf, ok := ret.Get(0).(func(string) (*model.AllowedIPRanges, error)); ok {
return rf(userID)
}
if rf, ok := ret.Get(0).(func(string) *model.AllowedIPRanges); ok {
r0 = rf(userID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.AllowedIPRanges)
}
}
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(userID)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetInstallation provides a mock function with given fields: userID
func (_m *CloudInterface) GetInstallation(userID string) (*model.Installation, error) {
ret := _m.Called(userID)
if len(ret) == 0 {
panic("no return value specified for GetInstallation")
}
var r0 *model.Installation
var r1 error
if rf, ok := ret.Get(0).(func(string) (*model.Installation, error)); ok {
return rf(userID)
}
if rf, ok := ret.Get(0).(func(string) *model.Installation); ok {
r0 = rf(userID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.Installation)
}
}
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(userID)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetInvoicePDF provides a mock function with given fields: userID, invoiceID
func (_m *CloudInterface) GetInvoicePDF(userID string, invoiceID string) ([]byte, string, error) {
ret := _m.Called(userID, invoiceID)
if len(ret) == 0 {
panic("no return value specified for GetInvoicePDF")
}
var r0 []byte
var r1 string
var r2 error
if rf, ok := ret.Get(0).(func(string, string) ([]byte, string, error)); ok {
return rf(userID, invoiceID)
}
if rf, ok := ret.Get(0).(func(string, string) []byte); ok {
r0 = rf(userID, invoiceID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]byte)
}
}
if rf, ok := ret.Get(1).(func(string, string) string); ok {
r1 = rf(userID, invoiceID)
} else {
r1 = ret.Get(1).(string)
}
if rf, ok := ret.Get(2).(func(string, string) error); ok {
r2 = rf(userID, invoiceID)
} else {
r2 = ret.Error(2)
}
return r0, r1, r2
}
// GetInvoicesForSubscription provides a mock function with given fields: userID
func (_m *CloudInterface) GetInvoicesForSubscription(userID string) ([]*model.Invoice, error) {
ret := _m.Called(userID)
if len(ret) == 0 {
panic("no return value specified for GetInvoicesForSubscription")
}
var r0 []*model.Invoice
var r1 error
if rf, ok := ret.Get(0).(func(string) ([]*model.Invoice, error)); ok {
return rf(userID)
}
if rf, ok := ret.Get(0).(func(string) []*model.Invoice); ok {
r0 = rf(userID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.Invoice)
}
}
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(userID)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetSelfHostedProducts provides a mock function with given fields: userID
func (_m *CloudInterface) GetSelfHostedProducts(userID string) ([]*model.Product, error) {
ret := _m.Called(userID)
if len(ret) == 0 {
panic("no return value specified for GetSelfHostedProducts")
}
var r0 []*model.Product
var r1 error
if rf, ok := ret.Get(0).(func(string) ([]*model.Product, error)); ok {
return rf(userID)
}
if rf, ok := ret.Get(0).(func(string) []*model.Product); ok {
r0 = rf(userID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.Product)
}
}
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(userID)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetSubscription provides a mock function with given fields: userID
func (_m *CloudInterface) GetSubscription(userID string) (*model.Subscription, error) {
ret := _m.Called(userID)
if len(ret) == 0 {
panic("no return value specified for GetSubscription")
}
var r0 *model.Subscription
var r1 error
if rf, ok := ret.Get(0).(func(string) (*model.Subscription, error)); ok {
return rf(userID)
}
if rf, ok := ret.Get(0).(func(string) *model.Subscription); ok {
r0 = rf(userID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.Subscription)
}
}
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(userID)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
Upgrade Go to 1.24.3 (#31220) * Upgrade Go to 1.24.3 Updates the following files: - server/.go-version: 1.23.9 → 1.24.3 - server/build/Dockerfile.buildenv: golang:1.23.9-bullseye → golang:1.24.3-bullseye - server/go.mod: go 1.23.0 → go 1.24.3, toolchain go1.23.9 → go1.24.3 - server/public/go.mod: go 1.23.0 → go 1.24.3, toolchain go1.23.9 → go1.24.3 Also fixes non-constant format string errors introduced by Go 1.24.3's stricter format string checking: - Added response() helper function in slashcommands/util.go for simple string responses - Removed unused responsef() function from slashcommands/util.go - Replaced responsef() with response() for translated strings that don't need formatting - Fixed fmt.Errorf and fmt.Fprintf calls to use proper format verbs instead of string concatenation - Updated marketplace buildURL to handle format strings conditionally 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Update generated mocks for Go 1.24.3 Regenerated mocks using mockery v2.53.4 to ensure compatibility with Go 1.24.3. This addresses mock generation failures that occurred with the Go upgrade. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Update to bookworm and fix non-existent sha Signed-off-by: Stavros Foteinopoulos <stafot@gmail.com> * fix non-constant format string --------- Signed-off-by: Stavros Foteinopoulos <stafot@gmail.com> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Stavros Foteinopoulos <stafot@gmail.com>
2025-06-10 14:04:57 -04:00
// HandleLicenseChange provides a mock function with no fields
func (_m *CloudInterface) HandleLicenseChange() error {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for HandleLicenseChange")
}
var r0 error
if rf, ok := ret.Get(0).(func() error); ok {
r0 = rf()
} else {
r0 = ret.Error(0)
}
return r0
}
Upgrade Go to 1.24.3 (#31220) * Upgrade Go to 1.24.3 Updates the following files: - server/.go-version: 1.23.9 → 1.24.3 - server/build/Dockerfile.buildenv: golang:1.23.9-bullseye → golang:1.24.3-bullseye - server/go.mod: go 1.23.0 → go 1.24.3, toolchain go1.23.9 → go1.24.3 - server/public/go.mod: go 1.23.0 → go 1.24.3, toolchain go1.23.9 → go1.24.3 Also fixes non-constant format string errors introduced by Go 1.24.3's stricter format string checking: - Added response() helper function in slashcommands/util.go for simple string responses - Removed unused responsef() function from slashcommands/util.go - Replaced responsef() with response() for translated strings that don't need formatting - Fixed fmt.Errorf and fmt.Fprintf calls to use proper format verbs instead of string concatenation - Updated marketplace buildURL to handle format strings conditionally 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Update generated mocks for Go 1.24.3 Regenerated mocks using mockery v2.53.4 to ensure compatibility with Go 1.24.3. This addresses mock generation failures that occurred with the Go upgrade. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Update to bookworm and fix non-existent sha Signed-off-by: Stavros Foteinopoulos <stafot@gmail.com> * fix non-constant format string --------- Signed-off-by: Stavros Foteinopoulos <stafot@gmail.com> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Stavros Foteinopoulos <stafot@gmail.com>
2025-06-10 14:04:57 -04:00
// InvalidateCaches provides a mock function with no fields
func (_m *CloudInterface) InvalidateCaches() error {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for InvalidateCaches")
}
var r0 error
if rf, ok := ret.Get(0).(func() error); ok {
r0 = rf()
} else {
r0 = ret.Error(0)
}
return r0
}
// RemoveAuditLoggingCert provides a mock function with given fields: userID
func (_m *CloudInterface) RemoveAuditLoggingCert(userID string) error {
ret := _m.Called(userID)
if len(ret) == 0 {
panic("no return value specified for RemoveAuditLoggingCert")
}
var r0 error
if rf, ok := ret.Get(0).(func(string) error); ok {
r0 = rf(userID)
} else {
r0 = ret.Error(0)
}
return r0
}
// UpdateCloudCustomer provides a mock function with given fields: userID, customerInfo
func (_m *CloudInterface) UpdateCloudCustomer(userID string, customerInfo *model.CloudCustomerInfo) (*model.CloudCustomer, error) {
ret := _m.Called(userID, customerInfo)
if len(ret) == 0 {
panic("no return value specified for UpdateCloudCustomer")
}
var r0 *model.CloudCustomer
var r1 error
if rf, ok := ret.Get(0).(func(string, *model.CloudCustomerInfo) (*model.CloudCustomer, error)); ok {
return rf(userID, customerInfo)
}
if rf, ok := ret.Get(0).(func(string, *model.CloudCustomerInfo) *model.CloudCustomer); ok {
r0 = rf(userID, customerInfo)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.CloudCustomer)
}
}
if rf, ok := ret.Get(1).(func(string, *model.CloudCustomerInfo) error); ok {
r1 = rf(userID, customerInfo)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// UpdateCloudCustomerAddress provides a mock function with given fields: userID, address
func (_m *CloudInterface) UpdateCloudCustomerAddress(userID string, address *model.Address) (*model.CloudCustomer, error) {
ret := _m.Called(userID, address)
if len(ret) == 0 {
panic("no return value specified for UpdateCloudCustomerAddress")
}
var r0 *model.CloudCustomer
var r1 error
if rf, ok := ret.Get(0).(func(string, *model.Address) (*model.CloudCustomer, error)); ok {
return rf(userID, address)
}
if rf, ok := ret.Get(0).(func(string, *model.Address) *model.CloudCustomer); ok {
r0 = rf(userID, address)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.CloudCustomer)
}
}
if rf, ok := ret.Get(1).(func(string, *model.Address) error); ok {
r1 = rf(userID, address)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// ValidateBusinessEmail provides a mock function with given fields: userID, email
func (_m *CloudInterface) ValidateBusinessEmail(userID string, email string) error {
ret := _m.Called(userID, email)
if len(ret) == 0 {
panic("no return value specified for ValidateBusinessEmail")
}
var r0 error
if rf, ok := ret.Get(0).(func(string, string) error); ok {
r0 = rf(userID, email)
} else {
r0 = ret.Error(0)
}
return r0
}
// NewCloudInterface creates a new instance of CloudInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewCloudInterface(t interface {
mock.TestingT
Cleanup(func())
}) *CloudInterface {
mock := &CloudInterface{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}