From 0a8bdd95df16e09dc3cc2acde1c5a847931fcbf0 Mon Sep 17 00:00:00 2001 From: titanventura Date: Sat, 7 Oct 2023 23:52:40 +0530 Subject: [PATCH] Add. Configuration subcommand to databases Signed-off-by: titanventura --- commands/databases.go | 99 +++- commands/databases_test.go | 73 +++ commands/displayers/database.go | 676 +++++++++++++++++++++++++++ do/databases.go | 52 +++ do/mocks/AccountService.go | 6 +- do/mocks/ActionService.go | 8 +- do/mocks/AppsService.go | 36 +- do/mocks/BalanceService.go | 6 +- do/mocks/BillingHistoryService.go | 6 +- do/mocks/CDNsService.go | 18 +- do/mocks/CertificatesService.go | 12 +- do/mocks/DatabasesService.go | 119 +++-- do/mocks/DomainService.go | 22 +- do/mocks/DropletActionService.go | 62 +-- do/mocks/DropletsService.go | 28 +- do/mocks/FirewallsService.go | 44 +- do/mocks/ImageActionsService.go | 12 +- do/mocks/ImageService.go | 24 +- do/mocks/InvoicesService.go | 14 +- do/mocks/KeysService.go | 14 +- do/mocks/KubernetesService.go | 48 +- do/mocks/Listen.go | 6 +- do/mocks/LoadBalancersService.go | 38 +- do/mocks/MonitoringService.go | 14 +- do/mocks/OAuthService.go | 8 +- do/mocks/OneClickService.go | 10 +- do/mocks/ProjectsService.go | 18 +- do/mocks/RegionsService.go | 6 +- do/mocks/RegistryService.go | 32 +- do/mocks/ReservedIPActionsService.go | 14 +- do/mocks/ReservedIPsService.go | 12 +- do/mocks/Runner.go | 6 +- do/mocks/ServerlessService.go | 72 +-- do/mocks/SizesService.go | 6 +- do/mocks/SnapshotsService.go | 10 +- do/mocks/TagsService.go | 16 +- do/mocks/UptimeChecksService.go | 16 +- do/mocks/VPCsService.go | 20 +- do/mocks/VolumeActionsService.go | 16 +- do/mocks/VolumesService.go | 20 +- 40 files changed, 1400 insertions(+), 319 deletions(-) diff --git a/commands/databases.go b/commands/databases.go index 9b4e3ccdb..13c58290e 100644 --- a/commands/databases.go +++ b/commands/databases.go @@ -140,6 +140,7 @@ Database nodes cannot be resized to smaller sizes due to the risk of data loss.` cmd.AddCommand(sqlMode()) cmd.AddCommand(databaseFirewalls()) cmd.AddCommand(databaseOptions()) + cmd.AddCommand(databaseConfiguration()) return cmd } @@ -1630,7 +1631,6 @@ This would remove the firewall rule of uuid 12345d-1234-123d-123x-123eee456e for AddStringFlag(cmdDatabaseFirewallRemove, doctl.ArgDatabaseFirewallRuleUUID, "", "", "", requiredOpt()) return cmd - } // displayDatabaseFirewallRules calls Get Firewall Rules to list all current rules. @@ -1689,7 +1689,6 @@ func RunDatabaseFirewallRulesUpdate(c *CmdConfig) error { } return displayDatabaseFirewallRules(c, true, id) - } // buildDatabaseUpdateFirewallRulesRequestFromArgs will ingest the --rules arguments into a DatabaseUpdateFirewallRulesRequest object. @@ -1712,7 +1711,6 @@ func buildDatabaseUpdateFirewallRulesRequestFromArgs(c *CmdConfig) (*godo.Databa r.Rules = firewallRulesList return r, nil - } // extractFirewallRules will ingest the --rules arguments into a list of DatabaseFirewallRule objects. @@ -1731,7 +1729,6 @@ func extractFirewallRules(rulesStringList []string) (rules []*godo.DatabaseFirew } return rules, nil - } // RunDatabaseFirewallRulesAppend creates a firewall rule for a database cluster. @@ -1874,3 +1871,97 @@ func waitForDatabaseReady(dbs do.DatabasesService, dbID string) error { dbID, ) } + +func databaseConfiguration() *Command { + cmd := &Command{ + Command: &cobra.Command{ + Use: "configuration", + Aliases: []string{"cfg"}, + Short: "View the configuration of a database cluster given its ID and Engine", + Long: "The subcommands of `doctl databases configuration` are used to view a database cluster's configuration.", + }, + } + getMySQLConfigurationLongDesc := ` + This will get a database cluster's configuration given its ID and Engine + ` + getMySQLCfgCommand := CmdBuilder( + cmd, + RunDatabaseConfigurationGet, + "get ", + "Get a database cluster's configuration", + getMySQLConfigurationLongDesc, + Writer, + aliasOpt("g"), + displayerType(&displayers.MySQLConfiguration{}), + displayerType(&displayers.PostgreSQLConfiguration{}), + displayerType(&displayers.RedisConfiguration{}), + ) + AddStringFlag( + getMySQLCfgCommand, + doctl.ArgDatabaseEngine, + "e", + "", + "the engine of the database you want to get the configuration for", + requiredOpt(), + ) + + return cmd +} + +func RunDatabaseConfigurationGet(c *CmdConfig) error { + args := c.Args + if len(args) == 0 { + return doctl.NewMissingArgsErr(c.NS) + } + if len(args) > 1 { + return doctl.NewTooManyArgsErr(c.NS) + } + + engine, err := c.Doit.GetString(c.NS, doctl.ArgDatabaseEngine) + if err != nil { + return doctl.NewMissingArgsErr(c.NS) + } + + allowedEngines := map[string]any{ + "mysql": nil, + "pg": nil, + "redis": nil, + } + if _, ok := allowedEngines[engine]; !ok { + return fmt.Errorf("(%s) command: engine must be one of: 'pg', 'mysql', 'redis'", c.NS) + } + + dbId := args[0] + if engine == "mysql" { + config, err := c.Databases().GetMySQLConfiguration(dbId) + if err != nil { + return err + } + + displayer := displayers.MySQLConfiguration{ + MySQLConfiguration: *config, + } + return c.Display(&displayer) + } else if engine == "pg" { + config, err := c.Databases().GetPostgreSQLConfiguration(dbId) + if err != nil { + return err + } + + displayer := displayers.PostgreSQLConfiguration{ + PostgreSQLConfig: *config, + } + return c.Display(&displayer) + } else if engine == "redis" { + config, err := c.Databases().GetRedisConfiguration(dbId) + if err != nil { + return err + } + + displayer := displayers.RedisConfiguration{ + RedisConfig: *config, + } + return c.Display(&displayer) + } + return nil +} diff --git a/commands/databases_test.go b/commands/databases_test.go index 8672afdb6..4b9e52ba6 100644 --- a/commands/databases_test.go +++ b/commands/databases_test.go @@ -177,6 +177,18 @@ var ( DatabaseOptions: &godo.DatabaseOptions{}, } + testMySQLConfiguration = do.MySQLConfig{ + MySQLConfig: &godo.MySQLConfig{}, + } + + testPostgreSQLConfiguration = do.PostgreSQLConfig{ + PostgreSQLConfig: &godo.PostgreSQLConfig{}, + } + + testRedisConfiguration = do.RedisConfig{ + RedisConfig: &godo.RedisConfig{}, + } + errTest = errors.New("error") ) @@ -201,6 +213,7 @@ func TestDatabasesCommand(t *testing.T) { "pool", "db", "sql-mode", + "configuration", ) } @@ -271,6 +284,12 @@ func TestDatabaseOptionsCommand(t *testing.T) { ) } +func TestDatabaseConfigurationCommand(t *testing.T) { + cmd := databaseConfiguration() + assert.NotNil(t, cmd) + assertCommandNames(t, cmd, "get") +} + func TestDatabasesGet(t *testing.T) { // Successful call withTestClient(t, func(config *CmdConfig, tm *tcMocks) { @@ -1236,3 +1255,57 @@ func TestConvertUTCtoISO8601(t *testing.T) { assert.Equal(t, "2023-02-01T17:32:15Z", isoTime) } + +func TestDatabaseConfigurationGet(t *testing.T) { + withTestClient(t, func(config *CmdConfig, tm *tcMocks) { + tm.databases.EXPECT().GetMySQLConfiguration(testDBCluster.ID).Return(&testMySQLConfiguration, nil) + config.Args = append(config.Args, testDBCluster.ID) + config.Doit.Set(config.NS, doctl.ArgDatabaseEngine, "mysql") + + err := RunDatabaseConfigurationGet(config) + + assert.NoError(t, err) + }) + + withTestClient(t, func(config *CmdConfig, tm *tcMocks) { + tm.databases.EXPECT().GetPostgreSQLConfiguration(testDBCluster.ID).Return(&testPostgreSQLConfiguration, nil) + config.Args = append(config.Args, testDBCluster.ID) + config.Doit.Set(config.NS, doctl.ArgDatabaseEngine, "pg") + + err := RunDatabaseConfigurationGet(config) + + assert.NoError(t, err) + }) + + withTestClient(t, func(config *CmdConfig, tm *tcMocks) { + tm.databases.EXPECT().GetRedisConfiguration(testDBCluster.ID).Return(&testRedisConfiguration, nil) + config.Args = append(config.Args, testDBCluster.ID) + config.Doit.Set(config.NS, doctl.ArgDatabaseEngine, "redis") + + err := RunDatabaseConfigurationGet(config) + + assert.NoError(t, err) + }) + + withTestClient(t, func(config *CmdConfig, tm *tcMocks) { + err := RunDatabaseConfigurationGet(config) + + assert.Equal(t, err, doctl.NewMissingArgsErr(config.NS)) + }) + + withTestClient(t, func(config *CmdConfig, tm *tcMocks) { + config.Args = append(config.Args, testDBCluster.ID, "extra arg") + + err := RunDatabaseConfigurationGet(config) + + assert.Equal(t, err, doctl.NewTooManyArgsErr(config.NS)) + }) + + withTestClient(t, func(config *CmdConfig, tm *tcMocks) { + config.Args = append(config.Args, testDBCluster.ID) + + err := RunDatabaseConfigurationGet(config) + + assert.Error(t, err) + }) +} diff --git a/commands/displayers/database.go b/commands/displayers/database.go index e49987fbf..1a0c1e8aa 100644 --- a/commands/displayers/database.go +++ b/commands/displayers/database.go @@ -687,3 +687,679 @@ func (dr *DatabaseFirewallRules) KV() []map[string]interface{} { return out } + +type MySQLConfiguration struct { + MySQLConfiguration do.MySQLConfig +} + +var _ Displayable = &MySQLConfiguration{} + +func (dc *MySQLConfiguration) JSON(out io.Writer) error { + return writeJSON(dc.MySQLConfiguration, out) +} + +func (dc *MySQLConfiguration) Cols() []string { + return []string{ + "key", + "value", + } +} + +func (dc *MySQLConfiguration) ColMap() map[string]string { + return map[string]string{ + "key": "key", + "value": "value", + } +} + +func (dc *MySQLConfiguration) KV() []map[string]interface{} { + c := dc.MySQLConfiguration + o := []map[string]interface{}{} + if c.ConnectTimeout != nil { + o = append(o, map[string]interface{}{ + "key": "ConnectTimeout", + "value": *c.ConnectTimeout, + }) + } + if c.DefaultTimeZone != nil { + o = append(o, map[string]interface{}{ + "key": "DefaultTimeZone", + "value": *c.DefaultTimeZone, + }) + } + if c.InnodbLogBufferSize != nil { + o = append(o, map[string]interface{}{ + "key": "InnodbLogBufferSize", + "value": *c.InnodbLogBufferSize, + }) + } + if c.InnodbOnlineAlterLogMaxSize != nil { + o = append(o, map[string]interface{}{ + "key": "InnodbOnlineAlterLogMaxSize", + "value": *c.InnodbOnlineAlterLogMaxSize, + }) + } + if c.InnodbLockWaitTimeout != nil { + o = append(o, map[string]interface{}{ + "key": "InnodbLockWaitTimeout", + "value": *c.InnodbLockWaitTimeout, + }) + } + if c.InteractiveTimeout != nil { + o = append(o, map[string]interface{}{ + "key": "InteractiveTimeout", + "value": *c.InteractiveTimeout, + }) + } + if c.MaxAllowedPacket != nil { + o = append(o, map[string]interface{}{ + "key": "MaxAllowedPacket", + "value": *c.MaxAllowedPacket, + }) + } + if c.NetReadTimeout != nil { + o = append(o, map[string]interface{}{ + "key": "NetReadTimeout", + "value": *c.NetReadTimeout, + }) + } + if c.SortBufferSize != nil { + o = append(o, map[string]interface{}{ + "key": "SortBufferSize", + "value": *c.SortBufferSize, + }) + } + if c.SQLMode != nil { + o = append(o, map[string]interface{}{ + "key": "SQLMode", + "value": *c.SQLMode, + }) + } + if c.SQLRequirePrimaryKey != nil { + o = append(o, map[string]interface{}{ + "key": "SQLRequirePrimaryKey", + "value": *c.SQLRequirePrimaryKey, + }) + } + if c.WaitTimeout != nil { + o = append(o, map[string]interface{}{ + "key": "WaitTimeout", + "value": *c.WaitTimeout, + }) + } + if c.NetWriteTimeout != nil { + o = append(o, map[string]interface{}{ + "key": "NetWriteTimeout", + "value": *c.NetWriteTimeout, + }) + } + if c.GroupConcatMaxLen != nil { + o = append(o, map[string]interface{}{ + "key": "GroupConcatMaxLen", + "value": *c.GroupConcatMaxLen, + }) + } + if c.InformationSchemaStatsExpiry != nil { + o = append(o, map[string]interface{}{ + "key": "InformationSchemaStatsExpiry", + "value": *c.InformationSchemaStatsExpiry, + }) + } + if c.InnodbFtMinTokenSize != nil { + o = append(o, map[string]interface{}{ + "key": "InnodbFtMinTokenSize", + "value": *c.InnodbFtMinTokenSize, + }) + } + if c.InnodbFtServerStopwordTable != nil { + o = append(o, map[string]interface{}{ + "key": "InnodbFtServerStopwordTable", + "value": *c.InnodbFtServerStopwordTable, + }) + } + if c.InnodbPrintAllDeadlocks != nil { + o = append(o, map[string]interface{}{ + "key": "InnodbPrintAllDeadlocks", + "value": *c.InnodbPrintAllDeadlocks, + }) + } + if c.InnodbRollbackOnTimeout != nil { + o = append(o, map[string]interface{}{ + "key": "InnodbRollbackOnTimeout", + "value": *c.InnodbRollbackOnTimeout, + }) + } + if c.InternalTmpMemStorageEngine != nil { + o = append(o, map[string]interface{}{ + "key": "InternalTmpMemStorageEngine", + "value": *c.InternalTmpMemStorageEngine, + }) + } + if c.MaxHeapTableSize != nil { + o = append(o, map[string]interface{}{ + "key": "MaxHeapTableSize", + "value": *c.MaxHeapTableSize, + }) + } + if c.TmpTableSize != nil { + o = append(o, map[string]interface{}{ + "key": "TmpTableSize", + "value": *c.TmpTableSize, + }) + } + if c.SlowQueryLog != nil { + o = append(o, map[string]interface{}{ + "key": "SlowQueryLog", + "value": *c.SlowQueryLog, + }) + } + if c.LongQueryTime != nil { + o = append(o, map[string]interface{}{ + "key": "LongQueryTime", + "value": *c.LongQueryTime, + }) + } + if c.BackupHour != nil { + o = append(o, map[string]interface{}{ + "key": "BackupHour", + "value": *c.BackupHour, + }) + } + if c.BackupMinute != nil { + o = append(o, map[string]interface{}{ + "key": "BackupMinute", + "value": *c.BackupMinute, + }) + } + if c.BinlogRetentionPeriod != nil { + o = append(o, map[string]interface{}{ + "key": "BinlogRetentionPeriod", + "value": *c.BinlogRetentionPeriod, + }) + } + + return o +} + +type PostgreSQLConfiguration struct { + PostgreSQLConfig do.PostgreSQLConfig +} + +var _ Displayable = &PostgreSQLConfiguration{} + +func (dc *PostgreSQLConfiguration) JSON(out io.Writer) error { + return writeJSON(dc.PostgreSQLConfig, out) +} + +func (dc *PostgreSQLConfiguration) Cols() []string { + return []string{ + "key", + "value", + } +} + +func (dc *PostgreSQLConfiguration) ColMap() map[string]string { + return map[string]string{ + "key": "key", + "value": "value", + } +} + +func (dc *PostgreSQLConfiguration) KV() []map[string]interface{} { + c := dc.PostgreSQLConfig + o := []map[string]interface{}{} + if c.AutovacuumFreezeMaxAge != nil { + o = append(o, map[string]interface{}{ + "key": "AutovacuumFreezeMaxAge", + "value": *c.AutovacuumFreezeMaxAge, + }) + } + if c.AutovacuumMaxWorkers != nil { + o = append(o, map[string]interface{}{ + "key": "AutovacuumMaxWorkers", + "value": *c.AutovacuumMaxWorkers, + }) + } + if c.AutovacuumNaptime != nil { + o = append(o, map[string]interface{}{ + "key": "AutovacuumNaptime", + "value": *c.AutovacuumNaptime, + }) + } + if c.AutovacuumVacuumThreshold != nil { + o = append(o, map[string]interface{}{ + "key": "AutovacuumVacuumThreshold", + "value": *c.AutovacuumVacuumThreshold, + }) + } + if c.AutovacuumAnalyzeThreshold != nil { + o = append(o, map[string]interface{}{ + "key": "AutovacuumAnalyzeThreshold", + "value": *c.AutovacuumAnalyzeThreshold, + }) + } + if c.AutovacuumVacuumScaleFactor != nil { + o = append(o, map[string]interface{}{ + "key": "AutovacuumVacuumScaleFactor", + "value": *c.AutovacuumVacuumScaleFactor, + }) + } + if c.AutovacuumAnalyzeScaleFactor != nil { + o = append(o, map[string]interface{}{ + "key": "AutovacuumAnalyzeScaleFactor", + "value": *c.AutovacuumAnalyzeScaleFactor, + }) + } + if c.AutovacuumVacuumCostDelay != nil { + o = append(o, map[string]interface{}{ + "key": "AutovacuumVacuumCostDelay", + "value": *c.AutovacuumVacuumCostDelay, + }) + } + if c.AutovacuumVacuumCostLimit != nil { + o = append(o, map[string]interface{}{ + "key": "AutovacuumVacuumCostLimit", + "value": *c.AutovacuumVacuumCostLimit, + }) + } + if c.BGWriterDelay != nil { + o = append(o, map[string]interface{}{ + "key": "BGWriterDelay", + "value": *c.BGWriterDelay, + }) + } + if c.BGWriterFlushAfter != nil { + o = append(o, map[string]interface{}{ + "key": "BGWriterFlushAfter", + "value": *c.BGWriterFlushAfter, + }) + } + if c.BGWriterLRUMaxpages != nil { + o = append(o, map[string]interface{}{ + "key": "BGWriterLRUMaxpages", + "value": *c.BGWriterLRUMaxpages, + }) + } + if c.BGWriterLRUMultiplier != nil { + o = append(o, map[string]interface{}{ + "key": "BGWriterLRUMultiplier", + "value": *c.BGWriterLRUMultiplier, + }) + } + if c.DeadlockTimeoutMillis != nil { + o = append(o, map[string]interface{}{ + "key": "DeadlockTimeoutMillis", + "value": *c.DeadlockTimeoutMillis, + }) + } + if c.DefaultToastCompression != nil { + o = append(o, map[string]interface{}{ + "key": "DefaultToastCompression", + "value": *c.DefaultToastCompression, + }) + } + if c.IdleInTransactionSessionTimeout != nil { + o = append(o, map[string]interface{}{ + "key": "IdleInTransactionSessionTimeout", + "value": *c.IdleInTransactionSessionTimeout, + }) + } + if c.JIT != nil { + o = append(o, map[string]interface{}{ + "key": "JIT", + "value": *c.JIT, + }) + } + if c.LogAutovacuumMinDuration != nil { + o = append(o, map[string]interface{}{ + "key": "LogAutovacuumMinDuration", + "value": *c.LogAutovacuumMinDuration, + }) + } + if c.LogErrorVerbosity != nil { + o = append(o, map[string]interface{}{ + "key": "LogErrorVerbosity", + "value": *c.LogErrorVerbosity, + }) + } + if c.LogLinePrefix != nil { + o = append(o, map[string]interface{}{ + "key": "LogLinePrefix", + "value": *c.LogLinePrefix, + }) + } + if c.LogMinDurationStatement != nil { + o = append(o, map[string]interface{}{ + "key": "LogMinDurationStatement", + "value": *c.LogMinDurationStatement, + }) + } + if c.MaxFilesPerProcess != nil { + o = append(o, map[string]interface{}{ + "key": "MaxFilesPerProcess", + "value": *c.MaxFilesPerProcess, + }) + } + if c.MaxPreparedTransactions != nil { + o = append(o, map[string]interface{}{ + "key": "MaxPreparedTransactions", + "value": *c.MaxPreparedTransactions, + }) + } + if c.MaxPredLocksPerTransaction != nil { + o = append(o, map[string]interface{}{ + "key": "MaxPredLocksPerTransaction", + "value": *c.MaxPredLocksPerTransaction, + }) + } + if c.MaxLocksPerTransaction != nil { + o = append(o, map[string]interface{}{ + "key": "MaxLocksPerTransaction", + "value": *c.MaxLocksPerTransaction, + }) + } + if c.MaxStackDepth != nil { + o = append(o, map[string]interface{}{ + "key": "MaxStackDepth", + "value": *c.MaxStackDepth, + }) + } + if c.MaxStandbyArchiveDelay != nil { + o = append(o, map[string]interface{}{ + "key": "MaxStandbyArchiveDelay", + "value": *c.MaxStandbyArchiveDelay, + }) + } + if c.MaxStandbyStreamingDelay != nil { + o = append(o, map[string]interface{}{ + "key": "MaxStandbyStreamingDelay", + "value": *c.MaxStandbyStreamingDelay, + }) + } + if c.MaxReplicationSlots != nil { + o = append(o, map[string]interface{}{ + "key": "MaxReplicationSlots", + "value": *c.MaxReplicationSlots, + }) + } + if c.MaxLogicalReplicationWorkers != nil { + o = append(o, map[string]interface{}{ + "key": "MaxLogicalReplicationWorkers", + "value": *c.MaxLogicalReplicationWorkers, + }) + } + if c.MaxParallelWorkers != nil { + o = append(o, map[string]interface{}{ + "key": "MaxParallelWorkers", + "value": *c.MaxParallelWorkers, + }) + } + if c.MaxParallelWorkersPerGather != nil { + o = append(o, map[string]interface{}{ + "key": "MaxParallelWorkersPerGather", + "value": *c.MaxParallelWorkersPerGather, + }) + } + if c.MaxWorkerProcesses != nil { + o = append(o, map[string]interface{}{ + "key": "MaxWorkerProcesses", + "value": *c.MaxWorkerProcesses, + }) + } + if c.PGPartmanBGWRole != nil { + o = append(o, map[string]interface{}{ + "key": "PGPartmanBGWRole", + "value": *c.PGPartmanBGWRole, + }) + } + if c.PGPartmanBGWInterval != nil { + o = append(o, map[string]interface{}{ + "key": "PGPartmanBGWInterval", + "value": *c.PGPartmanBGWInterval, + }) + } + if c.PGStatStatementsTrack != nil { + o = append(o, map[string]interface{}{ + "key": "PGStatStatementsTrack", + "value": *c.PGStatStatementsTrack, + }) + } + if c.TempFileLimit != nil { + o = append(o, map[string]interface{}{ + "key": "TempFileLimit", + "value": *c.TempFileLimit, + }) + } + if c.Timezone != nil { + o = append(o, map[string]interface{}{ + "key": "Timezone", + "value": *c.Timezone, + }) + } + if c.TrackActivityQuerySize != nil { + o = append(o, map[string]interface{}{ + "key": "TrackActivityQuerySize", + "value": *c.TrackActivityQuerySize, + }) + } + if c.TrackCommitTimestamp != nil { + o = append(o, map[string]interface{}{ + "key": "TrackCommitTimestamp", + "value": *c.TrackCommitTimestamp, + }) + } + if c.TrackFunctions != nil { + o = append(o, map[string]interface{}{ + "key": "TrackFunctions", + "value": *c.TrackFunctions, + }) + } + if c.TrackIOTiming != nil { + o = append(o, map[string]interface{}{ + "key": "TrackIOTiming", + "value": *c.TrackIOTiming, + }) + } + if c.MaxWalSenders != nil { + o = append(o, map[string]interface{}{ + "key": "MaxWalSenders", + "value": *c.MaxWalSenders, + }) + } + if c.WalSenderTimeout != nil { + o = append(o, map[string]interface{}{ + "key": "WalSenderTimeout", + "value": *c.WalSenderTimeout, + }) + } + if c.WalWriterDelay != nil { + o = append(o, map[string]interface{}{ + "key": "WalWriterDelay", + "value": *c.WalWriterDelay, + }) + } + if c.SharedBuffersPercentage != nil { + o = append(o, map[string]interface{}{ + "key": "SharedBuffersPercentage", + "value": *c.SharedBuffersPercentage, + }) + } + if c.PgBouncer != nil { + if c.PgBouncer.ServerResetQueryAlways != nil { + o = append(o, map[string]interface{}{ + "key": "PgBouncer.ServerResetQueryAlways", + "value": *c.PgBouncer.ServerResetQueryAlways, + }) + } + if c.PgBouncer.IgnoreStartupParameters != nil { + o = append(o, map[string]interface{}{ + "key": "PgBouncer.IgnoreStartupParameters", + "value": strings.Join(*c.PgBouncer.IgnoreStartupParameters, ","), + }) + } + if c.PgBouncer.MinPoolSize != nil { + o = append(o, map[string]interface{}{ + "key": "PgBouncer.MinPoolSize", + "value": *c.PgBouncer.MinPoolSize, + }) + } + if c.PgBouncer.ServerLifetime != nil { + o = append(o, map[string]interface{}{ + "key": "PgBouncer.ServerLifetime", + "value": *c.PgBouncer.ServerLifetime, + }) + } + if c.PgBouncer.ServerIdleTimeout != nil { + o = append(o, map[string]interface{}{ + "key": "PgBouncer.ServerIdleTimeout", + "value": *c.PgBouncer.ServerIdleTimeout, + }) + } + if c.PgBouncer.AutodbPoolSize != nil { + o = append(o, map[string]interface{}{ + "key": "PgBouncer.AutodbPoolSize", + "value": *c.PgBouncer.AutodbPoolSize, + }) + } + if c.PgBouncer.AutodbPoolMode != nil { + o = append(o, map[string]interface{}{ + "key": "PgBouncer.AutodbPoolMode", + "value": *c.PgBouncer.AutodbPoolMode, + }) + } + if c.PgBouncer.AutodbMaxDbConnections != nil { + o = append(o, map[string]interface{}{ + "key": "PgBouncer.AutodbMaxDbConnections", + "value": *c.PgBouncer.AutodbMaxDbConnections, + }) + } + if c.PgBouncer.AutodbIdleTimeout != nil { + o = append(o, map[string]interface{}{ + "key": "PgBouncer.AutodbIdleTimeout", + "value": *c.PgBouncer.AutodbIdleTimeout, + }) + } + } + if c.BackupHour != nil { + o = append(o, map[string]interface{}{ + "key": "BackupHour", + "value": *c.BackupHour, + }) + } + if c.BackupMinute != nil { + o = append(o, map[string]interface{}{ + "key": "BackupMinute", + "value": *c.BackupMinute, + }) + } + if c.WorkMem != nil { + o = append(o, map[string]interface{}{ + "key": "WorkMem", + "value": *c.WorkMem, + }) + } + if c.TimeScaleDB != nil && c.TimeScaleDB.MaxBackgroundWorkers != nil { + o = append(o, map[string]interface{}{ + "key": "TimeScaleDB.MaxBackgroundWorkers", + "value": *c.TimeScaleDB.MaxBackgroundWorkers, + }) + } + return o +} + +type RedisConfiguration struct { + RedisConfig do.RedisConfig +} + +var _ Displayable = &RedisConfiguration{} + +func (dc *RedisConfiguration) JSON(out io.Writer) error { + return writeJSON(dc.RedisConfig, out) +} + +func (dc *RedisConfiguration) Cols() []string { + return []string{ + "key", + "value", + } +} + +func (dc *RedisConfiguration) ColMap() map[string]string { + return map[string]string{ + "key": "key", + "value": "value", + } +} + +func (dc *RedisConfiguration) KV() []map[string]interface{} { + c := dc.RedisConfig + o := []map[string]interface{}{} + if c.RedisMaxmemoryPolicy != nil { + o = append(o, map[string]interface{}{ + "key": "RedisMaxmemoryPolicy", + "value": *c.RedisMaxmemoryPolicy, + }) + } + if c.RedisPubsubClientOutputBufferLimit != nil { + o = append(o, map[string]interface{}{ + "key": "RedisPubsubClientOutputBufferLimit", + "value": *c.RedisPubsubClientOutputBufferLimit, + }) + } + if c.RedisNumberOfDatabases != nil { + o = append(o, map[string]interface{}{ + "key": "RedisNumberOfDatabases", + "value": *c.RedisNumberOfDatabases, + }) + } + if c.RedisIOThreads != nil { + o = append(o, map[string]interface{}{ + "key": "RedisIOThreads", + "value": *c.RedisIOThreads, + }) + } + if c.RedisLFULogFactor != nil { + o = append(o, map[string]interface{}{ + "key": "RedisLFULogFactor", + "value": *c.RedisLFULogFactor, + }) + } + if c.RedisLFUDecayTime != nil { + o = append(o, map[string]interface{}{ + "key": "RedisLFUDecayTime", + "value": *c.RedisLFUDecayTime, + }) + } + if c.RedisSSL != nil { + o = append(o, map[string]interface{}{ + "key": "RedisSSL", + "value": *c.RedisSSL, + }) + } + if c.RedisTimeout != nil { + o = append(o, map[string]interface{}{ + "key": "RedisTimeout", + "value": *c.RedisTimeout, + }) + } + if c.RedisNotifyKeyspaceEvents != nil { + o = append(o, map[string]interface{}{ + "key": "RedisNotifyKeyspaceEvents", + "value": *c.RedisNotifyKeyspaceEvents, + }) + } + if c.RedisPersistence != nil { + o = append(o, map[string]interface{}{ + "key": "RedisPersistence", + "value": *c.RedisPersistence, + }) + } + if c.RedisACLChannelsDefault != nil { + o = append(o, map[string]interface{}{ + "key": "RedisACLChannelsDefault", + "value": *c.RedisACLChannelsDefault, + }) + } + + return o +} diff --git a/do/databases.go b/do/databases.go index 7e03f61ac..9c5016e75 100644 --- a/do/databases.go +++ b/do/databases.go @@ -96,6 +96,21 @@ type DatabaseLayout struct { *godo.DatabaseLayout } +// MySQLConfig is a wrapper for godo.MySQLConfig +type MySQLConfig struct { + *godo.MySQLConfig +} + +// PostgreSQLConfig is a wrapper for godo.PostgreSQLConfig +type PostgreSQLConfig struct { + *godo.PostgreSQLConfig +} + +// RedisConfig is a wrapper for godo.RedisConfig +type RedisConfig struct { + *godo.RedisConfig +} + // DatabasesService is an interface for interacting with DigitalOcean's Database API type DatabasesService interface { List() (Databases, error) @@ -140,6 +155,10 @@ type DatabasesService interface { UpdateFirewallRules(databaseID string, req *godo.DatabaseUpdateFirewallRulesRequest) error ListOptions() (*DatabaseOptions, error) + + GetMySQLConfiguration(databaseID string) (*MySQLConfig, error) + GetPostgreSQLConfiguration(databaseID string) (*PostgreSQLConfig, error) + GetRedisConfiguration(databaseID string) (*RedisConfig, error) } type databasesService struct { @@ -566,3 +585,36 @@ func (ds *databasesService) ListOptions() (*DatabaseOptions, error) { } return &DatabaseOptions{DatabaseOptions: options}, nil } + +func (ds *databasesService) GetMySQLConfiguration(databaseID string) (*MySQLConfig, error) { + cfg, _, err := ds.client.Databases.GetMySQLConfig(context.TODO(), databaseID) + if err != nil { + return nil, err + } + + return &MySQLConfig{ + MySQLConfig: cfg, + }, nil +} + +func (ds *databasesService) GetPostgreSQLConfiguration(databaseID string) (*PostgreSQLConfig, error) { + cfg, _, err := ds.client.Databases.GetPostgreSQLConfig(context.TODO(), databaseID) + if err != nil { + return nil, err + } + + return &PostgreSQLConfig{ + PostgreSQLConfig: cfg, + }, nil +} + +func (ds *databasesService) GetRedisConfiguration(databaseID string) (*RedisConfig, error) { + cfg, _, err := ds.client.Databases.GetRedisConfig(context.TODO(), databaseID) + if err != nil { + return nil, err + } + + return &RedisConfig{ + RedisConfig: cfg, + }, nil +} diff --git a/do/mocks/AccountService.go b/do/mocks/AccountService.go index 3e13aed86..5c3a17e1b 100644 --- a/do/mocks/AccountService.go +++ b/do/mocks/AccountService.go @@ -1,6 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: account.go - +// +// Generated by this command: +// +// mockgen -source account.go -package=mocks AccountService +// // Package mocks is a generated GoMock package. package mocks diff --git a/do/mocks/ActionService.go b/do/mocks/ActionService.go index bb68475f1..2748248f8 100644 --- a/do/mocks/ActionService.go +++ b/do/mocks/ActionService.go @@ -1,6 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: actions.go - +// +// Generated by this command: +// +// mockgen -source actions.go -package=mocks ActionService +// // Package mocks is a generated GoMock package. package mocks @@ -44,7 +48,7 @@ func (m *MockActionsService) Get(arg0 int) (*do.Action, error) { } // Get indicates an expected call of Get. -func (mr *MockActionsServiceMockRecorder) Get(arg0 interface{}) *gomock.Call { +func (mr *MockActionsServiceMockRecorder) Get(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockActionsService)(nil).Get), arg0) } diff --git a/do/mocks/AppsService.go b/do/mocks/AppsService.go index b339f6754..bbf27feb4 100644 --- a/do/mocks/AppsService.go +++ b/do/mocks/AppsService.go @@ -1,6 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: apps.go - +// +// Generated by this command: +// +// mockgen -source apps.go -package=mocks AppsService +// // Package mocks is a generated GoMock package. package mocks @@ -44,7 +48,7 @@ func (m *MockAppsService) Create(req *godo.AppCreateRequest) (*godo.App, error) } // Create indicates an expected call of Create. -func (mr *MockAppsServiceMockRecorder) Create(req interface{}) *gomock.Call { +func (mr *MockAppsServiceMockRecorder) Create(req any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockAppsService)(nil).Create), req) } @@ -59,7 +63,7 @@ func (m *MockAppsService) CreateDeployment(appID string, forceRebuild bool) (*go } // CreateDeployment indicates an expected call of CreateDeployment. -func (mr *MockAppsServiceMockRecorder) CreateDeployment(appID, forceRebuild interface{}) *gomock.Call { +func (mr *MockAppsServiceMockRecorder) CreateDeployment(appID, forceRebuild any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateDeployment", reflect.TypeOf((*MockAppsService)(nil).CreateDeployment), appID, forceRebuild) } @@ -73,7 +77,7 @@ func (m *MockAppsService) Delete(appID string) error { } // Delete indicates an expected call of Delete. -func (mr *MockAppsServiceMockRecorder) Delete(appID interface{}) *gomock.Call { +func (mr *MockAppsServiceMockRecorder) Delete(appID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockAppsService)(nil).Delete), appID) } @@ -88,7 +92,7 @@ func (m *MockAppsService) Get(appID string) (*godo.App, error) { } // Get indicates an expected call of Get. -func (mr *MockAppsServiceMockRecorder) Get(appID interface{}) *gomock.Call { +func (mr *MockAppsServiceMockRecorder) Get(appID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockAppsService)(nil).Get), appID) } @@ -103,7 +107,7 @@ func (m *MockAppsService) GetDeployment(appID, deploymentID string) (*godo.Deplo } // GetDeployment indicates an expected call of GetDeployment. -func (mr *MockAppsServiceMockRecorder) GetDeployment(appID, deploymentID interface{}) *gomock.Call { +func (mr *MockAppsServiceMockRecorder) GetDeployment(appID, deploymentID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDeployment", reflect.TypeOf((*MockAppsService)(nil).GetDeployment), appID, deploymentID) } @@ -118,7 +122,7 @@ func (m *MockAppsService) GetInstanceSize(slug string) (*godo.AppInstanceSize, e } // GetInstanceSize indicates an expected call of GetInstanceSize. -func (mr *MockAppsServiceMockRecorder) GetInstanceSize(slug interface{}) *gomock.Call { +func (mr *MockAppsServiceMockRecorder) GetInstanceSize(slug any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceSize", reflect.TypeOf((*MockAppsService)(nil).GetInstanceSize), slug) } @@ -133,7 +137,7 @@ func (m *MockAppsService) GetLogs(appID, deploymentID, component string, logType } // GetLogs indicates an expected call of GetLogs. -func (mr *MockAppsServiceMockRecorder) GetLogs(appID, deploymentID, component, logType, follow, tail interface{}) *gomock.Call { +func (mr *MockAppsServiceMockRecorder) GetLogs(appID, deploymentID, component, logType, follow, tail any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLogs", reflect.TypeOf((*MockAppsService)(nil).GetLogs), appID, deploymentID, component, logType, follow, tail) } @@ -148,7 +152,7 @@ func (m *MockAppsService) GetTier(slug string) (*godo.AppTier, error) { } // GetTier indicates an expected call of GetTier. -func (mr *MockAppsServiceMockRecorder) GetTier(slug interface{}) *gomock.Call { +func (mr *MockAppsServiceMockRecorder) GetTier(slug any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTier", reflect.TypeOf((*MockAppsService)(nil).GetTier), slug) } @@ -163,7 +167,7 @@ func (m *MockAppsService) List(withProjects bool) ([]*godo.App, error) { } // List indicates an expected call of List. -func (mr *MockAppsServiceMockRecorder) List(withProjects interface{}) *gomock.Call { +func (mr *MockAppsServiceMockRecorder) List(withProjects any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockAppsService)(nil).List), withProjects) } @@ -178,7 +182,7 @@ func (m *MockAppsService) ListAlerts(appID string) ([]*godo.AppAlert, error) { } // ListAlerts indicates an expected call of ListAlerts. -func (mr *MockAppsServiceMockRecorder) ListAlerts(appID interface{}) *gomock.Call { +func (mr *MockAppsServiceMockRecorder) ListAlerts(appID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAlerts", reflect.TypeOf((*MockAppsService)(nil).ListAlerts), appID) } @@ -208,7 +212,7 @@ func (m *MockAppsService) ListDeployments(appID string) ([]*godo.Deployment, err } // ListDeployments indicates an expected call of ListDeployments. -func (mr *MockAppsServiceMockRecorder) ListDeployments(appID interface{}) *gomock.Call { +func (mr *MockAppsServiceMockRecorder) ListDeployments(appID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListDeployments", reflect.TypeOf((*MockAppsService)(nil).ListDeployments), appID) } @@ -268,7 +272,7 @@ func (m *MockAppsService) Propose(req *godo.AppProposeRequest) (*godo.AppPropose } // Propose indicates an expected call of Propose. -func (mr *MockAppsServiceMockRecorder) Propose(req interface{}) *gomock.Call { +func (mr *MockAppsServiceMockRecorder) Propose(req any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Propose", reflect.TypeOf((*MockAppsService)(nil).Propose), req) } @@ -283,7 +287,7 @@ func (m *MockAppsService) Update(appID string, req *godo.AppUpdateRequest) (*god } // Update indicates an expected call of Update. -func (mr *MockAppsServiceMockRecorder) Update(appID, req interface{}) *gomock.Call { +func (mr *MockAppsServiceMockRecorder) Update(appID, req any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockAppsService)(nil).Update), appID, req) } @@ -298,7 +302,7 @@ func (m *MockAppsService) UpdateAlertDestinations(appID, alertID string, update } // UpdateAlertDestinations indicates an expected call of UpdateAlertDestinations. -func (mr *MockAppsServiceMockRecorder) UpdateAlertDestinations(appID, alertID, update interface{}) *gomock.Call { +func (mr *MockAppsServiceMockRecorder) UpdateAlertDestinations(appID, alertID, update any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateAlertDestinations", reflect.TypeOf((*MockAppsService)(nil).UpdateAlertDestinations), appID, alertID, update) } @@ -314,7 +318,7 @@ func (m *MockAppsService) UpgradeBuildpack(appID string, options godo.UpgradeBui } // UpgradeBuildpack indicates an expected call of UpgradeBuildpack. -func (mr *MockAppsServiceMockRecorder) UpgradeBuildpack(appID, options interface{}) *gomock.Call { +func (mr *MockAppsServiceMockRecorder) UpgradeBuildpack(appID, options any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradeBuildpack", reflect.TypeOf((*MockAppsService)(nil).UpgradeBuildpack), appID, options) } diff --git a/do/mocks/BalanceService.go b/do/mocks/BalanceService.go index 37f2b898f..e33b43066 100644 --- a/do/mocks/BalanceService.go +++ b/do/mocks/BalanceService.go @@ -1,6 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: balance.go - +// +// Generated by this command: +// +// mockgen -source balance.go -package=mocks BalanceService +// // Package mocks is a generated GoMock package. package mocks diff --git a/do/mocks/BillingHistoryService.go b/do/mocks/BillingHistoryService.go index eead9d87f..bd1da6ee3 100644 --- a/do/mocks/BillingHistoryService.go +++ b/do/mocks/BillingHistoryService.go @@ -1,6 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: billing_history.go - +// +// Generated by this command: +// +// mockgen -source billing_history.go -package=mocks BillingHistoryService +// // Package mocks is a generated GoMock package. package mocks diff --git a/do/mocks/CDNsService.go b/do/mocks/CDNsService.go index b613c66ac..99b8951eb 100644 --- a/do/mocks/CDNsService.go +++ b/do/mocks/CDNsService.go @@ -1,6 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: cdns.go - +// +// Generated by this command: +// +// mockgen -source cdns.go -package=mocks CDNsService +// // Package mocks is a generated GoMock package. package mocks @@ -45,7 +49,7 @@ func (m *MockCDNsService) Create(arg0 *godo.CDNCreateRequest) (*do.CDN, error) { } // Create indicates an expected call of Create. -func (mr *MockCDNsServiceMockRecorder) Create(arg0 interface{}) *gomock.Call { +func (mr *MockCDNsServiceMockRecorder) Create(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockCDNsService)(nil).Create), arg0) } @@ -59,7 +63,7 @@ func (m *MockCDNsService) Delete(arg0 string) error { } // Delete indicates an expected call of Delete. -func (mr *MockCDNsServiceMockRecorder) Delete(arg0 interface{}) *gomock.Call { +func (mr *MockCDNsServiceMockRecorder) Delete(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockCDNsService)(nil).Delete), arg0) } @@ -73,7 +77,7 @@ func (m *MockCDNsService) FlushCache(arg0 string, arg1 *godo.CDNFlushCacheReques } // FlushCache indicates an expected call of FlushCache. -func (mr *MockCDNsServiceMockRecorder) FlushCache(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockCDNsServiceMockRecorder) FlushCache(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FlushCache", reflect.TypeOf((*MockCDNsService)(nil).FlushCache), arg0, arg1) } @@ -88,7 +92,7 @@ func (m *MockCDNsService) Get(arg0 string) (*do.CDN, error) { } // Get indicates an expected call of Get. -func (mr *MockCDNsServiceMockRecorder) Get(arg0 interface{}) *gomock.Call { +func (mr *MockCDNsServiceMockRecorder) Get(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockCDNsService)(nil).Get), arg0) } @@ -118,7 +122,7 @@ func (m *MockCDNsService) UpdateCustomDomain(arg0 string, arg1 *godo.CDNUpdateCu } // UpdateCustomDomain indicates an expected call of UpdateCustomDomain. -func (mr *MockCDNsServiceMockRecorder) UpdateCustomDomain(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockCDNsServiceMockRecorder) UpdateCustomDomain(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateCustomDomain", reflect.TypeOf((*MockCDNsService)(nil).UpdateCustomDomain), arg0, arg1) } @@ -133,7 +137,7 @@ func (m *MockCDNsService) UpdateTTL(arg0 string, arg1 *godo.CDNUpdateTTLRequest) } // UpdateTTL indicates an expected call of UpdateTTL. -func (mr *MockCDNsServiceMockRecorder) UpdateTTL(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockCDNsServiceMockRecorder) UpdateTTL(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateTTL", reflect.TypeOf((*MockCDNsService)(nil).UpdateTTL), arg0, arg1) } diff --git a/do/mocks/CertificatesService.go b/do/mocks/CertificatesService.go index 3de2024bc..b7acaf418 100644 --- a/do/mocks/CertificatesService.go +++ b/do/mocks/CertificatesService.go @@ -1,6 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: certificates.go - +// +// Generated by this command: +// +// mockgen -source certificates.go -package=mocks CertificateSservice +// // Package mocks is a generated GoMock package. package mocks @@ -45,7 +49,7 @@ func (m *MockCertificatesService) Create(cr *godo.CertificateRequest) (*do.Certi } // Create indicates an expected call of Create. -func (mr *MockCertificatesServiceMockRecorder) Create(cr interface{}) *gomock.Call { +func (mr *MockCertificatesServiceMockRecorder) Create(cr any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockCertificatesService)(nil).Create), cr) } @@ -59,7 +63,7 @@ func (m *MockCertificatesService) Delete(cID string) error { } // Delete indicates an expected call of Delete. -func (mr *MockCertificatesServiceMockRecorder) Delete(cID interface{}) *gomock.Call { +func (mr *MockCertificatesServiceMockRecorder) Delete(cID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockCertificatesService)(nil).Delete), cID) } @@ -74,7 +78,7 @@ func (m *MockCertificatesService) Get(cID string) (*do.Certificate, error) { } // Get indicates an expected call of Get. -func (mr *MockCertificatesServiceMockRecorder) Get(cID interface{}) *gomock.Call { +func (mr *MockCertificatesServiceMockRecorder) Get(cID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockCertificatesService)(nil).Get), cID) } diff --git a/do/mocks/DatabasesService.go b/do/mocks/DatabasesService.go index 714b44afa..518c339aa 100644 --- a/do/mocks/DatabasesService.go +++ b/do/mocks/DatabasesService.go @@ -1,6 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: databases.go - +// +// Generated by this command: +// +// mockgen -source databases.go -package=mocks DatabasesService +// // Package mocks is a generated GoMock package. package mocks @@ -45,7 +49,7 @@ func (m *MockDatabasesService) Create(arg0 *godo.DatabaseCreateRequest) (*do.Dat } // Create indicates an expected call of Create. -func (mr *MockDatabasesServiceMockRecorder) Create(arg0 interface{}) *gomock.Call { +func (mr *MockDatabasesServiceMockRecorder) Create(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockDatabasesService)(nil).Create), arg0) } @@ -60,7 +64,7 @@ func (m *MockDatabasesService) CreateDB(arg0 string, arg1 *godo.DatabaseCreateDB } // CreateDB indicates an expected call of CreateDB. -func (mr *MockDatabasesServiceMockRecorder) CreateDB(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockDatabasesServiceMockRecorder) CreateDB(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateDB", reflect.TypeOf((*MockDatabasesService)(nil).CreateDB), arg0, arg1) } @@ -75,7 +79,7 @@ func (m *MockDatabasesService) CreatePool(arg0 string, arg1 *godo.DatabaseCreate } // CreatePool indicates an expected call of CreatePool. -func (mr *MockDatabasesServiceMockRecorder) CreatePool(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockDatabasesServiceMockRecorder) CreatePool(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreatePool", reflect.TypeOf((*MockDatabasesService)(nil).CreatePool), arg0, arg1) } @@ -90,7 +94,7 @@ func (m *MockDatabasesService) CreateReplica(arg0 string, arg1 *godo.DatabaseCre } // CreateReplica indicates an expected call of CreateReplica. -func (mr *MockDatabasesServiceMockRecorder) CreateReplica(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockDatabasesServiceMockRecorder) CreateReplica(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateReplica", reflect.TypeOf((*MockDatabasesService)(nil).CreateReplica), arg0, arg1) } @@ -105,7 +109,7 @@ func (m *MockDatabasesService) CreateUser(arg0 string, arg1 *godo.DatabaseCreate } // CreateUser indicates an expected call of CreateUser. -func (mr *MockDatabasesServiceMockRecorder) CreateUser(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockDatabasesServiceMockRecorder) CreateUser(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateUser", reflect.TypeOf((*MockDatabasesService)(nil).CreateUser), arg0, arg1) } @@ -119,7 +123,7 @@ func (m *MockDatabasesService) Delete(arg0 string) error { } // Delete indicates an expected call of Delete. -func (mr *MockDatabasesServiceMockRecorder) Delete(arg0 interface{}) *gomock.Call { +func (mr *MockDatabasesServiceMockRecorder) Delete(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockDatabasesService)(nil).Delete), arg0) } @@ -133,7 +137,7 @@ func (m *MockDatabasesService) DeleteDB(arg0, arg1 string) error { } // DeleteDB indicates an expected call of DeleteDB. -func (mr *MockDatabasesServiceMockRecorder) DeleteDB(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockDatabasesServiceMockRecorder) DeleteDB(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteDB", reflect.TypeOf((*MockDatabasesService)(nil).DeleteDB), arg0, arg1) } @@ -147,7 +151,7 @@ func (m *MockDatabasesService) DeletePool(arg0, arg1 string) error { } // DeletePool indicates an expected call of DeletePool. -func (mr *MockDatabasesServiceMockRecorder) DeletePool(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockDatabasesServiceMockRecorder) DeletePool(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeletePool", reflect.TypeOf((*MockDatabasesService)(nil).DeletePool), arg0, arg1) } @@ -161,7 +165,7 @@ func (m *MockDatabasesService) DeleteReplica(arg0, arg1 string) error { } // DeleteReplica indicates an expected call of DeleteReplica. -func (mr *MockDatabasesServiceMockRecorder) DeleteReplica(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockDatabasesServiceMockRecorder) DeleteReplica(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteReplica", reflect.TypeOf((*MockDatabasesService)(nil).DeleteReplica), arg0, arg1) } @@ -175,7 +179,7 @@ func (m *MockDatabasesService) DeleteUser(arg0, arg1 string) error { } // DeleteUser indicates an expected call of DeleteUser. -func (mr *MockDatabasesServiceMockRecorder) DeleteUser(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockDatabasesServiceMockRecorder) DeleteUser(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteUser", reflect.TypeOf((*MockDatabasesService)(nil).DeleteUser), arg0, arg1) } @@ -190,7 +194,7 @@ func (m *MockDatabasesService) Get(arg0 string) (*do.Database, error) { } // Get indicates an expected call of Get. -func (mr *MockDatabasesServiceMockRecorder) Get(arg0 interface{}) *gomock.Call { +func (mr *MockDatabasesServiceMockRecorder) Get(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockDatabasesService)(nil).Get), arg0) } @@ -205,7 +209,7 @@ func (m *MockDatabasesService) GetConnection(arg0 string, arg1 bool) (*do.Databa } // GetConnection indicates an expected call of GetConnection. -func (mr *MockDatabasesServiceMockRecorder) GetConnection(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockDatabasesServiceMockRecorder) GetConnection(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConnection", reflect.TypeOf((*MockDatabasesService)(nil).GetConnection), arg0, arg1) } @@ -220,7 +224,7 @@ func (m *MockDatabasesService) GetDB(arg0, arg1 string) (*do.DatabaseDB, error) } // GetDB indicates an expected call of GetDB. -func (mr *MockDatabasesServiceMockRecorder) GetDB(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockDatabasesServiceMockRecorder) GetDB(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDB", reflect.TypeOf((*MockDatabasesService)(nil).GetDB), arg0, arg1) } @@ -235,7 +239,7 @@ func (m *MockDatabasesService) GetFirewallRules(arg0 string) (do.DatabaseFirewal } // GetFirewallRules indicates an expected call of GetFirewallRules. -func (mr *MockDatabasesServiceMockRecorder) GetFirewallRules(arg0 interface{}) *gomock.Call { +func (mr *MockDatabasesServiceMockRecorder) GetFirewallRules(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetFirewallRules", reflect.TypeOf((*MockDatabasesService)(nil).GetFirewallRules), arg0) } @@ -250,11 +254,26 @@ func (m *MockDatabasesService) GetMaintenance(arg0 string) (*do.DatabaseMaintena } // GetMaintenance indicates an expected call of GetMaintenance. -func (mr *MockDatabasesServiceMockRecorder) GetMaintenance(arg0 interface{}) *gomock.Call { +func (mr *MockDatabasesServiceMockRecorder) GetMaintenance(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMaintenance", reflect.TypeOf((*MockDatabasesService)(nil).GetMaintenance), arg0) } +// GetMySQLConfiguration mocks base method. +func (m *MockDatabasesService) GetMySQLConfiguration(databaseID string) (*do.MySQLConfig, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetMySQLConfiguration", databaseID) + ret0, _ := ret[0].(*do.MySQLConfig) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetMySQLConfiguration indicates an expected call of GetMySQLConfiguration. +func (mr *MockDatabasesServiceMockRecorder) GetMySQLConfiguration(databaseID any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMySQLConfiguration", reflect.TypeOf((*MockDatabasesService)(nil).GetMySQLConfiguration), databaseID) +} + // GetPool mocks base method. func (m *MockDatabasesService) GetPool(arg0, arg1 string) (*do.DatabasePool, error) { m.ctrl.T.Helper() @@ -265,11 +284,41 @@ func (m *MockDatabasesService) GetPool(arg0, arg1 string) (*do.DatabasePool, err } // GetPool indicates an expected call of GetPool. -func (mr *MockDatabasesServiceMockRecorder) GetPool(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockDatabasesServiceMockRecorder) GetPool(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPool", reflect.TypeOf((*MockDatabasesService)(nil).GetPool), arg0, arg1) } +// GetPostgreSQLConfiguration mocks base method. +func (m *MockDatabasesService) GetPostgreSQLConfiguration(databaseID string) (*do.PostgreSQLConfig, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetPostgreSQLConfiguration", databaseID) + ret0, _ := ret[0].(*do.PostgreSQLConfig) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetPostgreSQLConfiguration indicates an expected call of GetPostgreSQLConfiguration. +func (mr *MockDatabasesServiceMockRecorder) GetPostgreSQLConfiguration(databaseID any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPostgreSQLConfiguration", reflect.TypeOf((*MockDatabasesService)(nil).GetPostgreSQLConfiguration), databaseID) +} + +// GetRedisConfiguration mocks base method. +func (m *MockDatabasesService) GetRedisConfiguration(databaseID string) (*do.RedisConfig, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetRedisConfiguration", databaseID) + ret0, _ := ret[0].(*do.RedisConfig) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetRedisConfiguration indicates an expected call of GetRedisConfiguration. +func (mr *MockDatabasesServiceMockRecorder) GetRedisConfiguration(databaseID any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRedisConfiguration", reflect.TypeOf((*MockDatabasesService)(nil).GetRedisConfiguration), databaseID) +} + // GetReplica mocks base method. func (m *MockDatabasesService) GetReplica(arg0, arg1 string) (*do.DatabaseReplica, error) { m.ctrl.T.Helper() @@ -280,7 +329,7 @@ func (m *MockDatabasesService) GetReplica(arg0, arg1 string) (*do.DatabaseReplic } // GetReplica indicates an expected call of GetReplica. -func (mr *MockDatabasesServiceMockRecorder) GetReplica(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockDatabasesServiceMockRecorder) GetReplica(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetReplica", reflect.TypeOf((*MockDatabasesService)(nil).GetReplica), arg0, arg1) } @@ -295,7 +344,7 @@ func (m *MockDatabasesService) GetReplicaConnection(arg0, arg1 string) (*do.Data } // GetReplicaConnection indicates an expected call of GetReplicaConnection. -func (mr *MockDatabasesServiceMockRecorder) GetReplicaConnection(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockDatabasesServiceMockRecorder) GetReplicaConnection(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetReplicaConnection", reflect.TypeOf((*MockDatabasesService)(nil).GetReplicaConnection), arg0, arg1) } @@ -310,7 +359,7 @@ func (m *MockDatabasesService) GetSQLMode(arg0 string) ([]string, error) { } // GetSQLMode indicates an expected call of GetSQLMode. -func (mr *MockDatabasesServiceMockRecorder) GetSQLMode(arg0 interface{}) *gomock.Call { +func (mr *MockDatabasesServiceMockRecorder) GetSQLMode(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSQLMode", reflect.TypeOf((*MockDatabasesService)(nil).GetSQLMode), arg0) } @@ -325,7 +374,7 @@ func (m *MockDatabasesService) GetUser(arg0, arg1 string) (*do.DatabaseUser, err } // GetUser indicates an expected call of GetUser. -func (mr *MockDatabasesServiceMockRecorder) GetUser(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockDatabasesServiceMockRecorder) GetUser(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUser", reflect.TypeOf((*MockDatabasesService)(nil).GetUser), arg0, arg1) } @@ -355,7 +404,7 @@ func (m *MockDatabasesService) ListBackups(arg0 string) (do.DatabaseBackups, err } // ListBackups indicates an expected call of ListBackups. -func (mr *MockDatabasesServiceMockRecorder) ListBackups(arg0 interface{}) *gomock.Call { +func (mr *MockDatabasesServiceMockRecorder) ListBackups(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListBackups", reflect.TypeOf((*MockDatabasesService)(nil).ListBackups), arg0) } @@ -370,7 +419,7 @@ func (m *MockDatabasesService) ListDBs(arg0 string) (do.DatabaseDBs, error) { } // ListDBs indicates an expected call of ListDBs. -func (mr *MockDatabasesServiceMockRecorder) ListDBs(arg0 interface{}) *gomock.Call { +func (mr *MockDatabasesServiceMockRecorder) ListDBs(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListDBs", reflect.TypeOf((*MockDatabasesService)(nil).ListDBs), arg0) } @@ -400,7 +449,7 @@ func (m *MockDatabasesService) ListPools(arg0 string) (do.DatabasePools, error) } // ListPools indicates an expected call of ListPools. -func (mr *MockDatabasesServiceMockRecorder) ListPools(arg0 interface{}) *gomock.Call { +func (mr *MockDatabasesServiceMockRecorder) ListPools(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListPools", reflect.TypeOf((*MockDatabasesService)(nil).ListPools), arg0) } @@ -415,7 +464,7 @@ func (m *MockDatabasesService) ListReplicas(arg0 string) (do.DatabaseReplicas, e } // ListReplicas indicates an expected call of ListReplicas. -func (mr *MockDatabasesServiceMockRecorder) ListReplicas(arg0 interface{}) *gomock.Call { +func (mr *MockDatabasesServiceMockRecorder) ListReplicas(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListReplicas", reflect.TypeOf((*MockDatabasesService)(nil).ListReplicas), arg0) } @@ -430,7 +479,7 @@ func (m *MockDatabasesService) ListUsers(arg0 string) (do.DatabaseUsers, error) } // ListUsers indicates an expected call of ListUsers. -func (mr *MockDatabasesServiceMockRecorder) ListUsers(arg0 interface{}) *gomock.Call { +func (mr *MockDatabasesServiceMockRecorder) ListUsers(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListUsers", reflect.TypeOf((*MockDatabasesService)(nil).ListUsers), arg0) } @@ -444,7 +493,7 @@ func (m *MockDatabasesService) Migrate(arg0 string, arg1 *godo.DatabaseMigrateRe } // Migrate indicates an expected call of Migrate. -func (mr *MockDatabasesServiceMockRecorder) Migrate(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockDatabasesServiceMockRecorder) Migrate(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Migrate", reflect.TypeOf((*MockDatabasesService)(nil).Migrate), arg0, arg1) } @@ -458,7 +507,7 @@ func (m *MockDatabasesService) PromoteReplica(arg0, arg1 string) error { } // PromoteReplica indicates an expected call of PromoteReplica. -func (mr *MockDatabasesServiceMockRecorder) PromoteReplica(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockDatabasesServiceMockRecorder) PromoteReplica(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PromoteReplica", reflect.TypeOf((*MockDatabasesService)(nil).PromoteReplica), arg0, arg1) } @@ -473,7 +522,7 @@ func (m *MockDatabasesService) ResetUserAuth(arg0, arg1 string, arg2 *godo.Datab } // ResetUserAuth indicates an expected call of ResetUserAuth. -func (mr *MockDatabasesServiceMockRecorder) ResetUserAuth(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockDatabasesServiceMockRecorder) ResetUserAuth(arg0, arg1, arg2 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResetUserAuth", reflect.TypeOf((*MockDatabasesService)(nil).ResetUserAuth), arg0, arg1, arg2) } @@ -487,7 +536,7 @@ func (m *MockDatabasesService) Resize(arg0 string, arg1 *godo.DatabaseResizeRequ } // Resize indicates an expected call of Resize. -func (mr *MockDatabasesServiceMockRecorder) Resize(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockDatabasesServiceMockRecorder) Resize(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Resize", reflect.TypeOf((*MockDatabasesService)(nil).Resize), arg0, arg1) } @@ -495,7 +544,7 @@ func (mr *MockDatabasesServiceMockRecorder) Resize(arg0, arg1 interface{}) *gomo // SetSQLMode mocks base method. func (m *MockDatabasesService) SetSQLMode(arg0 string, arg1 ...string) error { m.ctrl.T.Helper() - varargs := []interface{}{arg0} + varargs := []any{arg0} for _, a := range arg1 { varargs = append(varargs, a) } @@ -505,9 +554,9 @@ func (m *MockDatabasesService) SetSQLMode(arg0 string, arg1 ...string) error { } // SetSQLMode indicates an expected call of SetSQLMode. -func (mr *MockDatabasesServiceMockRecorder) SetSQLMode(arg0 interface{}, arg1 ...interface{}) *gomock.Call { +func (mr *MockDatabasesServiceMockRecorder) SetSQLMode(arg0 any, arg1 ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]interface{}{arg0}, arg1...) + varargs := append([]any{arg0}, arg1...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetSQLMode", reflect.TypeOf((*MockDatabasesService)(nil).SetSQLMode), varargs...) } @@ -520,7 +569,7 @@ func (m *MockDatabasesService) UpdateFirewallRules(databaseID string, req *godo. } // UpdateFirewallRules indicates an expected call of UpdateFirewallRules. -func (mr *MockDatabasesServiceMockRecorder) UpdateFirewallRules(databaseID, req interface{}) *gomock.Call { +func (mr *MockDatabasesServiceMockRecorder) UpdateFirewallRules(databaseID, req any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateFirewallRules", reflect.TypeOf((*MockDatabasesService)(nil).UpdateFirewallRules), databaseID, req) } @@ -534,7 +583,7 @@ func (m *MockDatabasesService) UpdateMaintenance(arg0 string, arg1 *godo.Databas } // UpdateMaintenance indicates an expected call of UpdateMaintenance. -func (mr *MockDatabasesServiceMockRecorder) UpdateMaintenance(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockDatabasesServiceMockRecorder) UpdateMaintenance(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateMaintenance", reflect.TypeOf((*MockDatabasesService)(nil).UpdateMaintenance), arg0, arg1) } diff --git a/do/mocks/DomainService.go b/do/mocks/DomainService.go index e5b01e219..207d0ad62 100644 --- a/do/mocks/DomainService.go +++ b/do/mocks/DomainService.go @@ -1,6 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: domains.go - +// +// Generated by this command: +// +// mockgen -source domains.go -package=mocks DomainService +// // Package mocks is a generated GoMock package. package mocks @@ -45,7 +49,7 @@ func (m *MockDomainsService) Create(arg0 *godo.DomainCreateRequest) (*do.Domain, } // Create indicates an expected call of Create. -func (mr *MockDomainsServiceMockRecorder) Create(arg0 interface{}) *gomock.Call { +func (mr *MockDomainsServiceMockRecorder) Create(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockDomainsService)(nil).Create), arg0) } @@ -60,7 +64,7 @@ func (m *MockDomainsService) CreateRecord(arg0 string, arg1 *do.DomainRecordEdit } // CreateRecord indicates an expected call of CreateRecord. -func (mr *MockDomainsServiceMockRecorder) CreateRecord(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockDomainsServiceMockRecorder) CreateRecord(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateRecord", reflect.TypeOf((*MockDomainsService)(nil).CreateRecord), arg0, arg1) } @@ -74,7 +78,7 @@ func (m *MockDomainsService) Delete(arg0 string) error { } // Delete indicates an expected call of Delete. -func (mr *MockDomainsServiceMockRecorder) Delete(arg0 interface{}) *gomock.Call { +func (mr *MockDomainsServiceMockRecorder) Delete(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockDomainsService)(nil).Delete), arg0) } @@ -88,7 +92,7 @@ func (m *MockDomainsService) DeleteRecord(arg0 string, arg1 int) error { } // DeleteRecord indicates an expected call of DeleteRecord. -func (mr *MockDomainsServiceMockRecorder) DeleteRecord(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockDomainsServiceMockRecorder) DeleteRecord(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteRecord", reflect.TypeOf((*MockDomainsService)(nil).DeleteRecord), arg0, arg1) } @@ -103,7 +107,7 @@ func (m *MockDomainsService) EditRecord(arg0 string, arg1 int, arg2 *do.DomainRe } // EditRecord indicates an expected call of EditRecord. -func (mr *MockDomainsServiceMockRecorder) EditRecord(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockDomainsServiceMockRecorder) EditRecord(arg0, arg1, arg2 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EditRecord", reflect.TypeOf((*MockDomainsService)(nil).EditRecord), arg0, arg1, arg2) } @@ -118,7 +122,7 @@ func (m *MockDomainsService) Get(arg0 string) (*do.Domain, error) { } // Get indicates an expected call of Get. -func (mr *MockDomainsServiceMockRecorder) Get(arg0 interface{}) *gomock.Call { +func (mr *MockDomainsServiceMockRecorder) Get(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockDomainsService)(nil).Get), arg0) } @@ -148,7 +152,7 @@ func (m *MockDomainsService) Record(arg0 string, arg1 int) (*do.DomainRecord, er } // Record indicates an expected call of Record. -func (mr *MockDomainsServiceMockRecorder) Record(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockDomainsServiceMockRecorder) Record(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Record", reflect.TypeOf((*MockDomainsService)(nil).Record), arg0, arg1) } @@ -163,7 +167,7 @@ func (m *MockDomainsService) Records(arg0 string) (do.DomainRecords, error) { } // Records indicates an expected call of Records. -func (mr *MockDomainsServiceMockRecorder) Records(arg0 interface{}) *gomock.Call { +func (mr *MockDomainsServiceMockRecorder) Records(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Records", reflect.TypeOf((*MockDomainsService)(nil).Records), arg0) } diff --git a/do/mocks/DropletActionService.go b/do/mocks/DropletActionService.go index cd83d3a90..f21f51d2e 100644 --- a/do/mocks/DropletActionService.go +++ b/do/mocks/DropletActionService.go @@ -1,6 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: droplet_actions.go - +// +// Generated by this command: +// +// mockgen -source droplet_actions.go -package=mocks DropletActionsService +// // Package mocks is a generated GoMock package. package mocks @@ -44,7 +48,7 @@ func (m *MockDropletActionsService) ChangeKernel(arg0, arg1 int) (*do.Action, er } // ChangeKernel indicates an expected call of ChangeKernel. -func (mr *MockDropletActionsServiceMockRecorder) ChangeKernel(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockDropletActionsServiceMockRecorder) ChangeKernel(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeKernel", reflect.TypeOf((*MockDropletActionsService)(nil).ChangeKernel), arg0, arg1) } @@ -59,7 +63,7 @@ func (m *MockDropletActionsService) DisableBackups(arg0 int) (*do.Action, error) } // DisableBackups indicates an expected call of DisableBackups. -func (mr *MockDropletActionsServiceMockRecorder) DisableBackups(arg0 interface{}) *gomock.Call { +func (mr *MockDropletActionsServiceMockRecorder) DisableBackups(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DisableBackups", reflect.TypeOf((*MockDropletActionsService)(nil).DisableBackups), arg0) } @@ -74,7 +78,7 @@ func (m *MockDropletActionsService) DisableBackupsByTag(arg0 string) (do.Actions } // DisableBackupsByTag indicates an expected call of DisableBackupsByTag. -func (mr *MockDropletActionsServiceMockRecorder) DisableBackupsByTag(arg0 interface{}) *gomock.Call { +func (mr *MockDropletActionsServiceMockRecorder) DisableBackupsByTag(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DisableBackupsByTag", reflect.TypeOf((*MockDropletActionsService)(nil).DisableBackupsByTag), arg0) } @@ -89,7 +93,7 @@ func (m *MockDropletActionsService) EnableBackups(arg0 int) (*do.Action, error) } // EnableBackups indicates an expected call of EnableBackups. -func (mr *MockDropletActionsServiceMockRecorder) EnableBackups(arg0 interface{}) *gomock.Call { +func (mr *MockDropletActionsServiceMockRecorder) EnableBackups(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnableBackups", reflect.TypeOf((*MockDropletActionsService)(nil).EnableBackups), arg0) } @@ -104,7 +108,7 @@ func (m *MockDropletActionsService) EnableBackupsByTag(arg0 string) (do.Actions, } // EnableBackupsByTag indicates an expected call of EnableBackupsByTag. -func (mr *MockDropletActionsServiceMockRecorder) EnableBackupsByTag(arg0 interface{}) *gomock.Call { +func (mr *MockDropletActionsServiceMockRecorder) EnableBackupsByTag(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnableBackupsByTag", reflect.TypeOf((*MockDropletActionsService)(nil).EnableBackupsByTag), arg0) } @@ -119,7 +123,7 @@ func (m *MockDropletActionsService) EnableIPv6(arg0 int) (*do.Action, error) { } // EnableIPv6 indicates an expected call of EnableIPv6. -func (mr *MockDropletActionsServiceMockRecorder) EnableIPv6(arg0 interface{}) *gomock.Call { +func (mr *MockDropletActionsServiceMockRecorder) EnableIPv6(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnableIPv6", reflect.TypeOf((*MockDropletActionsService)(nil).EnableIPv6), arg0) } @@ -134,7 +138,7 @@ func (m *MockDropletActionsService) EnableIPv6ByTag(arg0 string) (do.Actions, er } // EnableIPv6ByTag indicates an expected call of EnableIPv6ByTag. -func (mr *MockDropletActionsServiceMockRecorder) EnableIPv6ByTag(arg0 interface{}) *gomock.Call { +func (mr *MockDropletActionsServiceMockRecorder) EnableIPv6ByTag(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnableIPv6ByTag", reflect.TypeOf((*MockDropletActionsService)(nil).EnableIPv6ByTag), arg0) } @@ -149,7 +153,7 @@ func (m *MockDropletActionsService) EnablePrivateNetworking(arg0 int) (*do.Actio } // EnablePrivateNetworking indicates an expected call of EnablePrivateNetworking. -func (mr *MockDropletActionsServiceMockRecorder) EnablePrivateNetworking(arg0 interface{}) *gomock.Call { +func (mr *MockDropletActionsServiceMockRecorder) EnablePrivateNetworking(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnablePrivateNetworking", reflect.TypeOf((*MockDropletActionsService)(nil).EnablePrivateNetworking), arg0) } @@ -164,7 +168,7 @@ func (m *MockDropletActionsService) EnablePrivateNetworkingByTag(arg0 string) (d } // EnablePrivateNetworkingByTag indicates an expected call of EnablePrivateNetworkingByTag. -func (mr *MockDropletActionsServiceMockRecorder) EnablePrivateNetworkingByTag(arg0 interface{}) *gomock.Call { +func (mr *MockDropletActionsServiceMockRecorder) EnablePrivateNetworkingByTag(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnablePrivateNetworkingByTag", reflect.TypeOf((*MockDropletActionsService)(nil).EnablePrivateNetworkingByTag), arg0) } @@ -179,7 +183,7 @@ func (m *MockDropletActionsService) Get(arg0, arg1 int) (*do.Action, error) { } // Get indicates an expected call of Get. -func (mr *MockDropletActionsServiceMockRecorder) Get(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockDropletActionsServiceMockRecorder) Get(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockDropletActionsService)(nil).Get), arg0, arg1) } @@ -194,7 +198,7 @@ func (m *MockDropletActionsService) GetByURI(arg0 string) (*do.Action, error) { } // GetByURI indicates an expected call of GetByURI. -func (mr *MockDropletActionsServiceMockRecorder) GetByURI(arg0 interface{}) *gomock.Call { +func (mr *MockDropletActionsServiceMockRecorder) GetByURI(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByURI", reflect.TypeOf((*MockDropletActionsService)(nil).GetByURI), arg0) } @@ -209,7 +213,7 @@ func (m *MockDropletActionsService) PasswordReset(arg0 int) (*do.Action, error) } // PasswordReset indicates an expected call of PasswordReset. -func (mr *MockDropletActionsServiceMockRecorder) PasswordReset(arg0 interface{}) *gomock.Call { +func (mr *MockDropletActionsServiceMockRecorder) PasswordReset(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PasswordReset", reflect.TypeOf((*MockDropletActionsService)(nil).PasswordReset), arg0) } @@ -224,7 +228,7 @@ func (m *MockDropletActionsService) PowerCycle(arg0 int) (*do.Action, error) { } // PowerCycle indicates an expected call of PowerCycle. -func (mr *MockDropletActionsServiceMockRecorder) PowerCycle(arg0 interface{}) *gomock.Call { +func (mr *MockDropletActionsServiceMockRecorder) PowerCycle(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PowerCycle", reflect.TypeOf((*MockDropletActionsService)(nil).PowerCycle), arg0) } @@ -239,7 +243,7 @@ func (m *MockDropletActionsService) PowerCycleByTag(arg0 string) (do.Actions, er } // PowerCycleByTag indicates an expected call of PowerCycleByTag. -func (mr *MockDropletActionsServiceMockRecorder) PowerCycleByTag(arg0 interface{}) *gomock.Call { +func (mr *MockDropletActionsServiceMockRecorder) PowerCycleByTag(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PowerCycleByTag", reflect.TypeOf((*MockDropletActionsService)(nil).PowerCycleByTag), arg0) } @@ -254,7 +258,7 @@ func (m *MockDropletActionsService) PowerOff(arg0 int) (*do.Action, error) { } // PowerOff indicates an expected call of PowerOff. -func (mr *MockDropletActionsServiceMockRecorder) PowerOff(arg0 interface{}) *gomock.Call { +func (mr *MockDropletActionsServiceMockRecorder) PowerOff(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PowerOff", reflect.TypeOf((*MockDropletActionsService)(nil).PowerOff), arg0) } @@ -269,7 +273,7 @@ func (m *MockDropletActionsService) PowerOffByTag(arg0 string) (do.Actions, erro } // PowerOffByTag indicates an expected call of PowerOffByTag. -func (mr *MockDropletActionsServiceMockRecorder) PowerOffByTag(arg0 interface{}) *gomock.Call { +func (mr *MockDropletActionsServiceMockRecorder) PowerOffByTag(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PowerOffByTag", reflect.TypeOf((*MockDropletActionsService)(nil).PowerOffByTag), arg0) } @@ -284,7 +288,7 @@ func (m *MockDropletActionsService) PowerOn(arg0 int) (*do.Action, error) { } // PowerOn indicates an expected call of PowerOn. -func (mr *MockDropletActionsServiceMockRecorder) PowerOn(arg0 interface{}) *gomock.Call { +func (mr *MockDropletActionsServiceMockRecorder) PowerOn(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PowerOn", reflect.TypeOf((*MockDropletActionsService)(nil).PowerOn), arg0) } @@ -299,7 +303,7 @@ func (m *MockDropletActionsService) PowerOnByTag(arg0 string) (do.Actions, error } // PowerOnByTag indicates an expected call of PowerOnByTag. -func (mr *MockDropletActionsServiceMockRecorder) PowerOnByTag(arg0 interface{}) *gomock.Call { +func (mr *MockDropletActionsServiceMockRecorder) PowerOnByTag(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PowerOnByTag", reflect.TypeOf((*MockDropletActionsService)(nil).PowerOnByTag), arg0) } @@ -314,7 +318,7 @@ func (m *MockDropletActionsService) Reboot(arg0 int) (*do.Action, error) { } // Reboot indicates an expected call of Reboot. -func (mr *MockDropletActionsServiceMockRecorder) Reboot(arg0 interface{}) *gomock.Call { +func (mr *MockDropletActionsServiceMockRecorder) Reboot(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reboot", reflect.TypeOf((*MockDropletActionsService)(nil).Reboot), arg0) } @@ -329,7 +333,7 @@ func (m *MockDropletActionsService) RebuildByImageID(arg0, arg1 int) (*do.Action } // RebuildByImageID indicates an expected call of RebuildByImageID. -func (mr *MockDropletActionsServiceMockRecorder) RebuildByImageID(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockDropletActionsServiceMockRecorder) RebuildByImageID(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RebuildByImageID", reflect.TypeOf((*MockDropletActionsService)(nil).RebuildByImageID), arg0, arg1) } @@ -344,7 +348,7 @@ func (m *MockDropletActionsService) RebuildByImageSlug(arg0 int, arg1 string) (* } // RebuildByImageSlug indicates an expected call of RebuildByImageSlug. -func (mr *MockDropletActionsServiceMockRecorder) RebuildByImageSlug(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockDropletActionsServiceMockRecorder) RebuildByImageSlug(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RebuildByImageSlug", reflect.TypeOf((*MockDropletActionsService)(nil).RebuildByImageSlug), arg0, arg1) } @@ -359,7 +363,7 @@ func (m *MockDropletActionsService) Rename(arg0 int, arg1 string) (*do.Action, e } // Rename indicates an expected call of Rename. -func (mr *MockDropletActionsServiceMockRecorder) Rename(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockDropletActionsServiceMockRecorder) Rename(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Rename", reflect.TypeOf((*MockDropletActionsService)(nil).Rename), arg0, arg1) } @@ -374,7 +378,7 @@ func (m *MockDropletActionsService) Resize(arg0 int, arg1 string, arg2 bool) (*d } // Resize indicates an expected call of Resize. -func (mr *MockDropletActionsServiceMockRecorder) Resize(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockDropletActionsServiceMockRecorder) Resize(arg0, arg1, arg2 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Resize", reflect.TypeOf((*MockDropletActionsService)(nil).Resize), arg0, arg1, arg2) } @@ -389,7 +393,7 @@ func (m *MockDropletActionsService) Restore(arg0, arg1 int) (*do.Action, error) } // Restore indicates an expected call of Restore. -func (mr *MockDropletActionsServiceMockRecorder) Restore(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockDropletActionsServiceMockRecorder) Restore(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Restore", reflect.TypeOf((*MockDropletActionsService)(nil).Restore), arg0, arg1) } @@ -404,7 +408,7 @@ func (m *MockDropletActionsService) Shutdown(arg0 int) (*do.Action, error) { } // Shutdown indicates an expected call of Shutdown. -func (mr *MockDropletActionsServiceMockRecorder) Shutdown(arg0 interface{}) *gomock.Call { +func (mr *MockDropletActionsServiceMockRecorder) Shutdown(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Shutdown", reflect.TypeOf((*MockDropletActionsService)(nil).Shutdown), arg0) } @@ -419,7 +423,7 @@ func (m *MockDropletActionsService) ShutdownByTag(arg0 string) (do.Actions, erro } // ShutdownByTag indicates an expected call of ShutdownByTag. -func (mr *MockDropletActionsServiceMockRecorder) ShutdownByTag(arg0 interface{}) *gomock.Call { +func (mr *MockDropletActionsServiceMockRecorder) ShutdownByTag(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ShutdownByTag", reflect.TypeOf((*MockDropletActionsService)(nil).ShutdownByTag), arg0) } @@ -434,7 +438,7 @@ func (m *MockDropletActionsService) Snapshot(arg0 int, arg1 string) (*do.Action, } // Snapshot indicates an expected call of Snapshot. -func (mr *MockDropletActionsServiceMockRecorder) Snapshot(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockDropletActionsServiceMockRecorder) Snapshot(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Snapshot", reflect.TypeOf((*MockDropletActionsService)(nil).Snapshot), arg0, arg1) } @@ -449,7 +453,7 @@ func (m *MockDropletActionsService) SnapshotByTag(arg0, arg1 string) (do.Actions } // SnapshotByTag indicates an expected call of SnapshotByTag. -func (mr *MockDropletActionsServiceMockRecorder) SnapshotByTag(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockDropletActionsServiceMockRecorder) SnapshotByTag(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SnapshotByTag", reflect.TypeOf((*MockDropletActionsService)(nil).SnapshotByTag), arg0, arg1) } diff --git a/do/mocks/DropletsService.go b/do/mocks/DropletsService.go index 87b7ae8cf..8ab49a95d 100644 --- a/do/mocks/DropletsService.go +++ b/do/mocks/DropletsService.go @@ -1,6 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: droplets.go - +// +// Generated by this command: +// +// mockgen -source droplets.go -package=mocks DropletsService +// // Package mocks is a generated GoMock package. package mocks @@ -45,7 +49,7 @@ func (m *MockDropletsService) Actions(arg0 int) (do.Actions, error) { } // Actions indicates an expected call of Actions. -func (mr *MockDropletsServiceMockRecorder) Actions(arg0 interface{}) *gomock.Call { +func (mr *MockDropletsServiceMockRecorder) Actions(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Actions", reflect.TypeOf((*MockDropletsService)(nil).Actions), arg0) } @@ -60,7 +64,7 @@ func (m *MockDropletsService) Backups(arg0 int) (do.Images, error) { } // Backups indicates an expected call of Backups. -func (mr *MockDropletsServiceMockRecorder) Backups(arg0 interface{}) *gomock.Call { +func (mr *MockDropletsServiceMockRecorder) Backups(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Backups", reflect.TypeOf((*MockDropletsService)(nil).Backups), arg0) } @@ -75,7 +79,7 @@ func (m *MockDropletsService) Create(arg0 *godo.DropletCreateRequest, arg1 bool) } // Create indicates an expected call of Create. -func (mr *MockDropletsServiceMockRecorder) Create(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockDropletsServiceMockRecorder) Create(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockDropletsService)(nil).Create), arg0, arg1) } @@ -90,7 +94,7 @@ func (m *MockDropletsService) CreateMultiple(arg0 *godo.DropletMultiCreateReques } // CreateMultiple indicates an expected call of CreateMultiple. -func (mr *MockDropletsServiceMockRecorder) CreateMultiple(arg0 interface{}) *gomock.Call { +func (mr *MockDropletsServiceMockRecorder) CreateMultiple(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateMultiple", reflect.TypeOf((*MockDropletsService)(nil).CreateMultiple), arg0) } @@ -104,7 +108,7 @@ func (m *MockDropletsService) Delete(arg0 int) error { } // Delete indicates an expected call of Delete. -func (mr *MockDropletsServiceMockRecorder) Delete(arg0 interface{}) *gomock.Call { +func (mr *MockDropletsServiceMockRecorder) Delete(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockDropletsService)(nil).Delete), arg0) } @@ -118,7 +122,7 @@ func (m *MockDropletsService) DeleteByTag(arg0 string) error { } // DeleteByTag indicates an expected call of DeleteByTag. -func (mr *MockDropletsServiceMockRecorder) DeleteByTag(arg0 interface{}) *gomock.Call { +func (mr *MockDropletsServiceMockRecorder) DeleteByTag(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteByTag", reflect.TypeOf((*MockDropletsService)(nil).DeleteByTag), arg0) } @@ -133,7 +137,7 @@ func (m *MockDropletsService) Get(arg0 int) (*do.Droplet, error) { } // Get indicates an expected call of Get. -func (mr *MockDropletsServiceMockRecorder) Get(arg0 interface{}) *gomock.Call { +func (mr *MockDropletsServiceMockRecorder) Get(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockDropletsService)(nil).Get), arg0) } @@ -148,7 +152,7 @@ func (m *MockDropletsService) Kernels(arg0 int) (do.Kernels, error) { } // Kernels indicates an expected call of Kernels. -func (mr *MockDropletsServiceMockRecorder) Kernels(arg0 interface{}) *gomock.Call { +func (mr *MockDropletsServiceMockRecorder) Kernels(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kernels", reflect.TypeOf((*MockDropletsService)(nil).Kernels), arg0) } @@ -178,7 +182,7 @@ func (m *MockDropletsService) ListByTag(arg0 string) (do.Droplets, error) { } // ListByTag indicates an expected call of ListByTag. -func (mr *MockDropletsServiceMockRecorder) ListByTag(arg0 interface{}) *gomock.Call { +func (mr *MockDropletsServiceMockRecorder) ListByTag(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListByTag", reflect.TypeOf((*MockDropletsService)(nil).ListByTag), arg0) } @@ -193,7 +197,7 @@ func (m *MockDropletsService) Neighbors(arg0 int) (do.Droplets, error) { } // Neighbors indicates an expected call of Neighbors. -func (mr *MockDropletsServiceMockRecorder) Neighbors(arg0 interface{}) *gomock.Call { +func (mr *MockDropletsServiceMockRecorder) Neighbors(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Neighbors", reflect.TypeOf((*MockDropletsService)(nil).Neighbors), arg0) } @@ -208,7 +212,7 @@ func (m *MockDropletsService) Snapshots(arg0 int) (do.Images, error) { } // Snapshots indicates an expected call of Snapshots. -func (mr *MockDropletsServiceMockRecorder) Snapshots(arg0 interface{}) *gomock.Call { +func (mr *MockDropletsServiceMockRecorder) Snapshots(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Snapshots", reflect.TypeOf((*MockDropletsService)(nil).Snapshots), arg0) } diff --git a/do/mocks/FirewallsService.go b/do/mocks/FirewallsService.go index 0e496c16a..84c1dca1e 100644 --- a/do/mocks/FirewallsService.go +++ b/do/mocks/FirewallsService.go @@ -1,6 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: firewalls.go - +// +// Generated by this command: +// +// mockgen -source firewalls.go -package=mocks FirewallsService +// // Package mocks is a generated GoMock package. package mocks @@ -38,7 +42,7 @@ func (m *MockFirewallsService) EXPECT() *MockFirewallsServiceMockRecorder { // AddDroplets mocks base method. func (m *MockFirewallsService) AddDroplets(fID string, dIDs ...int) error { m.ctrl.T.Helper() - varargs := []interface{}{fID} + varargs := []any{fID} for _, a := range dIDs { varargs = append(varargs, a) } @@ -48,9 +52,9 @@ func (m *MockFirewallsService) AddDroplets(fID string, dIDs ...int) error { } // AddDroplets indicates an expected call of AddDroplets. -func (mr *MockFirewallsServiceMockRecorder) AddDroplets(fID interface{}, dIDs ...interface{}) *gomock.Call { +func (mr *MockFirewallsServiceMockRecorder) AddDroplets(fID any, dIDs ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]interface{}{fID}, dIDs...) + varargs := append([]any{fID}, dIDs...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddDroplets", reflect.TypeOf((*MockFirewallsService)(nil).AddDroplets), varargs...) } @@ -63,7 +67,7 @@ func (m *MockFirewallsService) AddRules(fID string, rr *godo.FirewallRulesReques } // AddRules indicates an expected call of AddRules. -func (mr *MockFirewallsServiceMockRecorder) AddRules(fID, rr interface{}) *gomock.Call { +func (mr *MockFirewallsServiceMockRecorder) AddRules(fID, rr any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRules", reflect.TypeOf((*MockFirewallsService)(nil).AddRules), fID, rr) } @@ -71,7 +75,7 @@ func (mr *MockFirewallsServiceMockRecorder) AddRules(fID, rr interface{}) *gomoc // AddTags mocks base method. func (m *MockFirewallsService) AddTags(fID string, tags ...string) error { m.ctrl.T.Helper() - varargs := []interface{}{fID} + varargs := []any{fID} for _, a := range tags { varargs = append(varargs, a) } @@ -81,9 +85,9 @@ func (m *MockFirewallsService) AddTags(fID string, tags ...string) error { } // AddTags indicates an expected call of AddTags. -func (mr *MockFirewallsServiceMockRecorder) AddTags(fID interface{}, tags ...interface{}) *gomock.Call { +func (mr *MockFirewallsServiceMockRecorder) AddTags(fID any, tags ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]interface{}{fID}, tags...) + varargs := append([]any{fID}, tags...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddTags", reflect.TypeOf((*MockFirewallsService)(nil).AddTags), varargs...) } @@ -97,7 +101,7 @@ func (m *MockFirewallsService) Create(fr *godo.FirewallRequest) (*do.Firewall, e } // Create indicates an expected call of Create. -func (mr *MockFirewallsServiceMockRecorder) Create(fr interface{}) *gomock.Call { +func (mr *MockFirewallsServiceMockRecorder) Create(fr any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockFirewallsService)(nil).Create), fr) } @@ -111,7 +115,7 @@ func (m *MockFirewallsService) Delete(fID string) error { } // Delete indicates an expected call of Delete. -func (mr *MockFirewallsServiceMockRecorder) Delete(fID interface{}) *gomock.Call { +func (mr *MockFirewallsServiceMockRecorder) Delete(fID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockFirewallsService)(nil).Delete), fID) } @@ -126,7 +130,7 @@ func (m *MockFirewallsService) Get(fID string) (*do.Firewall, error) { } // Get indicates an expected call of Get. -func (mr *MockFirewallsServiceMockRecorder) Get(fID interface{}) *gomock.Call { +func (mr *MockFirewallsServiceMockRecorder) Get(fID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockFirewallsService)(nil).Get), fID) } @@ -156,7 +160,7 @@ func (m *MockFirewallsService) ListByDroplet(dID int) (do.Firewalls, error) { } // ListByDroplet indicates an expected call of ListByDroplet. -func (mr *MockFirewallsServiceMockRecorder) ListByDroplet(dID interface{}) *gomock.Call { +func (mr *MockFirewallsServiceMockRecorder) ListByDroplet(dID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListByDroplet", reflect.TypeOf((*MockFirewallsService)(nil).ListByDroplet), dID) } @@ -164,7 +168,7 @@ func (mr *MockFirewallsServiceMockRecorder) ListByDroplet(dID interface{}) *gomo // RemoveDroplets mocks base method. func (m *MockFirewallsService) RemoveDroplets(fID string, dIDs ...int) error { m.ctrl.T.Helper() - varargs := []interface{}{fID} + varargs := []any{fID} for _, a := range dIDs { varargs = append(varargs, a) } @@ -174,9 +178,9 @@ func (m *MockFirewallsService) RemoveDroplets(fID string, dIDs ...int) error { } // RemoveDroplets indicates an expected call of RemoveDroplets. -func (mr *MockFirewallsServiceMockRecorder) RemoveDroplets(fID interface{}, dIDs ...interface{}) *gomock.Call { +func (mr *MockFirewallsServiceMockRecorder) RemoveDroplets(fID any, dIDs ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]interface{}{fID}, dIDs...) + varargs := append([]any{fID}, dIDs...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveDroplets", reflect.TypeOf((*MockFirewallsService)(nil).RemoveDroplets), varargs...) } @@ -189,7 +193,7 @@ func (m *MockFirewallsService) RemoveRules(fID string, rr *godo.FirewallRulesReq } // RemoveRules indicates an expected call of RemoveRules. -func (mr *MockFirewallsServiceMockRecorder) RemoveRules(fID, rr interface{}) *gomock.Call { +func (mr *MockFirewallsServiceMockRecorder) RemoveRules(fID, rr any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveRules", reflect.TypeOf((*MockFirewallsService)(nil).RemoveRules), fID, rr) } @@ -197,7 +201,7 @@ func (mr *MockFirewallsServiceMockRecorder) RemoveRules(fID, rr interface{}) *go // RemoveTags mocks base method. func (m *MockFirewallsService) RemoveTags(fID string, tags ...string) error { m.ctrl.T.Helper() - varargs := []interface{}{fID} + varargs := []any{fID} for _, a := range tags { varargs = append(varargs, a) } @@ -207,9 +211,9 @@ func (m *MockFirewallsService) RemoveTags(fID string, tags ...string) error { } // RemoveTags indicates an expected call of RemoveTags. -func (mr *MockFirewallsServiceMockRecorder) RemoveTags(fID interface{}, tags ...interface{}) *gomock.Call { +func (mr *MockFirewallsServiceMockRecorder) RemoveTags(fID any, tags ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]interface{}{fID}, tags...) + varargs := append([]any{fID}, tags...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveTags", reflect.TypeOf((*MockFirewallsService)(nil).RemoveTags), varargs...) } @@ -223,7 +227,7 @@ func (m *MockFirewallsService) Update(fID string, fr *godo.FirewallRequest) (*do } // Update indicates an expected call of Update. -func (mr *MockFirewallsServiceMockRecorder) Update(fID, fr interface{}) *gomock.Call { +func (mr *MockFirewallsServiceMockRecorder) Update(fID, fr any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockFirewallsService)(nil).Update), fID, fr) } diff --git a/do/mocks/ImageActionsService.go b/do/mocks/ImageActionsService.go index ccf47e842..3ec020670 100644 --- a/do/mocks/ImageActionsService.go +++ b/do/mocks/ImageActionsService.go @@ -1,6 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: image_actions.go - +// +// Generated by this command: +// +// mockgen -source image_actions.go -package=mocks ImageActionsService +// // Package mocks is a generated GoMock package. package mocks @@ -45,7 +49,7 @@ func (m *MockImageActionsService) Convert(arg0 int) (*do.Action, error) { } // Convert indicates an expected call of Convert. -func (mr *MockImageActionsServiceMockRecorder) Convert(arg0 interface{}) *gomock.Call { +func (mr *MockImageActionsServiceMockRecorder) Convert(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Convert", reflect.TypeOf((*MockImageActionsService)(nil).Convert), arg0) } @@ -60,7 +64,7 @@ func (m *MockImageActionsService) Get(arg0, arg1 int) (*do.Action, error) { } // Get indicates an expected call of Get. -func (mr *MockImageActionsServiceMockRecorder) Get(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockImageActionsServiceMockRecorder) Get(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockImageActionsService)(nil).Get), arg0, arg1) } @@ -75,7 +79,7 @@ func (m *MockImageActionsService) Transfer(arg0 int, arg1 *godo.ActionRequest) ( } // Transfer indicates an expected call of Transfer. -func (mr *MockImageActionsServiceMockRecorder) Transfer(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockImageActionsServiceMockRecorder) Transfer(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Transfer", reflect.TypeOf((*MockImageActionsService)(nil).Transfer), arg0, arg1) } diff --git a/do/mocks/ImageService.go b/do/mocks/ImageService.go index 0c04c40fe..aa81ebb1d 100644 --- a/do/mocks/ImageService.go +++ b/do/mocks/ImageService.go @@ -1,6 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: images.go - +// +// Generated by this command: +// +// mockgen -source images.go -package=mocks ImageService +// // Package mocks is a generated GoMock package. package mocks @@ -45,7 +49,7 @@ func (m *MockImagesService) Create(icr *godo.CustomImageCreateRequest) (*do.Imag } // Create indicates an expected call of Create. -func (mr *MockImagesServiceMockRecorder) Create(icr interface{}) *gomock.Call { +func (mr *MockImagesServiceMockRecorder) Create(icr any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockImagesService)(nil).Create), icr) } @@ -59,7 +63,7 @@ func (m *MockImagesService) Delete(id int) error { } // Delete indicates an expected call of Delete. -func (mr *MockImagesServiceMockRecorder) Delete(id interface{}) *gomock.Call { +func (mr *MockImagesServiceMockRecorder) Delete(id any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockImagesService)(nil).Delete), id) } @@ -74,7 +78,7 @@ func (m *MockImagesService) GetByID(id int) (*do.Image, error) { } // GetByID indicates an expected call of GetByID. -func (mr *MockImagesServiceMockRecorder) GetByID(id interface{}) *gomock.Call { +func (mr *MockImagesServiceMockRecorder) GetByID(id any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockImagesService)(nil).GetByID), id) } @@ -89,7 +93,7 @@ func (m *MockImagesService) GetBySlug(slug string) (*do.Image, error) { } // GetBySlug indicates an expected call of GetBySlug. -func (mr *MockImagesServiceMockRecorder) GetBySlug(slug interface{}) *gomock.Call { +func (mr *MockImagesServiceMockRecorder) GetBySlug(slug any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBySlug", reflect.TypeOf((*MockImagesService)(nil).GetBySlug), slug) } @@ -104,7 +108,7 @@ func (m *MockImagesService) List(public bool) (do.Images, error) { } // List indicates an expected call of List. -func (mr *MockImagesServiceMockRecorder) List(public interface{}) *gomock.Call { +func (mr *MockImagesServiceMockRecorder) List(public any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockImagesService)(nil).List), public) } @@ -119,7 +123,7 @@ func (m *MockImagesService) ListApplication(public bool) (do.Images, error) { } // ListApplication indicates an expected call of ListApplication. -func (mr *MockImagesServiceMockRecorder) ListApplication(public interface{}) *gomock.Call { +func (mr *MockImagesServiceMockRecorder) ListApplication(public any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListApplication", reflect.TypeOf((*MockImagesService)(nil).ListApplication), public) } @@ -134,7 +138,7 @@ func (m *MockImagesService) ListDistribution(public bool) (do.Images, error) { } // ListDistribution indicates an expected call of ListDistribution. -func (mr *MockImagesServiceMockRecorder) ListDistribution(public interface{}) *gomock.Call { +func (mr *MockImagesServiceMockRecorder) ListDistribution(public any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListDistribution", reflect.TypeOf((*MockImagesService)(nil).ListDistribution), public) } @@ -149,7 +153,7 @@ func (m *MockImagesService) ListUser(public bool) (do.Images, error) { } // ListUser indicates an expected call of ListUser. -func (mr *MockImagesServiceMockRecorder) ListUser(public interface{}) *gomock.Call { +func (mr *MockImagesServiceMockRecorder) ListUser(public any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListUser", reflect.TypeOf((*MockImagesService)(nil).ListUser), public) } @@ -164,7 +168,7 @@ func (m *MockImagesService) Update(id int, iur *godo.ImageUpdateRequest) (*do.Im } // Update indicates an expected call of Update. -func (mr *MockImagesServiceMockRecorder) Update(id, iur interface{}) *gomock.Call { +func (mr *MockImagesServiceMockRecorder) Update(id, iur any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockImagesService)(nil).Update), id, iur) } diff --git a/do/mocks/InvoicesService.go b/do/mocks/InvoicesService.go index 193005a0f..ae900fd72 100644 --- a/do/mocks/InvoicesService.go +++ b/do/mocks/InvoicesService.go @@ -1,6 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: invoices.go - +// +// Generated by this command: +// +// mockgen -source invoices.go -package=mocks InvoicesService +// // Package mocks is a generated GoMock package. package mocks @@ -44,7 +48,7 @@ func (m *MockInvoicesService) Get(arg0 string) (*do.Invoice, error) { } // Get indicates an expected call of Get. -func (mr *MockInvoicesServiceMockRecorder) Get(arg0 interface{}) *gomock.Call { +func (mr *MockInvoicesServiceMockRecorder) Get(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockInvoicesService)(nil).Get), arg0) } @@ -59,7 +63,7 @@ func (m *MockInvoicesService) GetCSV(arg0 string) ([]byte, error) { } // GetCSV indicates an expected call of GetCSV. -func (mr *MockInvoicesServiceMockRecorder) GetCSV(arg0 interface{}) *gomock.Call { +func (mr *MockInvoicesServiceMockRecorder) GetCSV(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCSV", reflect.TypeOf((*MockInvoicesService)(nil).GetCSV), arg0) } @@ -74,7 +78,7 @@ func (m *MockInvoicesService) GetPDF(arg0 string) ([]byte, error) { } // GetPDF indicates an expected call of GetPDF. -func (mr *MockInvoicesServiceMockRecorder) GetPDF(arg0 interface{}) *gomock.Call { +func (mr *MockInvoicesServiceMockRecorder) GetPDF(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPDF", reflect.TypeOf((*MockInvoicesService)(nil).GetPDF), arg0) } @@ -89,7 +93,7 @@ func (m *MockInvoicesService) GetSummary(arg0 string) (*do.InvoiceSummary, error } // GetSummary indicates an expected call of GetSummary. -func (mr *MockInvoicesServiceMockRecorder) GetSummary(arg0 interface{}) *gomock.Call { +func (mr *MockInvoicesServiceMockRecorder) GetSummary(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSummary", reflect.TypeOf((*MockInvoicesService)(nil).GetSummary), arg0) } diff --git a/do/mocks/KeysService.go b/do/mocks/KeysService.go index 722f2b472..b308cd5b6 100644 --- a/do/mocks/KeysService.go +++ b/do/mocks/KeysService.go @@ -1,6 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: sshkeys.go - +// +// Generated by this command: +// +// mockgen -source sshkeys.go -package=mocks KeysService +// // Package mocks is a generated GoMock package. package mocks @@ -45,7 +49,7 @@ func (m *MockKeysService) Create(kcr *godo.KeyCreateRequest) (*do.SSHKey, error) } // Create indicates an expected call of Create. -func (mr *MockKeysServiceMockRecorder) Create(kcr interface{}) *gomock.Call { +func (mr *MockKeysServiceMockRecorder) Create(kcr any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockKeysService)(nil).Create), kcr) } @@ -59,7 +63,7 @@ func (m *MockKeysService) Delete(id string) error { } // Delete indicates an expected call of Delete. -func (mr *MockKeysServiceMockRecorder) Delete(id interface{}) *gomock.Call { +func (mr *MockKeysServiceMockRecorder) Delete(id any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockKeysService)(nil).Delete), id) } @@ -74,7 +78,7 @@ func (m *MockKeysService) Get(id string) (*do.SSHKey, error) { } // Get indicates an expected call of Get. -func (mr *MockKeysServiceMockRecorder) Get(id interface{}) *gomock.Call { +func (mr *MockKeysServiceMockRecorder) Get(id any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockKeysService)(nil).Get), id) } @@ -104,7 +108,7 @@ func (m *MockKeysService) Update(id string, kur *godo.KeyUpdateRequest) (*do.SSH } // Update indicates an expected call of Update. -func (mr *MockKeysServiceMockRecorder) Update(id, kur interface{}) *gomock.Call { +func (mr *MockKeysServiceMockRecorder) Update(id, kur any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockKeysService)(nil).Update), id, kur) } diff --git a/do/mocks/KubernetesService.go b/do/mocks/KubernetesService.go index 001f230a4..97eaa9989 100644 --- a/do/mocks/KubernetesService.go +++ b/do/mocks/KubernetesService.go @@ -1,6 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: kubernetes.go - +// +// Generated by this command: +// +// mockgen -source kubernetes.go -package=mocks KubernetesService +// // Package mocks is a generated GoMock package. package mocks @@ -44,7 +48,7 @@ func (m *MockKubernetesService) AddRegistry(req *godo.KubernetesClusterRegistryR } // AddRegistry indicates an expected call of AddRegistry. -func (mr *MockKubernetesServiceMockRecorder) AddRegistry(req interface{}) *gomock.Call { +func (mr *MockKubernetesServiceMockRecorder) AddRegistry(req any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRegistry", reflect.TypeOf((*MockKubernetesService)(nil).AddRegistry), req) } @@ -59,7 +63,7 @@ func (m *MockKubernetesService) Create(create *godo.KubernetesClusterCreateReque } // Create indicates an expected call of Create. -func (mr *MockKubernetesServiceMockRecorder) Create(create interface{}) *gomock.Call { +func (mr *MockKubernetesServiceMockRecorder) Create(create any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockKubernetesService)(nil).Create), create) } @@ -74,7 +78,7 @@ func (m *MockKubernetesService) CreateNodePool(clusterID string, req *godo.Kuber } // CreateNodePool indicates an expected call of CreateNodePool. -func (mr *MockKubernetesServiceMockRecorder) CreateNodePool(clusterID, req interface{}) *gomock.Call { +func (mr *MockKubernetesServiceMockRecorder) CreateNodePool(clusterID, req any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateNodePool", reflect.TypeOf((*MockKubernetesService)(nil).CreateNodePool), clusterID, req) } @@ -88,7 +92,7 @@ func (m *MockKubernetesService) Delete(clusterID string) error { } // Delete indicates an expected call of Delete. -func (mr *MockKubernetesServiceMockRecorder) Delete(clusterID interface{}) *gomock.Call { +func (mr *MockKubernetesServiceMockRecorder) Delete(clusterID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockKubernetesService)(nil).Delete), clusterID) } @@ -102,7 +106,7 @@ func (m *MockKubernetesService) DeleteDangerous(clusterID string) error { } // DeleteDangerous indicates an expected call of DeleteDangerous. -func (mr *MockKubernetesServiceMockRecorder) DeleteDangerous(clusterID interface{}) *gomock.Call { +func (mr *MockKubernetesServiceMockRecorder) DeleteDangerous(clusterID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteDangerous", reflect.TypeOf((*MockKubernetesService)(nil).DeleteDangerous), clusterID) } @@ -116,7 +120,7 @@ func (m *MockKubernetesService) DeleteNode(clusterID, poolID, nodeID string, req } // DeleteNode indicates an expected call of DeleteNode. -func (mr *MockKubernetesServiceMockRecorder) DeleteNode(clusterID, poolID, nodeID, req interface{}) *gomock.Call { +func (mr *MockKubernetesServiceMockRecorder) DeleteNode(clusterID, poolID, nodeID, req any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteNode", reflect.TypeOf((*MockKubernetesService)(nil).DeleteNode), clusterID, poolID, nodeID, req) } @@ -130,7 +134,7 @@ func (m *MockKubernetesService) DeleteNodePool(clusterID, poolID string) error { } // DeleteNodePool indicates an expected call of DeleteNodePool. -func (mr *MockKubernetesServiceMockRecorder) DeleteNodePool(clusterID, poolID interface{}) *gomock.Call { +func (mr *MockKubernetesServiceMockRecorder) DeleteNodePool(clusterID, poolID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteNodePool", reflect.TypeOf((*MockKubernetesService)(nil).DeleteNodePool), clusterID, poolID) } @@ -144,7 +148,7 @@ func (m *MockKubernetesService) DeleteSelective(clusterID string, deleteReq *god } // DeleteSelective indicates an expected call of DeleteSelective. -func (mr *MockKubernetesServiceMockRecorder) DeleteSelective(clusterID, deleteReq interface{}) *gomock.Call { +func (mr *MockKubernetesServiceMockRecorder) DeleteSelective(clusterID, deleteReq any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteSelective", reflect.TypeOf((*MockKubernetesService)(nil).DeleteSelective), clusterID, deleteReq) } @@ -159,7 +163,7 @@ func (m *MockKubernetesService) Get(clusterID string) (*do.KubernetesCluster, er } // Get indicates an expected call of Get. -func (mr *MockKubernetesServiceMockRecorder) Get(clusterID interface{}) *gomock.Call { +func (mr *MockKubernetesServiceMockRecorder) Get(clusterID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockKubernetesService)(nil).Get), clusterID) } @@ -174,7 +178,7 @@ func (m *MockKubernetesService) GetCredentials(clusterID string) (*do.Kubernetes } // GetCredentials indicates an expected call of GetCredentials. -func (mr *MockKubernetesServiceMockRecorder) GetCredentials(clusterID interface{}) *gomock.Call { +func (mr *MockKubernetesServiceMockRecorder) GetCredentials(clusterID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCredentials", reflect.TypeOf((*MockKubernetesService)(nil).GetCredentials), clusterID) } @@ -189,7 +193,7 @@ func (m *MockKubernetesService) GetKubeConfig(clusterID string) ([]byte, error) } // GetKubeConfig indicates an expected call of GetKubeConfig. -func (mr *MockKubernetesServiceMockRecorder) GetKubeConfig(clusterID interface{}) *gomock.Call { +func (mr *MockKubernetesServiceMockRecorder) GetKubeConfig(clusterID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetKubeConfig", reflect.TypeOf((*MockKubernetesService)(nil).GetKubeConfig), clusterID) } @@ -204,7 +208,7 @@ func (m *MockKubernetesService) GetKubeConfigWithExpiry(clusterID string, expiry } // GetKubeConfigWithExpiry indicates an expected call of GetKubeConfigWithExpiry. -func (mr *MockKubernetesServiceMockRecorder) GetKubeConfigWithExpiry(clusterID, expirySeconds interface{}) *gomock.Call { +func (mr *MockKubernetesServiceMockRecorder) GetKubeConfigWithExpiry(clusterID, expirySeconds any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetKubeConfigWithExpiry", reflect.TypeOf((*MockKubernetesService)(nil).GetKubeConfigWithExpiry), clusterID, expirySeconds) } @@ -219,7 +223,7 @@ func (m *MockKubernetesService) GetNodePool(clusterID, poolID string) (*do.Kuber } // GetNodePool indicates an expected call of GetNodePool. -func (mr *MockKubernetesServiceMockRecorder) GetNodePool(clusterID, poolID interface{}) *gomock.Call { +func (mr *MockKubernetesServiceMockRecorder) GetNodePool(clusterID, poolID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNodePool", reflect.TypeOf((*MockKubernetesService)(nil).GetNodePool), clusterID, poolID) } @@ -264,7 +268,7 @@ func (m *MockKubernetesService) GetUpgrades(clusterID string) (do.KubernetesVers } // GetUpgrades indicates an expected call of GetUpgrades. -func (mr *MockKubernetesServiceMockRecorder) GetUpgrades(clusterID interface{}) *gomock.Call { +func (mr *MockKubernetesServiceMockRecorder) GetUpgrades(clusterID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUpgrades", reflect.TypeOf((*MockKubernetesService)(nil).GetUpgrades), clusterID) } @@ -309,7 +313,7 @@ func (m *MockKubernetesService) ListAssociatedResourcesForDeletion(clusterID str } // ListAssociatedResourcesForDeletion indicates an expected call of ListAssociatedResourcesForDeletion. -func (mr *MockKubernetesServiceMockRecorder) ListAssociatedResourcesForDeletion(clusterID interface{}) *gomock.Call { +func (mr *MockKubernetesServiceMockRecorder) ListAssociatedResourcesForDeletion(clusterID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAssociatedResourcesForDeletion", reflect.TypeOf((*MockKubernetesService)(nil).ListAssociatedResourcesForDeletion), clusterID) } @@ -324,7 +328,7 @@ func (m *MockKubernetesService) ListNodePools(clusterID string) (do.KubernetesNo } // ListNodePools indicates an expected call of ListNodePools. -func (mr *MockKubernetesServiceMockRecorder) ListNodePools(clusterID interface{}) *gomock.Call { +func (mr *MockKubernetesServiceMockRecorder) ListNodePools(clusterID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListNodePools", reflect.TypeOf((*MockKubernetesService)(nil).ListNodePools), clusterID) } @@ -338,7 +342,7 @@ func (m *MockKubernetesService) RecycleNodePoolNodes(clusterID, poolID string, r } // RecycleNodePoolNodes indicates an expected call of RecycleNodePoolNodes. -func (mr *MockKubernetesServiceMockRecorder) RecycleNodePoolNodes(clusterID, poolID, req interface{}) *gomock.Call { +func (mr *MockKubernetesServiceMockRecorder) RecycleNodePoolNodes(clusterID, poolID, req any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecycleNodePoolNodes", reflect.TypeOf((*MockKubernetesService)(nil).RecycleNodePoolNodes), clusterID, poolID, req) } @@ -352,7 +356,7 @@ func (m *MockKubernetesService) RemoveRegistry(req *godo.KubernetesClusterRegist } // RemoveRegistry indicates an expected call of RemoveRegistry. -func (mr *MockKubernetesServiceMockRecorder) RemoveRegistry(req interface{}) *gomock.Call { +func (mr *MockKubernetesServiceMockRecorder) RemoveRegistry(req any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveRegistry", reflect.TypeOf((*MockKubernetesService)(nil).RemoveRegistry), req) } @@ -367,7 +371,7 @@ func (m *MockKubernetesService) Update(clusterID string, update *godo.Kubernetes } // Update indicates an expected call of Update. -func (mr *MockKubernetesServiceMockRecorder) Update(clusterID, update interface{}) *gomock.Call { +func (mr *MockKubernetesServiceMockRecorder) Update(clusterID, update any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockKubernetesService)(nil).Update), clusterID, update) } @@ -382,7 +386,7 @@ func (m *MockKubernetesService) UpdateNodePool(clusterID, poolID string, req *go } // UpdateNodePool indicates an expected call of UpdateNodePool. -func (mr *MockKubernetesServiceMockRecorder) UpdateNodePool(clusterID, poolID, req interface{}) *gomock.Call { +func (mr *MockKubernetesServiceMockRecorder) UpdateNodePool(clusterID, poolID, req any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateNodePool", reflect.TypeOf((*MockKubernetesService)(nil).UpdateNodePool), clusterID, poolID, req) } @@ -396,7 +400,7 @@ func (m *MockKubernetesService) Upgrade(clusterID, versionSlug string) error { } // Upgrade indicates an expected call of Upgrade. -func (mr *MockKubernetesServiceMockRecorder) Upgrade(clusterID, versionSlug interface{}) *gomock.Call { +func (mr *MockKubernetesServiceMockRecorder) Upgrade(clusterID, versionSlug any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Upgrade", reflect.TypeOf((*MockKubernetesService)(nil).Upgrade), clusterID, versionSlug) } diff --git a/do/mocks/Listen.go b/do/mocks/Listen.go index 156e56855..c627bc062 100644 --- a/do/mocks/Listen.go +++ b/do/mocks/Listen.go @@ -1,6 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: ../pkg/listen/listen.go - +// +// Generated by this command: +// +// mockgen -source ../pkg/listen/listen.go -package=mocks Listen +// // Package mocks is a generated GoMock package. package mocks diff --git a/do/mocks/LoadBalancersService.go b/do/mocks/LoadBalancersService.go index 0f46533f6..069e23991 100644 --- a/do/mocks/LoadBalancersService.go +++ b/do/mocks/LoadBalancersService.go @@ -1,6 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: load_balancers.go - +// +// Generated by this command: +// +// mockgen -source load_balancers.go -package=mocks LoadBalancersService +// // Package mocks is a generated GoMock package. package mocks @@ -38,7 +42,7 @@ func (m *MockLoadBalancersService) EXPECT() *MockLoadBalancersServiceMockRecorde // AddDroplets mocks base method. func (m *MockLoadBalancersService) AddDroplets(lbID string, dIDs ...int) error { m.ctrl.T.Helper() - varargs := []interface{}{lbID} + varargs := []any{lbID} for _, a := range dIDs { varargs = append(varargs, a) } @@ -48,16 +52,16 @@ func (m *MockLoadBalancersService) AddDroplets(lbID string, dIDs ...int) error { } // AddDroplets indicates an expected call of AddDroplets. -func (mr *MockLoadBalancersServiceMockRecorder) AddDroplets(lbID interface{}, dIDs ...interface{}) *gomock.Call { +func (mr *MockLoadBalancersServiceMockRecorder) AddDroplets(lbID any, dIDs ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]interface{}{lbID}, dIDs...) + varargs := append([]any{lbID}, dIDs...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddDroplets", reflect.TypeOf((*MockLoadBalancersService)(nil).AddDroplets), varargs...) } // AddForwardingRules mocks base method. func (m *MockLoadBalancersService) AddForwardingRules(lbID string, rules ...godo.ForwardingRule) error { m.ctrl.T.Helper() - varargs := []interface{}{lbID} + varargs := []any{lbID} for _, a := range rules { varargs = append(varargs, a) } @@ -67,9 +71,9 @@ func (m *MockLoadBalancersService) AddForwardingRules(lbID string, rules ...godo } // AddForwardingRules indicates an expected call of AddForwardingRules. -func (mr *MockLoadBalancersServiceMockRecorder) AddForwardingRules(lbID interface{}, rules ...interface{}) *gomock.Call { +func (mr *MockLoadBalancersServiceMockRecorder) AddForwardingRules(lbID any, rules ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]interface{}{lbID}, rules...) + varargs := append([]any{lbID}, rules...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddForwardingRules", reflect.TypeOf((*MockLoadBalancersService)(nil).AddForwardingRules), varargs...) } @@ -83,7 +87,7 @@ func (m *MockLoadBalancersService) Create(lbr *godo.LoadBalancerRequest) (*do.Lo } // Create indicates an expected call of Create. -func (mr *MockLoadBalancersServiceMockRecorder) Create(lbr interface{}) *gomock.Call { +func (mr *MockLoadBalancersServiceMockRecorder) Create(lbr any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockLoadBalancersService)(nil).Create), lbr) } @@ -97,7 +101,7 @@ func (m *MockLoadBalancersService) Delete(lbID string) error { } // Delete indicates an expected call of Delete. -func (mr *MockLoadBalancersServiceMockRecorder) Delete(lbID interface{}) *gomock.Call { +func (mr *MockLoadBalancersServiceMockRecorder) Delete(lbID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockLoadBalancersService)(nil).Delete), lbID) } @@ -112,7 +116,7 @@ func (m *MockLoadBalancersService) Get(lbID string) (*do.LoadBalancer, error) { } // Get indicates an expected call of Get. -func (mr *MockLoadBalancersServiceMockRecorder) Get(lbID interface{}) *gomock.Call { +func (mr *MockLoadBalancersServiceMockRecorder) Get(lbID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockLoadBalancersService)(nil).Get), lbID) } @@ -135,7 +139,7 @@ func (mr *MockLoadBalancersServiceMockRecorder) List() *gomock.Call { // RemoveDroplets mocks base method. func (m *MockLoadBalancersService) RemoveDroplets(lbID string, dIDs ...int) error { m.ctrl.T.Helper() - varargs := []interface{}{lbID} + varargs := []any{lbID} for _, a := range dIDs { varargs = append(varargs, a) } @@ -145,16 +149,16 @@ func (m *MockLoadBalancersService) RemoveDroplets(lbID string, dIDs ...int) erro } // RemoveDroplets indicates an expected call of RemoveDroplets. -func (mr *MockLoadBalancersServiceMockRecorder) RemoveDroplets(lbID interface{}, dIDs ...interface{}) *gomock.Call { +func (mr *MockLoadBalancersServiceMockRecorder) RemoveDroplets(lbID any, dIDs ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]interface{}{lbID}, dIDs...) + varargs := append([]any{lbID}, dIDs...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveDroplets", reflect.TypeOf((*MockLoadBalancersService)(nil).RemoveDroplets), varargs...) } // RemoveForwardingRules mocks base method. func (m *MockLoadBalancersService) RemoveForwardingRules(lbID string, rules ...godo.ForwardingRule) error { m.ctrl.T.Helper() - varargs := []interface{}{lbID} + varargs := []any{lbID} for _, a := range rules { varargs = append(varargs, a) } @@ -164,9 +168,9 @@ func (m *MockLoadBalancersService) RemoveForwardingRules(lbID string, rules ...g } // RemoveForwardingRules indicates an expected call of RemoveForwardingRules. -func (mr *MockLoadBalancersServiceMockRecorder) RemoveForwardingRules(lbID interface{}, rules ...interface{}) *gomock.Call { +func (mr *MockLoadBalancersServiceMockRecorder) RemoveForwardingRules(lbID any, rules ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]interface{}{lbID}, rules...) + varargs := append([]any{lbID}, rules...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveForwardingRules", reflect.TypeOf((*MockLoadBalancersService)(nil).RemoveForwardingRules), varargs...) } @@ -180,7 +184,7 @@ func (m *MockLoadBalancersService) Update(lbID string, lbr *godo.LoadBalancerReq } // Update indicates an expected call of Update. -func (mr *MockLoadBalancersServiceMockRecorder) Update(lbID, lbr interface{}) *gomock.Call { +func (mr *MockLoadBalancersServiceMockRecorder) Update(lbID, lbr any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockLoadBalancersService)(nil).Update), lbID, lbr) } diff --git a/do/mocks/MonitoringService.go b/do/mocks/MonitoringService.go index b63a09021..5313378de 100644 --- a/do/mocks/MonitoringService.go +++ b/do/mocks/MonitoringService.go @@ -1,6 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: monitoring.go - +// +// Generated by this command: +// +// mockgen -source monitoring.go -package=mocks MonitoringService +// // Package mocks is a generated GoMock package. package mocks @@ -45,7 +49,7 @@ func (m *MockMonitoringService) CreateAlertPolicy(request *godo.AlertPolicyCreat } // CreateAlertPolicy indicates an expected call of CreateAlertPolicy. -func (mr *MockMonitoringServiceMockRecorder) CreateAlertPolicy(request interface{}) *gomock.Call { +func (mr *MockMonitoringServiceMockRecorder) CreateAlertPolicy(request any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateAlertPolicy", reflect.TypeOf((*MockMonitoringService)(nil).CreateAlertPolicy), request) } @@ -59,7 +63,7 @@ func (m *MockMonitoringService) DeleteAlertPolicy(arg0 string) error { } // DeleteAlertPolicy indicates an expected call of DeleteAlertPolicy. -func (mr *MockMonitoringServiceMockRecorder) DeleteAlertPolicy(arg0 interface{}) *gomock.Call { +func (mr *MockMonitoringServiceMockRecorder) DeleteAlertPolicy(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteAlertPolicy", reflect.TypeOf((*MockMonitoringService)(nil).DeleteAlertPolicy), arg0) } @@ -74,7 +78,7 @@ func (m *MockMonitoringService) GetAlertPolicy(arg0 string) (*do.AlertPolicy, er } // GetAlertPolicy indicates an expected call of GetAlertPolicy. -func (mr *MockMonitoringServiceMockRecorder) GetAlertPolicy(arg0 interface{}) *gomock.Call { +func (mr *MockMonitoringServiceMockRecorder) GetAlertPolicy(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAlertPolicy", reflect.TypeOf((*MockMonitoringService)(nil).GetAlertPolicy), arg0) } @@ -104,7 +108,7 @@ func (m *MockMonitoringService) UpdateAlertPolicy(uuid string, request *godo.Ale } // UpdateAlertPolicy indicates an expected call of UpdateAlertPolicy. -func (mr *MockMonitoringServiceMockRecorder) UpdateAlertPolicy(uuid, request interface{}) *gomock.Call { +func (mr *MockMonitoringServiceMockRecorder) UpdateAlertPolicy(uuid, request any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateAlertPolicy", reflect.TypeOf((*MockMonitoringService)(nil).UpdateAlertPolicy), uuid, request) } diff --git a/do/mocks/OAuthService.go b/do/mocks/OAuthService.go index 3a133c651..a38d5a6e9 100644 --- a/do/mocks/OAuthService.go +++ b/do/mocks/OAuthService.go @@ -1,6 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: oauth.go - +// +// Generated by this command: +// +// mockgen -source oauth.go -package=mocks OAuthService +// // Package mocks is a generated GoMock package. package mocks @@ -44,7 +48,7 @@ func (m *MockOAuthService) TokenInfo(arg0 string) (*do.OAuthTokenInfo, error) { } // TokenInfo indicates an expected call of TokenInfo. -func (mr *MockOAuthServiceMockRecorder) TokenInfo(arg0 interface{}) *gomock.Call { +func (mr *MockOAuthServiceMockRecorder) TokenInfo(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TokenInfo", reflect.TypeOf((*MockOAuthService)(nil).TokenInfo), arg0) } diff --git a/do/mocks/OneClickService.go b/do/mocks/OneClickService.go index 970fcff5a..9aebeb0b6 100644 --- a/do/mocks/OneClickService.go +++ b/do/mocks/OneClickService.go @@ -1,6 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: 1_clicks.go - +// +// Generated by this command: +// +// mockgen -source 1_clicks.go -package=mocks OneClickService +// // Package mocks is a generated GoMock package. package mocks @@ -44,7 +48,7 @@ func (m *MockOneClickService) InstallKubernetes(arg0 string, arg1 []string) (str } // InstallKubernetes indicates an expected call of InstallKubernetes. -func (mr *MockOneClickServiceMockRecorder) InstallKubernetes(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockOneClickServiceMockRecorder) InstallKubernetes(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstallKubernetes", reflect.TypeOf((*MockOneClickService)(nil).InstallKubernetes), arg0, arg1) } @@ -59,7 +63,7 @@ func (m *MockOneClickService) List(arg0 string) (do.OneClicks, error) { } // List indicates an expected call of List. -func (mr *MockOneClickServiceMockRecorder) List(arg0 interface{}) *gomock.Call { +func (mr *MockOneClickServiceMockRecorder) List(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockOneClickService)(nil).List), arg0) } diff --git a/do/mocks/ProjectsService.go b/do/mocks/ProjectsService.go index 47071d28b..05be220b6 100644 --- a/do/mocks/ProjectsService.go +++ b/do/mocks/ProjectsService.go @@ -1,6 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: projects.go - +// +// Generated by this command: +// +// mockgen -source projects.go -package=mocks ProjectsService +// // Package mocks is a generated GoMock package. package mocks @@ -45,7 +49,7 @@ func (m *MockProjectsService) AssignResources(projectUUID string, resources []st } // AssignResources indicates an expected call of AssignResources. -func (mr *MockProjectsServiceMockRecorder) AssignResources(projectUUID, resources interface{}) *gomock.Call { +func (mr *MockProjectsServiceMockRecorder) AssignResources(projectUUID, resources any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignResources", reflect.TypeOf((*MockProjectsService)(nil).AssignResources), projectUUID, resources) } @@ -60,7 +64,7 @@ func (m *MockProjectsService) Create(arg0 *godo.CreateProjectRequest) (*do.Proje } // Create indicates an expected call of Create. -func (mr *MockProjectsServiceMockRecorder) Create(arg0 interface{}) *gomock.Call { +func (mr *MockProjectsServiceMockRecorder) Create(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockProjectsService)(nil).Create), arg0) } @@ -74,7 +78,7 @@ func (m *MockProjectsService) Delete(projectUUID string) error { } // Delete indicates an expected call of Delete. -func (mr *MockProjectsServiceMockRecorder) Delete(projectUUID interface{}) *gomock.Call { +func (mr *MockProjectsServiceMockRecorder) Delete(projectUUID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockProjectsService)(nil).Delete), projectUUID) } @@ -89,7 +93,7 @@ func (m *MockProjectsService) Get(projectUUID string) (*do.Project, error) { } // Get indicates an expected call of Get. -func (mr *MockProjectsServiceMockRecorder) Get(projectUUID interface{}) *gomock.Call { +func (mr *MockProjectsServiceMockRecorder) Get(projectUUID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockProjectsService)(nil).Get), projectUUID) } @@ -134,7 +138,7 @@ func (m *MockProjectsService) ListResources(projectUUID string) (do.ProjectResou } // ListResources indicates an expected call of ListResources. -func (mr *MockProjectsServiceMockRecorder) ListResources(projectUUID interface{}) *gomock.Call { +func (mr *MockProjectsServiceMockRecorder) ListResources(projectUUID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListResources", reflect.TypeOf((*MockProjectsService)(nil).ListResources), projectUUID) } @@ -149,7 +153,7 @@ func (m *MockProjectsService) Update(projectUUID string, req *godo.UpdateProject } // Update indicates an expected call of Update. -func (mr *MockProjectsServiceMockRecorder) Update(projectUUID, req interface{}) *gomock.Call { +func (mr *MockProjectsServiceMockRecorder) Update(projectUUID, req any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockProjectsService)(nil).Update), projectUUID, req) } diff --git a/do/mocks/RegionsService.go b/do/mocks/RegionsService.go index d6faad528..f2c0c7720 100644 --- a/do/mocks/RegionsService.go +++ b/do/mocks/RegionsService.go @@ -1,6 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: regions.go - +// +// Generated by this command: +// +// mockgen -source regions.go -package=mocks RegionsService +// // Package mocks is a generated GoMock package. package mocks diff --git a/do/mocks/RegistryService.go b/do/mocks/RegistryService.go index a075d0a9d..6071046a4 100644 --- a/do/mocks/RegistryService.go +++ b/do/mocks/RegistryService.go @@ -1,6 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: registry.go - +// +// Generated by this command: +// +// mockgen -source registry.go -package=mocks RegistryService +// // Package mocks is a generated GoMock package. package mocks @@ -45,7 +49,7 @@ func (m *MockRegistryService) CancelGarbageCollection(arg0, arg1 string) (*do.Ga } // CancelGarbageCollection indicates an expected call of CancelGarbageCollection. -func (mr *MockRegistryServiceMockRecorder) CancelGarbageCollection(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockRegistryServiceMockRecorder) CancelGarbageCollection(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelGarbageCollection", reflect.TypeOf((*MockRegistryService)(nil).CancelGarbageCollection), arg0, arg1) } @@ -60,7 +64,7 @@ func (m *MockRegistryService) Create(arg0 *godo.RegistryCreateRequest) (*do.Regi } // Create indicates an expected call of Create. -func (mr *MockRegistryServiceMockRecorder) Create(arg0 interface{}) *gomock.Call { +func (mr *MockRegistryServiceMockRecorder) Create(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockRegistryService)(nil).Create), arg0) } @@ -88,7 +92,7 @@ func (m *MockRegistryService) DeleteManifest(arg0, arg1, arg2 string) error { } // DeleteManifest indicates an expected call of DeleteManifest. -func (mr *MockRegistryServiceMockRecorder) DeleteManifest(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockRegistryServiceMockRecorder) DeleteManifest(arg0, arg1, arg2 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteManifest", reflect.TypeOf((*MockRegistryService)(nil).DeleteManifest), arg0, arg1, arg2) } @@ -102,7 +106,7 @@ func (m *MockRegistryService) DeleteTag(arg0, arg1, arg2 string) error { } // DeleteTag indicates an expected call of DeleteTag. -func (mr *MockRegistryServiceMockRecorder) DeleteTag(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockRegistryServiceMockRecorder) DeleteTag(arg0, arg1, arg2 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteTag", reflect.TypeOf((*MockRegistryService)(nil).DeleteTag), arg0, arg1, arg2) } @@ -117,7 +121,7 @@ func (m *MockRegistryService) DockerCredentials(arg0 *godo.RegistryDockerCredent } // DockerCredentials indicates an expected call of DockerCredentials. -func (mr *MockRegistryServiceMockRecorder) DockerCredentials(arg0 interface{}) *gomock.Call { +func (mr *MockRegistryServiceMockRecorder) DockerCredentials(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DockerCredentials", reflect.TypeOf((*MockRegistryService)(nil).DockerCredentials), arg0) } @@ -176,7 +180,7 @@ func (m *MockRegistryService) GetGarbageCollection(arg0 string) (*do.GarbageColl } // GetGarbageCollection indicates an expected call of GetGarbageCollection. -func (mr *MockRegistryServiceMockRecorder) GetGarbageCollection(arg0 interface{}) *gomock.Call { +func (mr *MockRegistryServiceMockRecorder) GetGarbageCollection(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetGarbageCollection", reflect.TypeOf((*MockRegistryService)(nil).GetGarbageCollection), arg0) } @@ -206,7 +210,7 @@ func (m *MockRegistryService) ListGarbageCollections(arg0 string) ([]do.GarbageC } // ListGarbageCollections indicates an expected call of ListGarbageCollections. -func (mr *MockRegistryServiceMockRecorder) ListGarbageCollections(arg0 interface{}) *gomock.Call { +func (mr *MockRegistryServiceMockRecorder) ListGarbageCollections(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListGarbageCollections", reflect.TypeOf((*MockRegistryService)(nil).ListGarbageCollections), arg0) } @@ -221,7 +225,7 @@ func (m *MockRegistryService) ListRepositories(arg0 string) ([]do.Repository, er } // ListRepositories indicates an expected call of ListRepositories. -func (mr *MockRegistryServiceMockRecorder) ListRepositories(arg0 interface{}) *gomock.Call { +func (mr *MockRegistryServiceMockRecorder) ListRepositories(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListRepositories", reflect.TypeOf((*MockRegistryService)(nil).ListRepositories), arg0) } @@ -236,7 +240,7 @@ func (m *MockRegistryService) ListRepositoriesV2(arg0 string) ([]do.RepositoryV2 } // ListRepositoriesV2 indicates an expected call of ListRepositoriesV2. -func (mr *MockRegistryServiceMockRecorder) ListRepositoriesV2(arg0 interface{}) *gomock.Call { +func (mr *MockRegistryServiceMockRecorder) ListRepositoriesV2(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListRepositoriesV2", reflect.TypeOf((*MockRegistryService)(nil).ListRepositoriesV2), arg0) } @@ -251,7 +255,7 @@ func (m *MockRegistryService) ListRepositoryManifests(arg0, arg1 string) ([]do.R } // ListRepositoryManifests indicates an expected call of ListRepositoryManifests. -func (mr *MockRegistryServiceMockRecorder) ListRepositoryManifests(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockRegistryServiceMockRecorder) ListRepositoryManifests(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListRepositoryManifests", reflect.TypeOf((*MockRegistryService)(nil).ListRepositoryManifests), arg0, arg1) } @@ -266,7 +270,7 @@ func (m *MockRegistryService) ListRepositoryTags(arg0, arg1 string) ([]do.Reposi } // ListRepositoryTags indicates an expected call of ListRepositoryTags. -func (mr *MockRegistryServiceMockRecorder) ListRepositoryTags(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockRegistryServiceMockRecorder) ListRepositoryTags(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListRepositoryTags", reflect.TypeOf((*MockRegistryService)(nil).ListRepositoryTags), arg0, arg1) } @@ -280,7 +284,7 @@ func (m *MockRegistryService) RevokeOAuthToken(token, endpoint string) error { } // RevokeOAuthToken indicates an expected call of RevokeOAuthToken. -func (mr *MockRegistryServiceMockRecorder) RevokeOAuthToken(token, endpoint interface{}) *gomock.Call { +func (mr *MockRegistryServiceMockRecorder) RevokeOAuthToken(token, endpoint any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RevokeOAuthToken", reflect.TypeOf((*MockRegistryService)(nil).RevokeOAuthToken), token, endpoint) } @@ -295,7 +299,7 @@ func (m *MockRegistryService) StartGarbageCollection(arg0 string, arg1 *godo.Sta } // StartGarbageCollection indicates an expected call of StartGarbageCollection. -func (mr *MockRegistryServiceMockRecorder) StartGarbageCollection(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockRegistryServiceMockRecorder) StartGarbageCollection(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartGarbageCollection", reflect.TypeOf((*MockRegistryService)(nil).StartGarbageCollection), arg0, arg1) } diff --git a/do/mocks/ReservedIPActionsService.go b/do/mocks/ReservedIPActionsService.go index 771a3f256..578490cb3 100644 --- a/do/mocks/ReservedIPActionsService.go +++ b/do/mocks/ReservedIPActionsService.go @@ -1,6 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: reserved_ip_actions.go - +// +// Generated by this command: +// +// mockgen -source reserved_ip_actions.go -package=mocks ReservedIPActionsService +// // Package mocks is a generated GoMock package. package mocks @@ -45,7 +49,7 @@ func (m *MockReservedIPActionsService) Assign(ip string, dropletID int) (*do.Act } // Assign indicates an expected call of Assign. -func (mr *MockReservedIPActionsServiceMockRecorder) Assign(ip, dropletID interface{}) *gomock.Call { +func (mr *MockReservedIPActionsServiceMockRecorder) Assign(ip, dropletID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Assign", reflect.TypeOf((*MockReservedIPActionsService)(nil).Assign), ip, dropletID) } @@ -60,7 +64,7 @@ func (m *MockReservedIPActionsService) Get(ip string, actionID int) (*do.Action, } // Get indicates an expected call of Get. -func (mr *MockReservedIPActionsServiceMockRecorder) Get(ip, actionID interface{}) *gomock.Call { +func (mr *MockReservedIPActionsServiceMockRecorder) Get(ip, actionID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockReservedIPActionsService)(nil).Get), ip, actionID) } @@ -75,7 +79,7 @@ func (m *MockReservedIPActionsService) List(ip string, opt *godo.ListOptions) ([ } // List indicates an expected call of List. -func (mr *MockReservedIPActionsServiceMockRecorder) List(ip, opt interface{}) *gomock.Call { +func (mr *MockReservedIPActionsServiceMockRecorder) List(ip, opt any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockReservedIPActionsService)(nil).List), ip, opt) } @@ -90,7 +94,7 @@ func (m *MockReservedIPActionsService) Unassign(ip string) (*do.Action, error) { } // Unassign indicates an expected call of Unassign. -func (mr *MockReservedIPActionsServiceMockRecorder) Unassign(ip interface{}) *gomock.Call { +func (mr *MockReservedIPActionsServiceMockRecorder) Unassign(ip any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unassign", reflect.TypeOf((*MockReservedIPActionsService)(nil).Unassign), ip) } diff --git a/do/mocks/ReservedIPsService.go b/do/mocks/ReservedIPsService.go index a0e2e1414..1ef849079 100644 --- a/do/mocks/ReservedIPsService.go +++ b/do/mocks/ReservedIPsService.go @@ -1,6 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: reserved_ips.go - +// +// Generated by this command: +// +// mockgen -source reserved_ips.go -package=mocks ReservedIPsService +// // Package mocks is a generated GoMock package. package mocks @@ -45,7 +49,7 @@ func (m *MockReservedIPsService) Create(ficr *godo.ReservedIPCreateRequest) (*do } // Create indicates an expected call of Create. -func (mr *MockReservedIPsServiceMockRecorder) Create(ficr interface{}) *gomock.Call { +func (mr *MockReservedIPsServiceMockRecorder) Create(ficr any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockReservedIPsService)(nil).Create), ficr) } @@ -59,7 +63,7 @@ func (m *MockReservedIPsService) Delete(ip string) error { } // Delete indicates an expected call of Delete. -func (mr *MockReservedIPsServiceMockRecorder) Delete(ip interface{}) *gomock.Call { +func (mr *MockReservedIPsServiceMockRecorder) Delete(ip any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockReservedIPsService)(nil).Delete), ip) } @@ -74,7 +78,7 @@ func (m *MockReservedIPsService) Get(ip string) (*do.ReservedIP, error) { } // Get indicates an expected call of Get. -func (mr *MockReservedIPsServiceMockRecorder) Get(ip interface{}) *gomock.Call { +func (mr *MockReservedIPsServiceMockRecorder) Get(ip any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockReservedIPsService)(nil).Get), ip) } diff --git a/do/mocks/Runner.go b/do/mocks/Runner.go index f27ef80fa..04cdce594 100644 --- a/do/mocks/Runner.go +++ b/do/mocks/Runner.go @@ -1,6 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: ../pkg/runner/runner.go - +// +// Generated by this command: +// +// mockgen -source ../pkg/runner/runner.go -package=mocks Runner +// // Package mocks is a generated GoMock package. package mocks diff --git a/do/mocks/ServerlessService.go b/do/mocks/ServerlessService.go index a83d1054d..be67deefb 100644 --- a/do/mocks/ServerlessService.go +++ b/do/mocks/ServerlessService.go @@ -1,6 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: serverless.go - +// +// Generated by this command: +// +// mockgen -source serverless.go -package=mocks ServerlessService +// // Package mocks is a generated GoMock package. package mocks @@ -75,7 +79,7 @@ func (m *MockServerlessService) Cmd(arg0 string, arg1 []string) (*exec.Cmd, erro } // Cmd indicates an expected call of Cmd. -func (mr *MockServerlessServiceMockRecorder) Cmd(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockServerlessServiceMockRecorder) Cmd(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cmd", reflect.TypeOf((*MockServerlessService)(nil).Cmd), arg0, arg1) } @@ -90,7 +94,7 @@ func (m *MockServerlessService) CreateNamespace(arg0 context.Context, arg1, arg2 } // CreateNamespace indicates an expected call of CreateNamespace. -func (mr *MockServerlessServiceMockRecorder) CreateNamespace(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockServerlessServiceMockRecorder) CreateNamespace(arg0, arg1, arg2 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateNamespace", reflect.TypeOf((*MockServerlessService)(nil).CreateNamespace), arg0, arg1, arg2) } @@ -118,7 +122,7 @@ func (m *MockServerlessService) DeleteFunction(arg0 string, arg1 bool) error { } // DeleteFunction indicates an expected call of DeleteFunction. -func (mr *MockServerlessServiceMockRecorder) DeleteFunction(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockServerlessServiceMockRecorder) DeleteFunction(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteFunction", reflect.TypeOf((*MockServerlessService)(nil).DeleteFunction), arg0, arg1) } @@ -132,7 +136,7 @@ func (m *MockServerlessService) DeleteNamespace(arg0 context.Context, arg1 strin } // DeleteNamespace indicates an expected call of DeleteNamespace. -func (mr *MockServerlessServiceMockRecorder) DeleteNamespace(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockServerlessServiceMockRecorder) DeleteNamespace(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteNamespace", reflect.TypeOf((*MockServerlessService)(nil).DeleteNamespace), arg0, arg1) } @@ -146,7 +150,7 @@ func (m *MockServerlessService) DeletePackage(arg0 string, arg1 bool) error { } // DeletePackage indicates an expected call of DeletePackage. -func (mr *MockServerlessServiceMockRecorder) DeletePackage(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockServerlessServiceMockRecorder) DeletePackage(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeletePackage", reflect.TypeOf((*MockServerlessService)(nil).DeletePackage), arg0, arg1) } @@ -160,7 +164,7 @@ func (m *MockServerlessService) DeleteTrigger(arg0 context.Context, arg1 string) } // DeleteTrigger indicates an expected call of DeleteTrigger. -func (mr *MockServerlessServiceMockRecorder) DeleteTrigger(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockServerlessServiceMockRecorder) DeleteTrigger(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteTrigger", reflect.TypeOf((*MockServerlessService)(nil).DeleteTrigger), arg0, arg1) } @@ -175,7 +179,7 @@ func (m *MockServerlessService) Exec(arg0 *exec.Cmd) (do.ServerlessOutput, error } // Exec indicates an expected call of Exec. -func (mr *MockServerlessServiceMockRecorder) Exec(arg0 interface{}) *gomock.Call { +func (mr *MockServerlessServiceMockRecorder) Exec(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Exec", reflect.TypeOf((*MockServerlessService)(nil).Exec), arg0) } @@ -190,7 +194,7 @@ func (m *MockServerlessService) GetActivation(arg0 string) (whisk.Activation, er } // GetActivation indicates an expected call of GetActivation. -func (mr *MockServerlessServiceMockRecorder) GetActivation(arg0 interface{}) *gomock.Call { +func (mr *MockServerlessServiceMockRecorder) GetActivation(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetActivation", reflect.TypeOf((*MockServerlessService)(nil).GetActivation), arg0) } @@ -205,7 +209,7 @@ func (m *MockServerlessService) GetActivationCount(arg0 whisk.ActivationCountOpt } // GetActivationCount indicates an expected call of GetActivationCount. -func (mr *MockServerlessServiceMockRecorder) GetActivationCount(arg0 interface{}) *gomock.Call { +func (mr *MockServerlessServiceMockRecorder) GetActivationCount(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetActivationCount", reflect.TypeOf((*MockServerlessService)(nil).GetActivationCount), arg0) } @@ -220,7 +224,7 @@ func (m *MockServerlessService) GetActivationLogs(arg0 string) (whisk.Activation } // GetActivationLogs indicates an expected call of GetActivationLogs. -func (mr *MockServerlessServiceMockRecorder) GetActivationLogs(arg0 interface{}) *gomock.Call { +func (mr *MockServerlessServiceMockRecorder) GetActivationLogs(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetActivationLogs", reflect.TypeOf((*MockServerlessService)(nil).GetActivationLogs), arg0) } @@ -235,7 +239,7 @@ func (m *MockServerlessService) GetActivationResult(arg0 string) (whisk.Response } // GetActivationResult indicates an expected call of GetActivationResult. -func (mr *MockServerlessServiceMockRecorder) GetActivationResult(arg0 interface{}) *gomock.Call { +func (mr *MockServerlessServiceMockRecorder) GetActivationResult(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetActivationResult", reflect.TypeOf((*MockServerlessService)(nil).GetActivationResult), arg0) } @@ -266,7 +270,7 @@ func (m *MockServerlessService) GetFunction(arg0 string, arg1 bool) (whisk.Actio } // GetFunction indicates an expected call of GetFunction. -func (mr *MockServerlessServiceMockRecorder) GetFunction(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockServerlessServiceMockRecorder) GetFunction(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetFunction", reflect.TypeOf((*MockServerlessService)(nil).GetFunction), arg0, arg1) } @@ -281,7 +285,7 @@ func (m *MockServerlessService) GetHostInfo(arg0 string) (do.ServerlessHostInfo, } // GetHostInfo indicates an expected call of GetHostInfo. -func (mr *MockServerlessServiceMockRecorder) GetHostInfo(arg0 interface{}) *gomock.Call { +func (mr *MockServerlessServiceMockRecorder) GetHostInfo(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetHostInfo", reflect.TypeOf((*MockServerlessService)(nil).GetHostInfo), arg0) } @@ -296,7 +300,7 @@ func (m *MockServerlessService) GetNamespace(arg0 context.Context, arg1 string) } // GetNamespace indicates an expected call of GetNamespace. -func (mr *MockServerlessServiceMockRecorder) GetNamespace(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockServerlessServiceMockRecorder) GetNamespace(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNamespace", reflect.TypeOf((*MockServerlessService)(nil).GetNamespace), arg0, arg1) } @@ -311,7 +315,7 @@ func (m *MockServerlessService) GetNamespaceFromCluster(arg0, arg1 string) (stri } // GetNamespaceFromCluster indicates an expected call of GetNamespaceFromCluster. -func (mr *MockServerlessServiceMockRecorder) GetNamespaceFromCluster(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockServerlessServiceMockRecorder) GetNamespaceFromCluster(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNamespaceFromCluster", reflect.TypeOf((*MockServerlessService)(nil).GetNamespaceFromCluster), arg0, arg1) } @@ -326,7 +330,7 @@ func (m *MockServerlessService) GetServerlessNamespace(arg0 context.Context) (do } // GetServerlessNamespace indicates an expected call of GetServerlessNamespace. -func (mr *MockServerlessServiceMockRecorder) GetServerlessNamespace(arg0 interface{}) *gomock.Call { +func (mr *MockServerlessServiceMockRecorder) GetServerlessNamespace(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetServerlessNamespace", reflect.TypeOf((*MockServerlessService)(nil).GetServerlessNamespace), arg0) } @@ -341,7 +345,7 @@ func (m *MockServerlessService) GetTrigger(arg0 context.Context, arg1 string) (d } // GetTrigger indicates an expected call of GetTrigger. -func (mr *MockServerlessServiceMockRecorder) GetTrigger(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockServerlessServiceMockRecorder) GetTrigger(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTrigger", reflect.TypeOf((*MockServerlessService)(nil).GetTrigger), arg0, arg1) } @@ -355,28 +359,28 @@ func (m *MockServerlessService) InstallServerless(arg0 string, arg1 bool) error } // InstallServerless indicates an expected call of InstallServerless. -func (mr *MockServerlessServiceMockRecorder) InstallServerless(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockServerlessServiceMockRecorder) InstallServerless(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstallServerless", reflect.TypeOf((*MockServerlessService)(nil).InstallServerless), arg0, arg1) } // InvokeFunction mocks base method. -func (m *MockServerlessService) InvokeFunction(arg0 string, arg1 interface{}, arg2, arg3 bool) (interface{}, error) { +func (m *MockServerlessService) InvokeFunction(arg0 string, arg1 any, arg2, arg3 bool) (any, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "InvokeFunction", arg0, arg1, arg2, arg3) - ret0, _ := ret[0].(interface{}) + ret0, _ := ret[0].(any) ret1, _ := ret[1].(error) return ret0, ret1 } // InvokeFunction indicates an expected call of InvokeFunction. -func (mr *MockServerlessServiceMockRecorder) InvokeFunction(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +func (mr *MockServerlessServiceMockRecorder) InvokeFunction(arg0, arg1, arg2, arg3 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InvokeFunction", reflect.TypeOf((*MockServerlessService)(nil).InvokeFunction), arg0, arg1, arg2, arg3) } // InvokeFunctionViaWeb mocks base method. -func (m *MockServerlessService) InvokeFunctionViaWeb(arg0 string, arg1 interface{}) error { +func (m *MockServerlessService) InvokeFunctionViaWeb(arg0 string, arg1 any) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "InvokeFunctionViaWeb", arg0, arg1) ret0, _ := ret[0].(error) @@ -384,7 +388,7 @@ func (m *MockServerlessService) InvokeFunctionViaWeb(arg0 string, arg1 interface } // InvokeFunctionViaWeb indicates an expected call of InvokeFunctionViaWeb. -func (mr *MockServerlessServiceMockRecorder) InvokeFunctionViaWeb(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockServerlessServiceMockRecorder) InvokeFunctionViaWeb(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InvokeFunctionViaWeb", reflect.TypeOf((*MockServerlessService)(nil).InvokeFunctionViaWeb), arg0, arg1) } @@ -399,7 +403,7 @@ func (m *MockServerlessService) ListActivations(arg0 whisk.ActivationListOptions } // ListActivations indicates an expected call of ListActivations. -func (mr *MockServerlessServiceMockRecorder) ListActivations(arg0 interface{}) *gomock.Call { +func (mr *MockServerlessServiceMockRecorder) ListActivations(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListActivations", reflect.TypeOf((*MockServerlessService)(nil).ListActivations), arg0) } @@ -414,7 +418,7 @@ func (m *MockServerlessService) ListFunctions(arg0 string, arg1, arg2 int) ([]wh } // ListFunctions indicates an expected call of ListFunctions. -func (mr *MockServerlessServiceMockRecorder) ListFunctions(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockServerlessServiceMockRecorder) ListFunctions(arg0, arg1, arg2 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListFunctions", reflect.TypeOf((*MockServerlessService)(nil).ListFunctions), arg0, arg1, arg2) } @@ -429,7 +433,7 @@ func (m *MockServerlessService) ListNamespaces(arg0 context.Context) (do.Namespa } // ListNamespaces indicates an expected call of ListNamespaces. -func (mr *MockServerlessServiceMockRecorder) ListNamespaces(arg0 interface{}) *gomock.Call { +func (mr *MockServerlessServiceMockRecorder) ListNamespaces(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListNamespaces", reflect.TypeOf((*MockServerlessService)(nil).ListNamespaces), arg0) } @@ -459,7 +463,7 @@ func (m *MockServerlessService) ListTriggers(arg0 context.Context, arg1 string) } // ListTriggers indicates an expected call of ListTriggers. -func (mr *MockServerlessServiceMockRecorder) ListTriggers(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockServerlessServiceMockRecorder) ListTriggers(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListTriggers", reflect.TypeOf((*MockServerlessService)(nil).ListTriggers), arg0, arg1) } @@ -489,7 +493,7 @@ func (m *MockServerlessService) ReadProject(arg0 *do.ServerlessProject, arg1 []s } // ReadProject indicates an expected call of ReadProject. -func (mr *MockServerlessServiceMockRecorder) ReadProject(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockServerlessServiceMockRecorder) ReadProject(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadProject", reflect.TypeOf((*MockServerlessService)(nil).ReadProject), arg0, arg1) } @@ -501,7 +505,7 @@ func (m *MockServerlessService) SetEffectiveCredentials(auth, apihost string) { } // SetEffectiveCredentials indicates an expected call of SetEffectiveCredentials. -func (mr *MockServerlessServiceMockRecorder) SetEffectiveCredentials(auth, apihost interface{}) *gomock.Call { +func (mr *MockServerlessServiceMockRecorder) SetEffectiveCredentials(auth, apihost any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetEffectiveCredentials", reflect.TypeOf((*MockServerlessService)(nil).SetEffectiveCredentials), auth, apihost) } @@ -515,7 +519,7 @@ func (m *MockServerlessService) Stream(arg0 *exec.Cmd) error { } // Stream indicates an expected call of Stream. -func (mr *MockServerlessServiceMockRecorder) Stream(arg0 interface{}) *gomock.Call { +func (mr *MockServerlessServiceMockRecorder) Stream(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stream", reflect.TypeOf((*MockServerlessService)(nil).Stream), arg0) } @@ -530,7 +534,7 @@ func (m *MockServerlessService) UpdateTrigger(arg0 context.Context, arg1 string, } // UpdateTrigger indicates an expected call of UpdateTrigger. -func (mr *MockServerlessServiceMockRecorder) UpdateTrigger(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockServerlessServiceMockRecorder) UpdateTrigger(arg0, arg1, arg2 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateTrigger", reflect.TypeOf((*MockServerlessService)(nil).UpdateTrigger), arg0, arg1, arg2) } @@ -544,7 +548,7 @@ func (m *MockServerlessService) WriteCredentials(arg0 do.ServerlessCredentials) } // WriteCredentials indicates an expected call of WriteCredentials. -func (mr *MockServerlessServiceMockRecorder) WriteCredentials(arg0 interface{}) *gomock.Call { +func (mr *MockServerlessServiceMockRecorder) WriteCredentials(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteCredentials", reflect.TypeOf((*MockServerlessService)(nil).WriteCredentials), arg0) } @@ -559,7 +563,7 @@ func (m *MockServerlessService) WriteProject(arg0 do.ServerlessProject) (string, } // WriteProject indicates an expected call of WriteProject. -func (mr *MockServerlessServiceMockRecorder) WriteProject(arg0 interface{}) *gomock.Call { +func (mr *MockServerlessServiceMockRecorder) WriteProject(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteProject", reflect.TypeOf((*MockServerlessService)(nil).WriteProject), arg0) } diff --git a/do/mocks/SizesService.go b/do/mocks/SizesService.go index 59433d655..68fe58ea5 100644 --- a/do/mocks/SizesService.go +++ b/do/mocks/SizesService.go @@ -1,6 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: sizes.go - +// +// Generated by this command: +// +// mockgen -source sizes.go -package=mocks SizesService +// // Package mocks is a generated GoMock package. package mocks diff --git a/do/mocks/SnapshotsService.go b/do/mocks/SnapshotsService.go index dc7bc7a0f..4b762893b 100644 --- a/do/mocks/SnapshotsService.go +++ b/do/mocks/SnapshotsService.go @@ -1,6 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: snapshots.go - +// +// Generated by this command: +// +// mockgen -source snapshots.go -package=mocks SnapshotsService +// // Package mocks is a generated GoMock package. package mocks @@ -43,7 +47,7 @@ func (m *MockSnapshotsService) Delete(arg0 string) error { } // Delete indicates an expected call of Delete. -func (mr *MockSnapshotsServiceMockRecorder) Delete(arg0 interface{}) *gomock.Call { +func (mr *MockSnapshotsServiceMockRecorder) Delete(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockSnapshotsService)(nil).Delete), arg0) } @@ -58,7 +62,7 @@ func (m *MockSnapshotsService) Get(arg0 string) (*do.Snapshot, error) { } // Get indicates an expected call of Get. -func (mr *MockSnapshotsServiceMockRecorder) Get(arg0 interface{}) *gomock.Call { +func (mr *MockSnapshotsServiceMockRecorder) Get(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockSnapshotsService)(nil).Get), arg0) } diff --git a/do/mocks/TagsService.go b/do/mocks/TagsService.go index f5b44bb6e..82c4034c5 100644 --- a/do/mocks/TagsService.go +++ b/do/mocks/TagsService.go @@ -1,6 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: tags.go - +// +// Generated by this command: +// +// mockgen -source tags.go -package=mocks TagsService +// // Package mocks is a generated GoMock package. package mocks @@ -45,7 +49,7 @@ func (m *MockTagsService) Create(arg0 *godo.TagCreateRequest) (*do.Tag, error) { } // Create indicates an expected call of Create. -func (mr *MockTagsServiceMockRecorder) Create(arg0 interface{}) *gomock.Call { +func (mr *MockTagsServiceMockRecorder) Create(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockTagsService)(nil).Create), arg0) } @@ -59,7 +63,7 @@ func (m *MockTagsService) Delete(arg0 string) error { } // Delete indicates an expected call of Delete. -func (mr *MockTagsServiceMockRecorder) Delete(arg0 interface{}) *gomock.Call { +func (mr *MockTagsServiceMockRecorder) Delete(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockTagsService)(nil).Delete), arg0) } @@ -74,7 +78,7 @@ func (m *MockTagsService) Get(arg0 string) (*do.Tag, error) { } // Get indicates an expected call of Get. -func (mr *MockTagsServiceMockRecorder) Get(arg0 interface{}) *gomock.Call { +func (mr *MockTagsServiceMockRecorder) Get(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockTagsService)(nil).Get), arg0) } @@ -103,7 +107,7 @@ func (m *MockTagsService) TagResources(arg0 string, arg1 *godo.TagResourcesReque } // TagResources indicates an expected call of TagResources. -func (mr *MockTagsServiceMockRecorder) TagResources(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockTagsServiceMockRecorder) TagResources(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TagResources", reflect.TypeOf((*MockTagsService)(nil).TagResources), arg0, arg1) } @@ -117,7 +121,7 @@ func (m *MockTagsService) UntagResources(arg0 string, arg1 *godo.UntagResourcesR } // UntagResources indicates an expected call of UntagResources. -func (mr *MockTagsServiceMockRecorder) UntagResources(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockTagsServiceMockRecorder) UntagResources(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UntagResources", reflect.TypeOf((*MockTagsService)(nil).UntagResources), arg0, arg1) } diff --git a/do/mocks/UptimeChecksService.go b/do/mocks/UptimeChecksService.go index fe1910297..7457eb7e0 100644 --- a/do/mocks/UptimeChecksService.go +++ b/do/mocks/UptimeChecksService.go @@ -1,6 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: uptime_checks.go - +// +// Generated by this command: +// +// mockgen -source uptime_checks.go -package=mocks UptimeChecksService +// // Package mocks is a generated GoMock package. package mocks @@ -45,7 +49,7 @@ func (m *MockUptimeChecksService) Create(arg0 *godo.CreateUptimeCheckRequest) (* } // Create indicates an expected call of Create. -func (mr *MockUptimeChecksServiceMockRecorder) Create(arg0 interface{}) *gomock.Call { +func (mr *MockUptimeChecksServiceMockRecorder) Create(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockUptimeChecksService)(nil).Create), arg0) } @@ -59,7 +63,7 @@ func (m *MockUptimeChecksService) Delete(arg0 string) error { } // Delete indicates an expected call of Delete. -func (mr *MockUptimeChecksServiceMockRecorder) Delete(arg0 interface{}) *gomock.Call { +func (mr *MockUptimeChecksServiceMockRecorder) Delete(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockUptimeChecksService)(nil).Delete), arg0) } @@ -74,7 +78,7 @@ func (m *MockUptimeChecksService) Get(arg0 string) (*do.UptimeCheck, error) { } // Get indicates an expected call of Get. -func (mr *MockUptimeChecksServiceMockRecorder) Get(arg0 interface{}) *gomock.Call { +func (mr *MockUptimeChecksServiceMockRecorder) Get(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockUptimeChecksService)(nil).Get), arg0) } @@ -89,7 +93,7 @@ func (m *MockUptimeChecksService) GetState(arg0 string) (*do.UptimeCheckState, e } // GetState indicates an expected call of GetState. -func (mr *MockUptimeChecksServiceMockRecorder) GetState(arg0 interface{}) *gomock.Call { +func (mr *MockUptimeChecksServiceMockRecorder) GetState(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetState", reflect.TypeOf((*MockUptimeChecksService)(nil).GetState), arg0) } @@ -119,7 +123,7 @@ func (m *MockUptimeChecksService) Update(arg0 string, arg1 *godo.UpdateUptimeChe } // Update indicates an expected call of Update. -func (mr *MockUptimeChecksServiceMockRecorder) Update(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockUptimeChecksServiceMockRecorder) Update(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockUptimeChecksService)(nil).Update), arg0, arg1) } diff --git a/do/mocks/VPCsService.go b/do/mocks/VPCsService.go index 5a865c90f..a33bfc592 100644 --- a/do/mocks/VPCsService.go +++ b/do/mocks/VPCsService.go @@ -1,6 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: vpcs.go - +// +// Generated by this command: +// +// mockgen -source vpcs.go -package=mocks VPCsService +// // Package mocks is a generated GoMock package. package mocks @@ -45,7 +49,7 @@ func (m *MockVPCsService) Create(vpcr *godo.VPCCreateRequest) (*do.VPC, error) { } // Create indicates an expected call of Create. -func (mr *MockVPCsServiceMockRecorder) Create(vpcr interface{}) *gomock.Call { +func (mr *MockVPCsServiceMockRecorder) Create(vpcr any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockVPCsService)(nil).Create), vpcr) } @@ -59,7 +63,7 @@ func (m *MockVPCsService) Delete(vpcUUID string) error { } // Delete indicates an expected call of Delete. -func (mr *MockVPCsServiceMockRecorder) Delete(vpcUUID interface{}) *gomock.Call { +func (mr *MockVPCsServiceMockRecorder) Delete(vpcUUID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockVPCsService)(nil).Delete), vpcUUID) } @@ -74,7 +78,7 @@ func (m *MockVPCsService) Get(vpcUUID string) (*do.VPC, error) { } // Get indicates an expected call of Get. -func (mr *MockVPCsServiceMockRecorder) Get(vpcUUID interface{}) *gomock.Call { +func (mr *MockVPCsServiceMockRecorder) Get(vpcUUID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockVPCsService)(nil).Get), vpcUUID) } @@ -97,7 +101,7 @@ func (mr *MockVPCsServiceMockRecorder) List() *gomock.Call { // PartialUpdate mocks base method. func (m *MockVPCsService) PartialUpdate(vpcUUID string, options ...godo.VPCSetField) (*do.VPC, error) { m.ctrl.T.Helper() - varargs := []interface{}{vpcUUID} + varargs := []any{vpcUUID} for _, a := range options { varargs = append(varargs, a) } @@ -108,9 +112,9 @@ func (m *MockVPCsService) PartialUpdate(vpcUUID string, options ...godo.VPCSetFi } // PartialUpdate indicates an expected call of PartialUpdate. -func (mr *MockVPCsServiceMockRecorder) PartialUpdate(vpcUUID interface{}, options ...interface{}) *gomock.Call { +func (mr *MockVPCsServiceMockRecorder) PartialUpdate(vpcUUID any, options ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]interface{}{vpcUUID}, options...) + varargs := append([]any{vpcUUID}, options...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PartialUpdate", reflect.TypeOf((*MockVPCsService)(nil).PartialUpdate), varargs...) } @@ -124,7 +128,7 @@ func (m *MockVPCsService) Update(vpcUUID string, vpcr *godo.VPCUpdateRequest) (* } // Update indicates an expected call of Update. -func (mr *MockVPCsServiceMockRecorder) Update(vpcUUID, vpcr interface{}) *gomock.Call { +func (mr *MockVPCsServiceMockRecorder) Update(vpcUUID, vpcr any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockVPCsService)(nil).Update), vpcUUID, vpcr) } diff --git a/do/mocks/VolumeActionsService.go b/do/mocks/VolumeActionsService.go index a1c0a3b69..754473583 100644 --- a/do/mocks/VolumeActionsService.go +++ b/do/mocks/VolumeActionsService.go @@ -1,6 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: volume_actions.go - +// +// Generated by this command: +// +// mockgen -source volume_actions.go -package=mocks VolumeActionsService +// // Package mocks is a generated GoMock package. package mocks @@ -44,7 +48,7 @@ func (m *MockVolumeActionsService) Attach(arg0 string, arg1 int) (*do.Action, er } // Attach indicates an expected call of Attach. -func (mr *MockVolumeActionsServiceMockRecorder) Attach(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockVolumeActionsServiceMockRecorder) Attach(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Attach", reflect.TypeOf((*MockVolumeActionsService)(nil).Attach), arg0, arg1) } @@ -59,7 +63,7 @@ func (m *MockVolumeActionsService) Detach(arg0 string, arg1 int) (*do.Action, er } // Detach indicates an expected call of Detach. -func (mr *MockVolumeActionsServiceMockRecorder) Detach(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockVolumeActionsServiceMockRecorder) Detach(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Detach", reflect.TypeOf((*MockVolumeActionsService)(nil).Detach), arg0, arg1) } @@ -74,7 +78,7 @@ func (m *MockVolumeActionsService) Get(arg0 string, arg1 int) (*do.Action, error } // Get indicates an expected call of Get. -func (mr *MockVolumeActionsServiceMockRecorder) Get(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockVolumeActionsServiceMockRecorder) Get(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockVolumeActionsService)(nil).Get), arg0, arg1) } @@ -89,7 +93,7 @@ func (m *MockVolumeActionsService) List(arg0 string) ([]do.Action, error) { } // List indicates an expected call of List. -func (mr *MockVolumeActionsServiceMockRecorder) List(arg0 interface{}) *gomock.Call { +func (mr *MockVolumeActionsServiceMockRecorder) List(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockVolumeActionsService)(nil).List), arg0) } @@ -104,7 +108,7 @@ func (m *MockVolumeActionsService) Resize(arg0 string, arg1 int, arg2 string) (* } // Resize indicates an expected call of Resize. -func (mr *MockVolumeActionsServiceMockRecorder) Resize(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockVolumeActionsServiceMockRecorder) Resize(arg0, arg1, arg2 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Resize", reflect.TypeOf((*MockVolumeActionsService)(nil).Resize), arg0, arg1, arg2) } diff --git a/do/mocks/VolumesService.go b/do/mocks/VolumesService.go index b1b5aa612..8575a369d 100644 --- a/do/mocks/VolumesService.go +++ b/do/mocks/VolumesService.go @@ -1,6 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: volumes.go - +// +// Generated by this command: +// +// mockgen -source volumes.go -package=mocks VolumesService +// // Package mocks is a generated GoMock package. package mocks @@ -45,7 +49,7 @@ func (m *MockVolumesService) CreateSnapshot(arg0 *godo.SnapshotCreateRequest) (* } // CreateSnapshot indicates an expected call of CreateSnapshot. -func (mr *MockVolumesServiceMockRecorder) CreateSnapshot(arg0 interface{}) *gomock.Call { +func (mr *MockVolumesServiceMockRecorder) CreateSnapshot(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateSnapshot", reflect.TypeOf((*MockVolumesService)(nil).CreateSnapshot), arg0) } @@ -60,7 +64,7 @@ func (m *MockVolumesService) CreateVolume(arg0 *godo.VolumeCreateRequest) (*do.V } // CreateVolume indicates an expected call of CreateVolume. -func (mr *MockVolumesServiceMockRecorder) CreateVolume(arg0 interface{}) *gomock.Call { +func (mr *MockVolumesServiceMockRecorder) CreateVolume(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateVolume", reflect.TypeOf((*MockVolumesService)(nil).CreateVolume), arg0) } @@ -74,7 +78,7 @@ func (m *MockVolumesService) DeleteSnapshot(arg0 string) error { } // DeleteSnapshot indicates an expected call of DeleteSnapshot. -func (mr *MockVolumesServiceMockRecorder) DeleteSnapshot(arg0 interface{}) *gomock.Call { +func (mr *MockVolumesServiceMockRecorder) DeleteSnapshot(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteSnapshot", reflect.TypeOf((*MockVolumesService)(nil).DeleteSnapshot), arg0) } @@ -88,7 +92,7 @@ func (m *MockVolumesService) DeleteVolume(arg0 string) error { } // DeleteVolume indicates an expected call of DeleteVolume. -func (mr *MockVolumesServiceMockRecorder) DeleteVolume(arg0 interface{}) *gomock.Call { +func (mr *MockVolumesServiceMockRecorder) DeleteVolume(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteVolume", reflect.TypeOf((*MockVolumesService)(nil).DeleteVolume), arg0) } @@ -103,7 +107,7 @@ func (m *MockVolumesService) Get(arg0 string) (*do.Volume, error) { } // Get indicates an expected call of Get. -func (mr *MockVolumesServiceMockRecorder) Get(arg0 interface{}) *gomock.Call { +func (mr *MockVolumesServiceMockRecorder) Get(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockVolumesService)(nil).Get), arg0) } @@ -118,7 +122,7 @@ func (m *MockVolumesService) GetSnapshot(arg0 string) (*do.Snapshot, error) { } // GetSnapshot indicates an expected call of GetSnapshot. -func (mr *MockVolumesServiceMockRecorder) GetSnapshot(arg0 interface{}) *gomock.Call { +func (mr *MockVolumesServiceMockRecorder) GetSnapshot(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSnapshot", reflect.TypeOf((*MockVolumesService)(nil).GetSnapshot), arg0) } @@ -148,7 +152,7 @@ func (m *MockVolumesService) ListSnapshots(arg0 string, arg1 *godo.ListOptions) } // ListSnapshots indicates an expected call of ListSnapshots. -func (mr *MockVolumesServiceMockRecorder) ListSnapshots(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockVolumesServiceMockRecorder) ListSnapshots(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListSnapshots", reflect.TypeOf((*MockVolumesService)(nil).ListSnapshots), arg0, arg1) }