Documentation ¶
Index ¶
- Constants
- type FakeDatabasesService
- func (f *FakeDatabasesService) Create(_ context.Context, req *godo.DatabaseCreateRequest) (*godo.Database, *godo.Response, error)
- func (f *FakeDatabasesService) CreateDB(_ context.Context, _ string, _ *godo.DatabaseCreateDBRequest) (*godo.DatabaseDB, *godo.Response, error)
- func (f *FakeDatabasesService) CreatePool(_ context.Context, _ string, _ *godo.DatabaseCreatePoolRequest) (*godo.DatabasePool, *godo.Response, error)
- func (f *FakeDatabasesService) CreateReplica(_ context.Context, _ string, _ *godo.DatabaseCreateReplicaRequest) (*godo.DatabaseReplica, *godo.Response, error)
- func (f *FakeDatabasesService) CreateUser(_ context.Context, dbUUID string, req *godo.DatabaseCreateUserRequest) (*godo.DatabaseUser, *godo.Response, error)
- func (f *FakeDatabasesService) Delete(_ context.Context, dbUUID string) (*godo.Response, error)
- func (f *FakeDatabasesService) DeleteDB(_ context.Context, _ string, _ string) (*godo.Response, error)
- func (f *FakeDatabasesService) DeletePool(_ context.Context, _ string, _ string) (*godo.Response, error)
- func (f *FakeDatabasesService) DeleteReplica(_ context.Context, _ string, _ string) (*godo.Response, error)
- func (f *FakeDatabasesService) DeleteUser(_ context.Context, dbUUID string, username string) (*godo.Response, error)
- func (f *FakeDatabasesService) Get(_ context.Context, dbUUID string) (*godo.Database, *godo.Response, error)
- func (f *FakeDatabasesService) GetCA(_ context.Context, _ string) (*godo.DatabaseCA, *godo.Response, error)
- func (f *FakeDatabasesService) GetDB(_ context.Context, _ string, _ string) (*godo.DatabaseDB, *godo.Response, error)
- func (f *FakeDatabasesService) GetEvictionPolicy(_ context.Context, _ string) (string, *godo.Response, error)
- func (f *FakeDatabasesService) GetFirewallRules(_ context.Context, _ string) ([]godo.DatabaseFirewallRule, *godo.Response, error)
- func (f *FakeDatabasesService) GetMySQLConfig(_ context.Context, _ string) (*godo.MySQLConfig, *godo.Response, error)
- func (f *FakeDatabasesService) GetPool(_ context.Context, _ string, _ string) (*godo.DatabasePool, *godo.Response, error)
- func (f *FakeDatabasesService) GetPostgreSQLConfig(_ context.Context, _ string) (*godo.PostgreSQLConfig, *godo.Response, error)
- func (f *FakeDatabasesService) GetRedisConfig(_ context.Context, _ string) (*godo.RedisConfig, *godo.Response, error)
- func (f *FakeDatabasesService) GetReplica(_ context.Context, _ string, _ string) (*godo.DatabaseReplica, *godo.Response, error)
- func (f *FakeDatabasesService) GetSQLMode(_ context.Context, _ string) (string, *godo.Response, error)
- func (f *FakeDatabasesService) GetUser(_ context.Context, dbUUID string, username string) (*godo.DatabaseUser, *godo.Response, error)
- func (f *FakeDatabasesService) List(_ context.Context, _ *godo.ListOptions) ([]godo.Database, *godo.Response, error)
- func (f *FakeDatabasesService) ListBackups(_ context.Context, _ string, _ *godo.ListOptions) ([]godo.DatabaseBackup, *godo.Response, error)
- func (f *FakeDatabasesService) ListDBs(_ context.Context, _ string, _ *godo.ListOptions) ([]godo.DatabaseDB, *godo.Response, error)
- func (f *FakeDatabasesService) ListOptions(todo context.Context) (*godo.DatabaseOptions, *godo.Response, error)
- func (f *FakeDatabasesService) ListPools(_ context.Context, _ string, _ *godo.ListOptions) ([]godo.DatabasePool, *godo.Response, error)
- func (f *FakeDatabasesService) ListReplicas(_ context.Context, _ string, _ *godo.ListOptions) ([]godo.DatabaseReplica, *godo.Response, error)
- func (f *FakeDatabasesService) ListUsers(_ context.Context, _ string, _ *godo.ListOptions) ([]godo.DatabaseUser, *godo.Response, error)
- func (f *FakeDatabasesService) Migrate(_ context.Context, _ string, _ *godo.DatabaseMigrateRequest) (*godo.Response, error)
- func (f *FakeDatabasesService) PromoteReplicaToPrimary(_ context.Context, _ string, _ string) (*godo.Response, error)
- func (f *FakeDatabasesService) ResetUserAuth(_ context.Context, _ string, _ string, _ *godo.DatabaseResetUserAuthRequest) (*godo.DatabaseUser, *godo.Response, error)
- func (f *FakeDatabasesService) Resize(_ context.Context, dbUUID string, req *godo.DatabaseResizeRequest) (*godo.Response, error)
- func (f *FakeDatabasesService) SetEvictionPolicy(_ context.Context, _ string, _ string) (*godo.Response, error)
- func (f *FakeDatabasesService) SetSQLMode(_ context.Context, _ string, _ ...string) (*godo.Response, error)
- func (f *FakeDatabasesService) UpdateFirewallRules(_ context.Context, _ string, _ *godo.DatabaseUpdateFirewallRulesRequest) (*godo.Response, error)
- func (f *FakeDatabasesService) UpdateMaintenance(_ context.Context, _ string, _ *godo.DatabaseUpdateMaintenanceRequest) (*godo.Response, error)
- func (f *FakeDatabasesService) UpdateMySQLConfig(_ context.Context, _ string, _ *godo.MySQLConfig) (*godo.Response, error)
- func (f *FakeDatabasesService) UpdatePool(_ context.Context, _ string, _ string, _ *godo.DatabaseUpdatePoolRequest) (*godo.Response, error)
- func (f *FakeDatabasesService) UpdatePostgreSQLConfig(_ context.Context, _ string, _ *godo.PostgreSQLConfig) (*godo.Response, error)
- func (f *FakeDatabasesService) UpdateRedisConfig(_ context.Context, _ string, _ *godo.RedisConfig) (*godo.Response, error)
- func (f *FakeDatabasesService) UpgradeMajorVersion(_ context.Context, _ string, _ *godo.UpgradeVersionRequest) (*godo.Response, error)
- type Handler
Constants ¶
const ( // CreatingStatus is the status when a database is created. CreatingStatus = "creating" // OnlineStatus is the status when a database is fetched after creation. OnlineStatus = "online" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeDatabasesService ¶
type FakeDatabasesService struct { Options *godo.DatabaseOptions // contains filtered or unexported fields }
FakeDatabasesService is a fake godo DatabasesService with limited functionality: * Create creates and returns a new database object with the status "creating". * Get returns a previously-created database object with the status "online". * Delete deletes a previously-created database object. * Resize updates a previously-created object with the provided parameters.
func (*FakeDatabasesService) Create ¶
func (f *FakeDatabasesService) Create(_ context.Context, req *godo.DatabaseCreateRequest) (*godo.Database, *godo.Response, error)
Create ...
func (*FakeDatabasesService) CreateDB ¶
func (f *FakeDatabasesService) CreateDB(_ context.Context, _ string, _ *godo.DatabaseCreateDBRequest) (*godo.DatabaseDB, *godo.Response, error)
CreateDB ...
func (*FakeDatabasesService) CreatePool ¶
func (f *FakeDatabasesService) CreatePool(_ context.Context, _ string, _ *godo.DatabaseCreatePoolRequest) (*godo.DatabasePool, *godo.Response, error)
CreatePool ...
func (*FakeDatabasesService) CreateReplica ¶
func (f *FakeDatabasesService) CreateReplica(_ context.Context, _ string, _ *godo.DatabaseCreateReplicaRequest) (*godo.DatabaseReplica, *godo.Response, error)
CreateReplica ...
func (*FakeDatabasesService) CreateUser ¶
func (f *FakeDatabasesService) CreateUser(_ context.Context, dbUUID string, req *godo.DatabaseCreateUserRequest) (*godo.DatabaseUser, *godo.Response, error)
CreateUser ...
func (*FakeDatabasesService) DeleteDB ¶
func (f *FakeDatabasesService) DeleteDB(_ context.Context, _ string, _ string) (*godo.Response, error)
DeleteDB ...
func (*FakeDatabasesService) DeletePool ¶
func (f *FakeDatabasesService) DeletePool(_ context.Context, _ string, _ string) (*godo.Response, error)
DeletePool ...
func (*FakeDatabasesService) DeleteReplica ¶
func (f *FakeDatabasesService) DeleteReplica(_ context.Context, _ string, _ string) (*godo.Response, error)
DeleteReplica ...
func (*FakeDatabasesService) DeleteUser ¶
func (f *FakeDatabasesService) DeleteUser(_ context.Context, dbUUID string, username string) (*godo.Response, error)
DeleteUser ...
func (*FakeDatabasesService) Get ¶
func (f *FakeDatabasesService) Get(_ context.Context, dbUUID string) (*godo.Database, *godo.Response, error)
Get ...
func (*FakeDatabasesService) GetCA ¶
func (f *FakeDatabasesService) GetCA(_ context.Context, _ string) (*godo.DatabaseCA, *godo.Response, error)
GetCA ...
func (*FakeDatabasesService) GetDB ¶
func (f *FakeDatabasesService) GetDB(_ context.Context, _ string, _ string) (*godo.DatabaseDB, *godo.Response, error)
GetDB ...
func (*FakeDatabasesService) GetEvictionPolicy ¶
func (f *FakeDatabasesService) GetEvictionPolicy(_ context.Context, _ string) (string, *godo.Response, error)
GetEvictionPolicy ...
func (*FakeDatabasesService) GetFirewallRules ¶
func (f *FakeDatabasesService) GetFirewallRules(_ context.Context, _ string) ([]godo.DatabaseFirewallRule, *godo.Response, error)
GetFirewallRules ...
func (*FakeDatabasesService) GetMySQLConfig ¶
func (f *FakeDatabasesService) GetMySQLConfig(_ context.Context, _ string) (*godo.MySQLConfig, *godo.Response, error)
GetMySQLConfig ...
func (*FakeDatabasesService) GetPool ¶
func (f *FakeDatabasesService) GetPool(_ context.Context, _ string, _ string) (*godo.DatabasePool, *godo.Response, error)
GetPool ...
func (*FakeDatabasesService) GetPostgreSQLConfig ¶
func (f *FakeDatabasesService) GetPostgreSQLConfig(_ context.Context, _ string) (*godo.PostgreSQLConfig, *godo.Response, error)
GetPostgreSQLConfig ...
func (*FakeDatabasesService) GetRedisConfig ¶
func (f *FakeDatabasesService) GetRedisConfig(_ context.Context, _ string) (*godo.RedisConfig, *godo.Response, error)
GetRedisConfig ...
func (*FakeDatabasesService) GetReplica ¶
func (f *FakeDatabasesService) GetReplica(_ context.Context, _ string, _ string) (*godo.DatabaseReplica, *godo.Response, error)
GetReplica ...
func (*FakeDatabasesService) GetSQLMode ¶
func (f *FakeDatabasesService) GetSQLMode(_ context.Context, _ string) (string, *godo.Response, error)
GetSQLMode ...
func (*FakeDatabasesService) GetUser ¶
func (f *FakeDatabasesService) GetUser(_ context.Context, dbUUID string, username string) (*godo.DatabaseUser, *godo.Response, error)
GetUser ...
func (*FakeDatabasesService) List ¶
func (f *FakeDatabasesService) List(_ context.Context, _ *godo.ListOptions) ([]godo.Database, *godo.Response, error)
List ...
func (*FakeDatabasesService) ListBackups ¶
func (f *FakeDatabasesService) ListBackups(_ context.Context, _ string, _ *godo.ListOptions) ([]godo.DatabaseBackup, *godo.Response, error)
ListBackups ...
func (*FakeDatabasesService) ListDBs ¶
func (f *FakeDatabasesService) ListDBs(_ context.Context, _ string, _ *godo.ListOptions) ([]godo.DatabaseDB, *godo.Response, error)
ListDBs ...
func (*FakeDatabasesService) ListOptions ¶
func (f *FakeDatabasesService) ListOptions(todo context.Context) (*godo.DatabaseOptions, *godo.Response, error)
ListOptions ...
func (*FakeDatabasesService) ListPools ¶
func (f *FakeDatabasesService) ListPools(_ context.Context, _ string, _ *godo.ListOptions) ([]godo.DatabasePool, *godo.Response, error)
ListPools ...
func (*FakeDatabasesService) ListReplicas ¶
func (f *FakeDatabasesService) ListReplicas(_ context.Context, _ string, _ *godo.ListOptions) ([]godo.DatabaseReplica, *godo.Response, error)
ListReplicas ...
func (*FakeDatabasesService) ListUsers ¶
func (f *FakeDatabasesService) ListUsers(_ context.Context, _ string, _ *godo.ListOptions) ([]godo.DatabaseUser, *godo.Response, error)
ListUsers ...
func (*FakeDatabasesService) Migrate ¶
func (f *FakeDatabasesService) Migrate(_ context.Context, _ string, _ *godo.DatabaseMigrateRequest) (*godo.Response, error)
Migrate ...
func (*FakeDatabasesService) PromoteReplicaToPrimary ¶ added in v0.1.7
func (f *FakeDatabasesService) PromoteReplicaToPrimary(_ context.Context, _ string, _ string) (*godo.Response, error)
PromoteReplicaToPrimary ...
func (*FakeDatabasesService) ResetUserAuth ¶
func (f *FakeDatabasesService) ResetUserAuth(_ context.Context, _ string, _ string, _ *godo.DatabaseResetUserAuthRequest) (*godo.DatabaseUser, *godo.Response, error)
ResetUserAuth ...
func (*FakeDatabasesService) Resize ¶
func (f *FakeDatabasesService) Resize(_ context.Context, dbUUID string, req *godo.DatabaseResizeRequest) (*godo.Response, error)
Resize ...
func (*FakeDatabasesService) SetEvictionPolicy ¶
func (f *FakeDatabasesService) SetEvictionPolicy(_ context.Context, _ string, _ string) (*godo.Response, error)
SetEvictionPolicy ...
func (*FakeDatabasesService) SetSQLMode ¶
func (f *FakeDatabasesService) SetSQLMode(_ context.Context, _ string, _ ...string) (*godo.Response, error)
SetSQLMode ...
func (*FakeDatabasesService) UpdateFirewallRules ¶
func (f *FakeDatabasesService) UpdateFirewallRules(_ context.Context, _ string, _ *godo.DatabaseUpdateFirewallRulesRequest) (*godo.Response, error)
UpdateFirewallRules ...
func (*FakeDatabasesService) UpdateMaintenance ¶
func (f *FakeDatabasesService) UpdateMaintenance(_ context.Context, _ string, _ *godo.DatabaseUpdateMaintenanceRequest) (*godo.Response, error)
UpdateMaintenance ...
func (*FakeDatabasesService) UpdateMySQLConfig ¶
func (f *FakeDatabasesService) UpdateMySQLConfig(_ context.Context, _ string, _ *godo.MySQLConfig) (*godo.Response, error)
UpdateMySQLConfig ...
func (*FakeDatabasesService) UpdatePool ¶ added in v0.1.7
func (f *FakeDatabasesService) UpdatePool(_ context.Context, _ string, _ string, _ *godo.DatabaseUpdatePoolRequest) (*godo.Response, error)
UpdatePool ...
func (*FakeDatabasesService) UpdatePostgreSQLConfig ¶
func (f *FakeDatabasesService) UpdatePostgreSQLConfig(_ context.Context, _ string, _ *godo.PostgreSQLConfig) (*godo.Response, error)
UpdatePostgreSQLConfig ...
func (*FakeDatabasesService) UpdateRedisConfig ¶
func (f *FakeDatabasesService) UpdateRedisConfig(_ context.Context, _ string, _ *godo.RedisConfig) (*godo.Response, error)
UpdateRedisConfig ...
func (*FakeDatabasesService) UpgradeMajorVersion ¶ added in v0.1.7
func (f *FakeDatabasesService) UpgradeMajorVersion(_ context.Context, _ string, _ *godo.UpgradeVersionRequest) (*godo.Response, error)
UpgradeMajorVersion ...