Documentation
¶
Overview ¶
Package rdb provides methods and message types of the rdb v1 API.
Index ¶
- Constants
- type ACLRule
- type ACLRuleAction
- type ACLRuleDirection
- type ACLRuleProtocol
- type ACLRuleRequest
- type API
- func (s *API) AddInstanceACLRules(req *AddInstanceACLRulesRequest, opts ...scw.RequestOption) (*AddInstanceACLRulesResponse, error)
- func (s *API) AddInstanceSettings(req *AddInstanceSettingsRequest, opts ...scw.RequestOption) (*AddInstanceSettingsResponse, error)
- func (s *API) CloneInstance(req *CloneInstanceRequest, opts ...scw.RequestOption) (*Instance, error)
- func (s *API) CreateDatabase(req *CreateDatabaseRequest, opts ...scw.RequestOption) (*Database, error)
- func (s *API) CreateDatabaseBackup(req *CreateDatabaseBackupRequest, opts ...scw.RequestOption) (*DatabaseBackup, error)
- func (s *API) CreateInstance(req *CreateInstanceRequest, opts ...scw.RequestOption) (*Instance, error)
- func (s *API) CreateUser(req *CreateUserRequest, opts ...scw.RequestOption) (*User, error)
- func (s *API) DeleteDatabase(req *DeleteDatabaseRequest, opts ...scw.RequestOption) error
- func (s *API) DeleteDatabaseBackup(req *DeleteDatabaseBackupRequest, opts ...scw.RequestOption) (*DatabaseBackup, error)
- func (s *API) DeleteInstance(req *DeleteInstanceRequest, opts ...scw.RequestOption) (*Instance, error)
- func (s *API) DeleteInstanceACLRules(req *DeleteInstanceACLRulesRequest, opts ...scw.RequestOption) (*DeleteInstanceACLRulesResponse, error)
- func (s *API) DeleteInstanceSettings(req *DeleteInstanceSettingsRequest, opts ...scw.RequestOption) (*DeleteInstanceSettingsResponse, error)
- func (s *API) DeleteUser(req *DeleteUserRequest, opts ...scw.RequestOption) error
- func (s *API) ExportDatabaseBackup(req *ExportDatabaseBackupRequest, opts ...scw.RequestOption) (*DatabaseBackup, error)
- func (s *API) GetDatabaseBackup(req *GetDatabaseBackupRequest, opts ...scw.RequestOption) (*DatabaseBackup, error)
- func (s *API) GetInstance(req *GetInstanceRequest, opts ...scw.RequestOption) (*Instance, error)
- func (s *API) GetInstanceCertificate(req *GetInstanceCertificateRequest, opts ...scw.RequestOption) (*scw.File, error)
- func (s *API) GetInstanceLog(req *GetInstanceLogRequest, opts ...scw.RequestOption) (*InstanceLog, error)
- func (s *API) GetInstanceMetrics(req *GetInstanceMetricsRequest, opts ...scw.RequestOption) (*InstanceMetrics, error)
- func (s *API) GetServiceInfo(req *GetServiceInfoRequest, opts ...scw.RequestOption) (*scw.ServiceInfo, error)
- func (s *API) ListDatabaseBackups(req *ListDatabaseBackupsRequest, opts ...scw.RequestOption) (*ListDatabaseBackupsResponse, error)
- func (s *API) ListDatabaseEngines(req *ListDatabaseEnginesRequest, opts ...scw.RequestOption) (*ListDatabaseEnginesResponse, error)
- func (s *API) ListDatabases(req *ListDatabasesRequest, opts ...scw.RequestOption) (*ListDatabasesResponse, error)
- func (s *API) ListInstanceACLRules(req *ListInstanceACLRulesRequest, opts ...scw.RequestOption) (*ListInstanceACLRulesResponse, error)
- func (s *API) ListInstanceLogs(req *ListInstanceLogsRequest, opts ...scw.RequestOption) (*ListInstanceLogsResponse, error)
- func (s *API) ListInstances(req *ListInstancesRequest, opts ...scw.RequestOption) (*ListInstancesResponse, error)
- func (s *API) ListNodeTypes(req *ListNodeTypesRequest, opts ...scw.RequestOption) (*ListNodeTypesResponse, error)
- func (s *API) ListPrivileges(req *ListPrivilegesRequest, opts ...scw.RequestOption) (*ListPrivilegesResponse, error)
- func (s *API) ListUsers(req *ListUsersRequest, opts ...scw.RequestOption) (*ListUsersResponse, error)
- func (s *API) PrepareInstanceLogs(req *PrepareInstanceLogsRequest, opts ...scw.RequestOption) (*PrepareInstanceLogsResponse, error)
- func (s *API) RestoreDatabaseBackup(req *RestoreDatabaseBackupRequest, opts ...scw.RequestOption) (*DatabaseBackup, error)
- func (s *API) SetInstanceACLRules(req *SetInstanceACLRulesRequest, opts ...scw.RequestOption) (*SetInstanceACLRulesResponse, error)
- func (s *API) SetInstanceSettings(req *SetInstanceSettingsRequest, opts ...scw.RequestOption) (*SetInstanceSettingsResponse, error)
- func (s *API) SetPrivilege(req *SetPrivilegeRequest, opts ...scw.RequestOption) (*Privilege, error)
- func (s *API) UpdateDatabaseBackup(req *UpdateDatabaseBackupRequest, opts ...scw.RequestOption) (*DatabaseBackup, error)
- func (s *API) UpdateInstance(req *UpdateInstanceRequest, opts ...scw.RequestOption) (*Instance, error)
- func (s *API) UpdateUser(req *UpdateUserRequest, opts ...scw.RequestOption) (*User, error)
- func (s *API) UpgradeInstance(req *UpgradeInstanceRequest, opts ...scw.RequestOption) (*Instance, error)
- func (s *API) WaitForDatabaseBackup(req *WaitForDatabaseBackupRequest) (*DatabaseBackup, error)
- func (s *API) WaitForInstance(req *WaitForInstanceRequest) (*Instance, error)
- func (s *API) WaitForInstanceLog(req *WaitForInstanceLogRequest) (*InstanceLog, error)
- type AddInstanceACLRulesRequest
- type AddInstanceACLRulesResponse
- type AddInstanceSettingsRequest
- type AddInstanceSettingsResponse
- type BackupSchedule
- type CloneInstanceRequest
- type CreateDatabaseBackupRequest
- type CreateDatabaseRequest
- type CreateInstanceRequest
- type CreateUserRequest
- type Database
- type DatabaseBackup
- type DatabaseBackupStatus
- type DatabaseEngine
- type DeleteDatabaseBackupRequest
- type DeleteDatabaseRequest
- type DeleteInstanceACLRulesRequest
- type DeleteInstanceACLRulesResponse
- type DeleteInstanceRequest
- type DeleteInstanceSettingsRequest
- type DeleteInstanceSettingsResponse
- type DeleteUserRequest
- type Endpoint
- type EngineSetting
- type EngineSettingPropertyType
- type EngineVersion
- type ExportDatabaseBackupRequest
- type GetDatabaseBackupRequest
- type GetInstanceCertificateRequest
- type GetInstanceLogRequest
- type GetInstanceMetricsRequest
- type GetInstanceRequest
- type GetServiceInfoRequest
- type Instance
- type InstanceLog
- type InstanceLogStatus
- type InstanceMetrics
- type InstanceSetting
- type InstanceStatus
- type ListDatabaseBackupsRequest
- type ListDatabaseBackupsRequestOrderBy
- type ListDatabaseBackupsResponse
- type ListDatabaseEnginesRequest
- type ListDatabaseEnginesResponse
- type ListDatabasesRequest
- type ListDatabasesRequestOrderBy
- type ListDatabasesResponse
- type ListInstanceACLRulesRequest
- type ListInstanceACLRulesResponse
- type ListInstanceLogsRequest
- type ListInstanceLogsRequestOrderBy
- type ListInstanceLogsResponse
- type ListInstancesRequest
- type ListInstancesRequestOrderBy
- type ListInstancesResponse
- type ListNodeTypesRequest
- type ListNodeTypesResponse
- type ListPrivilegesRequest
- type ListPrivilegesRequestOrderBy
- type ListPrivilegesResponse
- type ListUsersRequest
- type ListUsersRequestOrderBy
- type ListUsersResponse
- type NodeType
- type NodeTypeStock
- type NodeTypeVolumeConstraintSizes
- type Permission
- type PrepareInstanceLogsRequest
- type PrepareInstanceLogsResponse
- type Privilege
- type RestoreDatabaseBackupRequest
- type SetInstanceACLRulesRequest
- type SetInstanceACLRulesResponse
- type SetInstanceSettingsRequest
- type SetInstanceSettingsResponse
- type SetPrivilegeRequest
- type UpdateDatabaseBackupRequest
- type UpdateInstanceRequest
- type UpdateUserRequest
- type UpgradeInstanceRequest
- type User
- type Volume
- type VolumeType
- type WaitForDatabaseBackupRequest
- type WaitForInstanceLogRequest
- type WaitForInstanceRequest
Constants ¶
const ( // ACLRuleActionAllow is [insert doc]. ACLRuleActionAllow = ACLRuleAction("allow") // ACLRuleActionDeny is [insert doc]. ACLRuleActionDeny = ACLRuleAction("deny") )
const ( // ACLRuleDirectionInbound is [insert doc]. ACLRuleDirectionInbound = ACLRuleDirection("inbound") // ACLRuleDirectionOutbound is [insert doc]. ACLRuleDirectionOutbound = ACLRuleDirection("outbound") )
const ( // ACLRuleProtocolTCP is [insert doc]. ACLRuleProtocolTCP = ACLRuleProtocol("tcp") // ACLRuleProtocolUDP is [insert doc]. ACLRuleProtocolUDP = ACLRuleProtocol("udp") // ACLRuleProtocolIcmp is [insert doc]. ACLRuleProtocolIcmp = ACLRuleProtocol("icmp") )
const ( // DatabaseBackupStatusUnknown is [insert doc]. DatabaseBackupStatusUnknown = DatabaseBackupStatus("unknown") // DatabaseBackupStatusCreating is [insert doc]. DatabaseBackupStatusCreating = DatabaseBackupStatus("creating") // DatabaseBackupStatusReady is [insert doc]. DatabaseBackupStatusReady = DatabaseBackupStatus("ready") // DatabaseBackupStatusRestoring is [insert doc]. DatabaseBackupStatusRestoring = DatabaseBackupStatus("restoring") // DatabaseBackupStatusDeleting is [insert doc]. DatabaseBackupStatusDeleting = DatabaseBackupStatus("deleting") // DatabaseBackupStatusError is [insert doc]. DatabaseBackupStatusError = DatabaseBackupStatus("error") // DatabaseBackupStatusExporting is [insert doc]. DatabaseBackupStatusExporting = DatabaseBackupStatus("exporting") // DatabaseBackupStatusLocked is [insert doc]. DatabaseBackupStatusLocked = DatabaseBackupStatus("locked") )
const ( // EngineSettingPropertyTypeBOOLEAN is [insert doc]. EngineSettingPropertyTypeBOOLEAN = EngineSettingPropertyType("BOOLEAN") // EngineSettingPropertyTypeINT is [insert doc]. EngineSettingPropertyTypeINT = EngineSettingPropertyType("INT") // EngineSettingPropertyTypeSTRING is [insert doc]. EngineSettingPropertyTypeSTRING = EngineSettingPropertyType("STRING") )
const ( // InstanceLogStatusUnknown is [insert doc]. InstanceLogStatusUnknown = InstanceLogStatus("unknown") // InstanceLogStatusReady is [insert doc]. InstanceLogStatusReady = InstanceLogStatus("ready") // InstanceLogStatusCreating is [insert doc]. InstanceLogStatusCreating = InstanceLogStatus("creating") // InstanceLogStatusError is [insert doc]. InstanceLogStatusError = InstanceLogStatus("error") )
const ( // InstanceStatusUnknown is [insert doc]. InstanceStatusUnknown = InstanceStatus("unknown") // InstanceStatusReady is [insert doc]. InstanceStatusReady = InstanceStatus("ready") // InstanceStatusProvisioning is [insert doc]. InstanceStatusProvisioning = InstanceStatus("provisioning") // InstanceStatusConfiguring is [insert doc]. InstanceStatusConfiguring = InstanceStatus("configuring") // InstanceStatusDeleting is [insert doc]. InstanceStatusDeleting = InstanceStatus("deleting") // InstanceStatusError is [insert doc]. InstanceStatusError = InstanceStatus("error") // InstanceStatusAutohealing is [insert doc]. InstanceStatusAutohealing = InstanceStatus("autohealing") // InstanceStatusLocked is [insert doc]. InstanceStatusLocked = InstanceStatus("locked") // InstanceStatusInitializing is [insert doc]. InstanceStatusInitializing = InstanceStatus("initializing") // InstanceStatusDiskFull is [insert doc]. InstanceStatusDiskFull = InstanceStatus("disk_full") // InstanceStatusBackuping is [insert doc]. InstanceStatusBackuping = InstanceStatus("backuping") )
const ( // ListDatabaseBackupsRequestOrderByCreatedAtAsc is [insert doc]. ListDatabaseBackupsRequestOrderByCreatedAtAsc = ListDatabaseBackupsRequestOrderBy("created_at_asc") // ListDatabaseBackupsRequestOrderByCreatedAtDesc is [insert doc]. ListDatabaseBackupsRequestOrderByCreatedAtDesc = ListDatabaseBackupsRequestOrderBy("created_at_desc") // ListDatabaseBackupsRequestOrderByNameAsc is [insert doc]. ListDatabaseBackupsRequestOrderByNameAsc = ListDatabaseBackupsRequestOrderBy("name_asc") // ListDatabaseBackupsRequestOrderByNameDesc is [insert doc]. ListDatabaseBackupsRequestOrderByNameDesc = ListDatabaseBackupsRequestOrderBy("name_desc") // ListDatabaseBackupsRequestOrderByStatusAsc is [insert doc]. ListDatabaseBackupsRequestOrderByStatusAsc = ListDatabaseBackupsRequestOrderBy("status_asc") // ListDatabaseBackupsRequestOrderByStatusDesc is [insert doc]. ListDatabaseBackupsRequestOrderByStatusDesc = ListDatabaseBackupsRequestOrderBy("status_desc") )
const ( // ListDatabasesRequestOrderByNameAsc is [insert doc]. ListDatabasesRequestOrderByNameAsc = ListDatabasesRequestOrderBy("name_asc") // ListDatabasesRequestOrderByNameDesc is [insert doc]. ListDatabasesRequestOrderByNameDesc = ListDatabasesRequestOrderBy("name_desc") // ListDatabasesRequestOrderBySizeAsc is [insert doc]. ListDatabasesRequestOrderBySizeAsc = ListDatabasesRequestOrderBy("size_asc") // ListDatabasesRequestOrderBySizeDesc is [insert doc]. ListDatabasesRequestOrderBySizeDesc = ListDatabasesRequestOrderBy("size_desc") )
const ( // ListInstanceLogsRequestOrderByCreatedAtAsc is [insert doc]. ListInstanceLogsRequestOrderByCreatedAtAsc = ListInstanceLogsRequestOrderBy("created_at_asc") // ListInstanceLogsRequestOrderByCreatedAtDesc is [insert doc]. ListInstanceLogsRequestOrderByCreatedAtDesc = ListInstanceLogsRequestOrderBy("created_at_desc") )
const ( // ListInstancesRequestOrderByCreatedAtAsc is [insert doc]. ListInstancesRequestOrderByCreatedAtAsc = ListInstancesRequestOrderBy("created_at_asc") // ListInstancesRequestOrderByCreatedAtDesc is [insert doc]. ListInstancesRequestOrderByCreatedAtDesc = ListInstancesRequestOrderBy("created_at_desc") // ListInstancesRequestOrderByNameAsc is [insert doc]. ListInstancesRequestOrderByNameAsc = ListInstancesRequestOrderBy("name_asc") // ListInstancesRequestOrderByNameDesc is [insert doc]. ListInstancesRequestOrderByNameDesc = ListInstancesRequestOrderBy("name_desc") // ListInstancesRequestOrderByRegion is [insert doc]. ListInstancesRequestOrderByRegion = ListInstancesRequestOrderBy("region") // ListInstancesRequestOrderByStatusAsc is [insert doc]. ListInstancesRequestOrderByStatusAsc = ListInstancesRequestOrderBy("status_asc") // ListInstancesRequestOrderByStatusDesc is [insert doc]. ListInstancesRequestOrderByStatusDesc = ListInstancesRequestOrderBy("status_desc") )
const ( // ListPrivilegesRequestOrderByUserNameAsc is [insert doc]. ListPrivilegesRequestOrderByUserNameAsc = ListPrivilegesRequestOrderBy("user_name_asc") // ListPrivilegesRequestOrderByUserNameDesc is [insert doc]. ListPrivilegesRequestOrderByUserNameDesc = ListPrivilegesRequestOrderBy("user_name_desc") // ListPrivilegesRequestOrderByDatabaseNameAsc is [insert doc]. ListPrivilegesRequestOrderByDatabaseNameAsc = ListPrivilegesRequestOrderBy("database_name_asc") // ListPrivilegesRequestOrderByDatabaseNameDesc is [insert doc]. ListPrivilegesRequestOrderByDatabaseNameDesc = ListPrivilegesRequestOrderBy("database_name_desc") )
const ( // ListUsersRequestOrderByNameAsc is [insert doc]. ListUsersRequestOrderByNameAsc = ListUsersRequestOrderBy("name_asc") // ListUsersRequestOrderByNameDesc is [insert doc]. ListUsersRequestOrderByNameDesc = ListUsersRequestOrderBy("name_desc") // ListUsersRequestOrderByIsAdminAsc is [insert doc]. ListUsersRequestOrderByIsAdminAsc = ListUsersRequestOrderBy("is_admin_asc") // ListUsersRequestOrderByIsAdminDesc is [insert doc]. ListUsersRequestOrderByIsAdminDesc = ListUsersRequestOrderBy("is_admin_desc") )
const ( // NodeTypeStockUnknown is [insert doc]. NodeTypeStockUnknown = NodeTypeStock("unknown") // NodeTypeStockLowStock is [insert doc]. NodeTypeStockLowStock = NodeTypeStock("low_stock") // NodeTypeStockOutOfStock is [insert doc]. NodeTypeStockOutOfStock = NodeTypeStock("out_of_stock") // NodeTypeStockAvailable is [insert doc]. NodeTypeStockAvailable = NodeTypeStock("available") )
const ( // PermissionReadonly is [insert doc]. PermissionReadonly = Permission("readonly") // PermissionReadwrite is [insert doc]. PermissionReadwrite = Permission("readwrite") // PermissionAll is [insert doc]. PermissionAll = Permission("all") // PermissionCustom is [insert doc]. PermissionCustom = Permission("custom") // PermissionNone is [insert doc]. PermissionNone = Permission("none") )
const ( // VolumeTypeLssd is [insert doc]. VolumeTypeLssd = VolumeType("lssd") // VolumeTypeBssd is [insert doc]. VolumeTypeBssd = VolumeType("bssd") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ACLRule ¶
type ACLRule struct { IP scw.IPNet `json:"ip"` Port uint32 `json:"port"` // Protocol: // // Default value: tcp Protocol ACLRuleProtocol `json:"protocol"` // Direction: // // Default value: inbound Direction ACLRuleDirection `json:"direction"` // Action: // // Default value: allow Action ACLRuleAction `json:"action"` Description string `json:"description"` }
type ACLRuleAction ¶
type ACLRuleAction string
func (ACLRuleAction) MarshalJSON ¶
func (enum ACLRuleAction) MarshalJSON() ([]byte, error)
func (ACLRuleAction) String ¶
func (enum ACLRuleAction) String() string
func (*ACLRuleAction) UnmarshalJSON ¶
func (enum *ACLRuleAction) UnmarshalJSON(data []byte) error
type ACLRuleDirection ¶
type ACLRuleDirection string
func (ACLRuleDirection) MarshalJSON ¶
func (enum ACLRuleDirection) MarshalJSON() ([]byte, error)
func (ACLRuleDirection) String ¶
func (enum ACLRuleDirection) String() string
func (*ACLRuleDirection) UnmarshalJSON ¶
func (enum *ACLRuleDirection) UnmarshalJSON(data []byte) error
type ACLRuleProtocol ¶
type ACLRuleProtocol string
func (ACLRuleProtocol) MarshalJSON ¶
func (enum ACLRuleProtocol) MarshalJSON() ([]byte, error)
func (ACLRuleProtocol) String ¶
func (enum ACLRuleProtocol) String() string
func (*ACLRuleProtocol) UnmarshalJSON ¶
func (enum *ACLRuleProtocol) UnmarshalJSON(data []byte) error
type ACLRuleRequest ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API: database RDB API
func (*API) AddInstanceACLRules ¶
func (s *API) AddInstanceACLRules(req *AddInstanceACLRulesRequest, opts ...scw.RequestOption) (*AddInstanceACLRulesResponse, error)
AddInstanceACLRules: add an ACL instance to a given instance
func (*API) AddInstanceSettings ¶
func (s *API) AddInstanceSettings(req *AddInstanceSettingsRequest, opts ...scw.RequestOption) (*AddInstanceSettingsResponse, error)
AddInstanceSettings: add an instance setting
func (*API) CloneInstance ¶
func (s *API) CloneInstance(req *CloneInstanceRequest, opts ...scw.RequestOption) (*Instance, error)
CloneInstance: clone an instance
func (*API) CreateDatabase ¶
func (s *API) CreateDatabase(req *CreateDatabaseRequest, opts ...scw.RequestOption) (*Database, error)
CreateDatabase: create a database in a given instance
func (*API) CreateDatabaseBackup ¶
func (s *API) CreateDatabaseBackup(req *CreateDatabaseBackupRequest, opts ...scw.RequestOption) (*DatabaseBackup, error)
CreateDatabaseBackup: create a database backup
func (*API) CreateInstance ¶
func (s *API) CreateInstance(req *CreateInstanceRequest, opts ...scw.RequestOption) (*Instance, error)
CreateInstance: create an instance
func (*API) CreateUser ¶
func (s *API) CreateUser(req *CreateUserRequest, opts ...scw.RequestOption) (*User, error)
CreateUser: create an user in a given instance
func (*API) DeleteDatabase ¶
func (s *API) DeleteDatabase(req *DeleteDatabaseRequest, opts ...scw.RequestOption) error
DeleteDatabase: delete a database in a given instance
func (*API) DeleteDatabaseBackup ¶
func (s *API) DeleteDatabaseBackup(req *DeleteDatabaseBackupRequest, opts ...scw.RequestOption) (*DatabaseBackup, error)
DeleteDatabaseBackup: delete a database backup
func (*API) DeleteInstance ¶
func (s *API) DeleteInstance(req *DeleteInstanceRequest, opts ...scw.RequestOption) (*Instance, error)
DeleteInstance: delete an instance
func (*API) DeleteInstanceACLRules ¶
func (s *API) DeleteInstanceACLRules(req *DeleteInstanceACLRulesRequest, opts ...scw.RequestOption) (*DeleteInstanceACLRulesResponse, error)
DeleteInstanceACLRules: delete ACL rules of a given instance
func (*API) DeleteInstanceSettings ¶
func (s *API) DeleteInstanceSettings(req *DeleteInstanceSettingsRequest, opts ...scw.RequestOption) (*DeleteInstanceSettingsResponse, error)
DeleteInstanceSettings: delete an instance setting
func (*API) DeleteUser ¶
func (s *API) DeleteUser(req *DeleteUserRequest, opts ...scw.RequestOption) error
DeleteUser: delete an user in a given instance
func (*API) ExportDatabaseBackup ¶
func (s *API) ExportDatabaseBackup(req *ExportDatabaseBackupRequest, opts ...scw.RequestOption) (*DatabaseBackup, error)
ExportDatabaseBackup: export a database backup
func (*API) GetDatabaseBackup ¶
func (s *API) GetDatabaseBackup(req *GetDatabaseBackupRequest, opts ...scw.RequestOption) (*DatabaseBackup, error)
GetDatabaseBackup: get a database backup
func (*API) GetInstance ¶
func (s *API) GetInstance(req *GetInstanceRequest, opts ...scw.RequestOption) (*Instance, error)
GetInstance: get an instance
func (*API) GetInstanceCertificate ¶
func (s *API) GetInstanceCertificate(req *GetInstanceCertificateRequest, opts ...scw.RequestOption) (*scw.File, error)
GetInstanceCertificate: get the TLS certificate of an instance
func (*API) GetInstanceLog ¶
func (s *API) GetInstanceLog(req *GetInstanceLogRequest, opts ...scw.RequestOption) (*InstanceLog, error)
GetInstanceLog: get specific logs of a given instance
func (*API) GetInstanceMetrics ¶
func (s *API) GetInstanceMetrics(req *GetInstanceMetricsRequest, opts ...scw.RequestOption) (*InstanceMetrics, error)
GetInstanceMetrics: get instance metrics
Get database instance metrics.
func (*API) GetServiceInfo ¶
func (s *API) GetServiceInfo(req *GetServiceInfoRequest, opts ...scw.RequestOption) (*scw.ServiceInfo, error)
func (*API) ListDatabaseBackups ¶
func (s *API) ListDatabaseBackups(req *ListDatabaseBackupsRequest, opts ...scw.RequestOption) (*ListDatabaseBackupsResponse, error)
ListDatabaseBackups: list database backups
func (*API) ListDatabaseEngines ¶
func (s *API) ListDatabaseEngines(req *ListDatabaseEnginesRequest, opts ...scw.RequestOption) (*ListDatabaseEnginesResponse, error)
ListDatabaseEngines: list available database engines
func (*API) ListDatabases ¶
func (s *API) ListDatabases(req *ListDatabasesRequest, opts ...scw.RequestOption) (*ListDatabasesResponse, error)
ListDatabases: list all database in a given instance
func (*API) ListInstanceACLRules ¶
func (s *API) ListInstanceACLRules(req *ListInstanceACLRulesRequest, opts ...scw.RequestOption) (*ListInstanceACLRulesResponse, error)
ListInstanceACLRules: list ACL rules of a given instance
func (*API) ListInstanceLogs ¶
func (s *API) ListInstanceLogs(req *ListInstanceLogsRequest, opts ...scw.RequestOption) (*ListInstanceLogsResponse, error)
ListInstanceLogs: list available logs of a given instance
func (*API) ListInstances ¶
func (s *API) ListInstances(req *ListInstancesRequest, opts ...scw.RequestOption) (*ListInstancesResponse, error)
ListInstances: list instances
func (*API) ListNodeTypes ¶
func (s *API) ListNodeTypes(req *ListNodeTypesRequest, opts ...scw.RequestOption) (*ListNodeTypesResponse, error)
ListNodeTypes: list available node types
func (*API) ListPrivileges ¶
func (s *API) ListPrivileges(req *ListPrivilegesRequest, opts ...scw.RequestOption) (*ListPrivilegesResponse, error)
ListPrivileges: list privileges of a given user in a given database in a given instance
func (*API) ListUsers ¶
func (s *API) ListUsers(req *ListUsersRequest, opts ...scw.RequestOption) (*ListUsersResponse, error)
ListUsers: list users of a given instance
func (*API) PrepareInstanceLogs ¶
func (s *API) PrepareInstanceLogs(req *PrepareInstanceLogsRequest, opts ...scw.RequestOption) (*PrepareInstanceLogsResponse, error)
PrepareInstanceLogs: prepare logs of a given instance
Prepare your instance logs. Logs will be grouped on a minimum interval of a day.
func (*API) RestoreDatabaseBackup ¶
func (s *API) RestoreDatabaseBackup(req *RestoreDatabaseBackupRequest, opts ...scw.RequestOption) (*DatabaseBackup, error)
RestoreDatabaseBackup: restore a database backup
func (*API) SetInstanceACLRules ¶
func (s *API) SetInstanceACLRules(req *SetInstanceACLRulesRequest, opts ...scw.RequestOption) (*SetInstanceACLRulesResponse, error)
SetInstanceACLRules: set ACL rules for a given instance
func (*API) SetInstanceSettings ¶
func (s *API) SetInstanceSettings(req *SetInstanceSettingsRequest, opts ...scw.RequestOption) (*SetInstanceSettingsResponse, error)
SetInstanceSettings: set a given instance setting
func (*API) SetPrivilege ¶
func (s *API) SetPrivilege(req *SetPrivilegeRequest, opts ...scw.RequestOption) (*Privilege, error)
SetPrivilege: set privileges of a given user in a given database in a given instance
func (*API) UpdateDatabaseBackup ¶
func (s *API) UpdateDatabaseBackup(req *UpdateDatabaseBackupRequest, opts ...scw.RequestOption) (*DatabaseBackup, error)
UpdateDatabaseBackup: update a database backup
func (*API) UpdateInstance ¶
func (s *API) UpdateInstance(req *UpdateInstanceRequest, opts ...scw.RequestOption) (*Instance, error)
UpdateInstance: update an instance
func (*API) UpdateUser ¶
func (s *API) UpdateUser(req *UpdateUserRequest, opts ...scw.RequestOption) (*User, error)
UpdateUser: update an user in a given instance
func (*API) UpgradeInstance ¶
func (s *API) UpgradeInstance(req *UpgradeInstanceRequest, opts ...scw.RequestOption) (*Instance, error)
UpgradeInstance: upgrade an instance to an higher instance type
Upgrade your current `node_type` or enable high availability on your standalone database instance.
func (*API) WaitForDatabaseBackup ¶
func (s *API) WaitForDatabaseBackup(req *WaitForDatabaseBackupRequest) (*DatabaseBackup, error)
WaitForDatabaseBackup waits for the backup to be in a "terminal state" before returning. This function can be used to wait for a backup to be ready for example.
func (*API) WaitForInstance ¶
func (s *API) WaitForInstance(req *WaitForInstanceRequest) (*Instance, error)
WaitForInstance waits for the instance to be in a "terminal state" before returning. This function can be used to wait for an instance to be ready for example.
func (*API) WaitForInstanceLog ¶
func (s *API) WaitForInstanceLog(req *WaitForInstanceLogRequest) (*InstanceLog, error)
WaitForInstanceLog waits for the instance logs to be in a "terminal state" before returning. This function can be used to wait for an instance logs to be ready for example.
type AddInstanceACLRulesRequest ¶
type AddInstanceACLRulesRequest struct { Region scw.Region `json:"-"` // InstanceID: UUID of the instance you want to add acl rules to InstanceID string `json:"-"` // Rules: aCLs rules to add to the instance Rules []*ACLRuleRequest `json:"rules"` }
type AddInstanceACLRulesResponse ¶
type AddInstanceACLRulesResponse struct { // Rules: rules enabled on the instance Rules []*ACLRule `json:"rules"` }
AddInstanceACLRulesResponse: add instance acl rules response
type AddInstanceSettingsRequest ¶
type AddInstanceSettingsRequest struct { Region scw.Region `json:"-"` // InstanceID: UUID of the instance you want to add settings to InstanceID string `json:"-"` // Settings: settings to add on the instance Settings []*InstanceSetting `json:"settings"` }
type AddInstanceSettingsResponse ¶
type AddInstanceSettingsResponse struct { // Settings: settings available on the instance Settings []*InstanceSetting `json:"settings"` }
AddInstanceSettingsResponse: add instance settings response
type BackupSchedule ¶
type CloneInstanceRequest ¶
type CreateDatabaseBackupRequest ¶
type CreateDatabaseBackupRequest struct { Region scw.Region `json:"-"` // InstanceID: UUID of the instance InstanceID string `json:"instance_id"` // DatabaseName: name of the database you want to make a backup of DatabaseName string `json:"database_name"` // Name: name of the backup Name string `json:"name"` // ExpiresAt: expiration date (Format ISO 8601) ExpiresAt *time.Time `json:"expires_at"` }
type CreateDatabaseRequest ¶
type CreateInstanceRequest ¶
type CreateInstanceRequest struct { Region scw.Region `json:"-"` // Deprecated: OrganizationID: please use `project_id` instead // Precisely one of OrganizationID, ProjectID must be set. OrganizationID *string `json:"organization_id,omitempty"` // ProjectID: the project ID on which to create the instance // Precisely one of OrganizationID, ProjectID must be set. ProjectID *string `json:"project_id,omitempty"` // Name: name of the instance Name string `json:"name"` // Engine: database engine of the database (PostgreSQL, MySQL, ...) Engine string `json:"engine"` // UserName: name of the user created when the instance is created UserName string `json:"user_name"` // Password: password of the user Password string `json:"password"` // NodeType: type of node to use for the instance NodeType string `json:"node_type"` // IsHaCluster: whether or not High-Availability is enabled IsHaCluster bool `json:"is_ha_cluster"` // DisableBackup: whether or not backups are disabled DisableBackup bool `json:"disable_backup"` // Tags: tags to apply to the instance Tags []string `json:"tags"` // InitSettings: list of engine settings to be set at database initialisation InitSettings []*InstanceSetting `json:"init_settings"` }
type CreateUserRequest ¶
type CreateUserRequest struct { Region scw.Region `json:"-"` // InstanceID: UUID of the instance you want to create a user in InstanceID string `json:"-"` // Name: name of the user you want to create Name string `json:"name"` // Password: password of the user you want to create Password string `json:"password"` // IsAdmin: whether the user you want to create will have administrative privileges IsAdmin bool `json:"is_admin"` }
type Database ¶
type Database struct { // Name: name of the database Name string `json:"name"` // Owner: name of the owner of the database Owner string `json:"owner"` // Managed: whether or not the database is managed or not Managed bool `json:"managed"` // Size: size of the database Size scw.Size `json:"size"` }
Database: database
type DatabaseBackup ¶
type DatabaseBackup struct { // ID: UUID of the database backup ID string `json:"id"` // InstanceID: UUID of the instance InstanceID string `json:"instance_id"` // DatabaseName: name of the database of this backup DatabaseName string `json:"database_name"` // Name: name of the backup Name string `json:"name"` // Status: status of the backup // // Default value: unknown Status DatabaseBackupStatus `json:"status"` // Size: size of the database backup Size *scw.Size `json:"size"` // ExpiresAt: expiration date (Format ISO 8601) ExpiresAt *time.Time `json:"expires_at"` // CreatedAt: creation date (Format ISO 8601) CreatedAt *time.Time `json:"created_at"` // UpdatedAt: updated date (Format ISO 8601) UpdatedAt *time.Time `json:"updated_at"` // InstanceName: name of the instance of the backup InstanceName string `json:"instance_name"` // DownloadURL: URL you can download the backup from DownloadURL *string `json:"download_url"` // DownloadURLExpiresAt: expiration date of the download link DownloadURLExpiresAt *time.Time `json:"download_url_expires_at"` // Region: region of this database backup Region scw.Region `json:"region"` }
DatabaseBackup: database backup
type DatabaseBackupStatus ¶
type DatabaseBackupStatus string
func (DatabaseBackupStatus) MarshalJSON ¶
func (enum DatabaseBackupStatus) MarshalJSON() ([]byte, error)
func (DatabaseBackupStatus) String ¶
func (enum DatabaseBackupStatus) String() string
func (*DatabaseBackupStatus) UnmarshalJSON ¶
func (enum *DatabaseBackupStatus) UnmarshalJSON(data []byte) error
type DatabaseEngine ¶
type DatabaseEngine struct { // Name: engine name Name string `json:"name"` // LogoURL: engine logo URL LogoURL string `json:"logo_url"` // Versions: available versions Versions []*EngineVersion `json:"versions"` // Region: region of this database engine Region scw.Region `json:"region"` }
DatabaseEngine: database engine
type DeleteDatabaseRequest ¶
type DeleteInstanceACLRulesResponse ¶
type DeleteInstanceACLRulesResponse struct { // Rules: ACL rules present on the instance Rules []*ACLRule `json:"rules"` }
DeleteInstanceACLRulesResponse: delete instance acl rules response
type DeleteInstanceRequest ¶
type DeleteInstanceSettingsResponse ¶
type DeleteInstanceSettingsResponse struct { // Settings: settings names to delete from the instance Settings []*InstanceSetting `json:"settings"` }
DeleteInstanceSettingsResponse: delete instance settings response
type DeleteUserRequest ¶
type Endpoint ¶
type Endpoint struct { // IP: iPv4 address of the endpoint IP *net.IP `json:"ip"` // Port: TCP port of the endpoint Port uint32 `json:"port"` // Name: name of the endpoint Name *string `json:"name"` }
Endpoint: endpoint
type EngineSetting ¶
type EngineSetting struct { // Name: setting name from database engine Name string `json:"name"` // DefaultValue: value set when not specified DefaultValue string `json:"default_value"` // HotConfigurable: setting can be applied without restarting HotConfigurable bool `json:"hot_configurable"` // Description: setting description Description string `json:"description"` // PropertyType: setting type // // Default value: BOOLEAN PropertyType EngineSettingPropertyType `json:"property_type"` // Unit: setting base unit Unit *string `json:"unit"` // StringConstraint: validation regex for string type settings StringConstraint *string `json:"string_constraint"` // IntMin: minimum value for int types IntMin *int32 `json:"int_min"` // IntMax: maximum value for int types IntMax *int32 `json:"int_max"` }
EngineSetting: engine setting
type EngineSettingPropertyType ¶
type EngineSettingPropertyType string
func (EngineSettingPropertyType) MarshalJSON ¶
func (enum EngineSettingPropertyType) MarshalJSON() ([]byte, error)
func (EngineSettingPropertyType) String ¶
func (enum EngineSettingPropertyType) String() string
func (*EngineSettingPropertyType) UnmarshalJSON ¶
func (enum *EngineSettingPropertyType) UnmarshalJSON(data []byte) error
type EngineVersion ¶
type EngineVersion struct { // Version: database engine version Version string `json:"version"` // Name: database engine name Name string `json:"name"` // EndOfLife: end of life date EndOfLife *time.Time `json:"end_of_life"` // AvailableSettings: engine settings available to be set AvailableSettings []*EngineSetting `json:"available_settings"` // Disabled: disabled versions cannot be created Disabled bool `json:"disabled"` // Beta: beta status of engine version Beta bool `json:"beta"` // AvailableInitSettings: engine settings available to be set at database initialisation AvailableInitSettings []*EngineSetting `json:"available_init_settings"` }
EngineVersion: engine version
type GetInstanceLogRequest ¶
type GetInstanceMetricsRequest ¶
type GetInstanceMetricsRequest struct { Region scw.Region `json:"-"` // InstanceID: UUID of the instance InstanceID string `json:"-"` // StartDate: start date to gather metrics from StartDate *time.Time `json:"-"` // EndDate: end date to gather metrics from EndDate *time.Time `json:"-"` // MetricName: name of the metric to gather MetricName *string `json:"-"` }
type GetInstanceRequest ¶
type GetServiceInfoRequest ¶
type Instance ¶
type Instance struct { // CreatedAt: creation date (Format ISO 8601) CreatedAt *time.Time `json:"created_at"` // Volume: volumes of the instance Volume *Volume `json:"volume"` // Region: region the instance is in Region scw.Region `json:"region"` // ID: UUID of the instance ID string `json:"id"` // Name: name of the instance Name string `json:"name"` // OrganizationID: organization ID the instance belongs to OrganizationID string `json:"organization_id"` // ProjectID: project ID the instance belongs to ProjectID string `json:"project_id"` // Status: status of the instance // // Default value: unknown Status InstanceStatus `json:"status"` // Engine: database engine of the database (PostgreSQL, MySQL, ...) Engine string `json:"engine"` // Endpoint: endpoint of the instance Endpoint *Endpoint `json:"endpoint"` // Tags: list of tags applied to the instance Tags []string `json:"tags"` // Settings: advanced settings of the instance Settings []*InstanceSetting `json:"settings"` // BackupSchedule: backup schedule of the instance BackupSchedule *BackupSchedule `json:"backup_schedule"` // IsHaCluster: whether or not High-Availability is enabled IsHaCluster bool `json:"is_ha_cluster"` // ReadReplicas: read replicas of the instance ReadReplicas []*Endpoint `json:"read_replicas"` // NodeType: node type of the instance NodeType string `json:"node_type"` // InitSettings: list of engine settings to be set at database initialisation InitSettings []*InstanceSetting `json:"init_settings"` }
Instance: instance
type InstanceLog ¶
type InstanceLog struct { // DownloadURL: presigned S3 URL to download your log file DownloadURL *string `json:"download_url"` // ID: UUID of the instance log ID string `json:"id"` // Status: status of the logs in a given instance // // Default value: unknown Status InstanceLogStatus `json:"status"` // NodeName: name of the undelying node NodeName string `json:"node_name"` // ExpiresAt: expiration date (Format ISO 8601) ExpiresAt *time.Time `json:"expires_at"` // CreatedAt: creation date (Format ISO 8601) CreatedAt *time.Time `json:"created_at"` // Region: region the instance is in Region scw.Region `json:"region"` }
InstanceLog: instance log
type InstanceLogStatus ¶
type InstanceLogStatus string
func (InstanceLogStatus) MarshalJSON ¶
func (enum InstanceLogStatus) MarshalJSON() ([]byte, error)
func (InstanceLogStatus) String ¶
func (enum InstanceLogStatus) String() string
func (*InstanceLogStatus) UnmarshalJSON ¶
func (enum *InstanceLogStatus) UnmarshalJSON(data []byte) error
type InstanceMetrics ¶
type InstanceMetrics struct { // Timeseries: time series of metrics of a given instance Timeseries []*scw.TimeSeries `json:"timeseries"` }
InstanceMetrics: instance metrics
type InstanceSetting ¶
type InstanceStatus ¶
type InstanceStatus string
func (InstanceStatus) MarshalJSON ¶
func (enum InstanceStatus) MarshalJSON() ([]byte, error)
func (InstanceStatus) String ¶
func (enum InstanceStatus) String() string
func (*InstanceStatus) UnmarshalJSON ¶
func (enum *InstanceStatus) UnmarshalJSON(data []byte) error
type ListDatabaseBackupsRequest ¶
type ListDatabaseBackupsRequest struct { Region scw.Region `json:"-"` // Name: name of the database backups Name *string `json:"-"` // OrderBy: criteria to use when ordering database backups listing // // Default value: created_at_asc OrderBy ListDatabaseBackupsRequestOrderBy `json:"-"` // InstanceID: UUID of the instance InstanceID *string `json:"-"` // OrganizationID: organization ID the database backups belongs to OrganizationID *string `json:"-"` // ProjectID: project ID the database backups belongs to ProjectID *string `json:"-"` Page *int32 `json:"-"` PageSize *uint32 `json:"-"` }
type ListDatabaseBackupsRequestOrderBy ¶
type ListDatabaseBackupsRequestOrderBy string
func (ListDatabaseBackupsRequestOrderBy) MarshalJSON ¶
func (enum ListDatabaseBackupsRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListDatabaseBackupsRequestOrderBy) String ¶
func (enum ListDatabaseBackupsRequestOrderBy) String() string
func (*ListDatabaseBackupsRequestOrderBy) UnmarshalJSON ¶
func (enum *ListDatabaseBackupsRequestOrderBy) UnmarshalJSON(data []byte) error
type ListDatabaseBackupsResponse ¶
type ListDatabaseBackupsResponse struct { // DatabaseBackups: list of database backups DatabaseBackups []*DatabaseBackup `json:"database_backups"` // TotalCount: total count of database backups available TotalCount uint32 `json:"total_count"` }
ListDatabaseBackupsResponse: list database backups response
func (*ListDatabaseBackupsResponse) UnsafeAppend ¶
func (r *ListDatabaseBackupsResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListDatabaseBackupsResponse) UnsafeGetTotalCount ¶
func (r *ListDatabaseBackupsResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
type ListDatabaseEnginesResponse ¶
type ListDatabaseEnginesResponse struct { // Engines: list of the available database engines Engines []*DatabaseEngine `json:"engines"` // TotalCount: total count of database engines available TotalCount uint32 `json:"total_count"` }
ListDatabaseEnginesResponse: list database engines response
func (*ListDatabaseEnginesResponse) UnsafeAppend ¶
func (r *ListDatabaseEnginesResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListDatabaseEnginesResponse) UnsafeGetTotalCount ¶
func (r *ListDatabaseEnginesResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
type ListDatabasesRequest ¶
type ListDatabasesRequest struct { Region scw.Region `json:"-"` // InstanceID: UUID of the instance to list database of InstanceID string `json:"-"` // Name: name of the database Name *string `json:"-"` // Managed: whether or not the database is managed Managed *bool `json:"-"` // Owner: user that owns this database Owner *string `json:"-"` // OrderBy: criteria to use when ordering database listing // // Default value: name_asc OrderBy ListDatabasesRequestOrderBy `json:"-"` Page *int32 `json:"-"` PageSize *uint32 `json:"-"` }
type ListDatabasesRequestOrderBy ¶
type ListDatabasesRequestOrderBy string
func (ListDatabasesRequestOrderBy) MarshalJSON ¶
func (enum ListDatabasesRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListDatabasesRequestOrderBy) String ¶
func (enum ListDatabasesRequestOrderBy) String() string
func (*ListDatabasesRequestOrderBy) UnmarshalJSON ¶
func (enum *ListDatabasesRequestOrderBy) UnmarshalJSON(data []byte) error
type ListDatabasesResponse ¶
type ListDatabasesResponse struct { // Databases: list of the databases Databases []*Database `json:"databases"` // TotalCount: total count of databases present on a given instance TotalCount uint32 `json:"total_count"` }
ListDatabasesResponse: list databases response
func (*ListDatabasesResponse) UnsafeAppend ¶
func (r *ListDatabasesResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListDatabasesResponse) UnsafeGetTotalCount ¶
func (r *ListDatabasesResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
type ListInstanceACLRulesResponse ¶
type ListInstanceACLRulesResponse struct { // Rules: list of the ACL rules present on a given instance Rules []*ACLRule `json:"rules"` // TotalCount: total count of ACL rules present on a given instance TotalCount uint32 `json:"total_count"` }
ListInstanceACLRulesResponse: list instance acl rules response
func (*ListInstanceACLRulesResponse) UnsafeAppend ¶
func (r *ListInstanceACLRulesResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListInstanceACLRulesResponse) UnsafeGetTotalCount ¶
func (r *ListInstanceACLRulesResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
type ListInstanceLogsRequest ¶
type ListInstanceLogsRequest struct { Region scw.Region `json:"-"` // InstanceID: UUID of the instance you want logs of InstanceID string `json:"-"` // OrderBy: criteria to use when ordering instance logs listing // // Default value: created_at_asc OrderBy ListInstanceLogsRequestOrderBy `json:"-"` }
type ListInstanceLogsRequestOrderBy ¶
type ListInstanceLogsRequestOrderBy string
func (ListInstanceLogsRequestOrderBy) MarshalJSON ¶
func (enum ListInstanceLogsRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListInstanceLogsRequestOrderBy) String ¶
func (enum ListInstanceLogsRequestOrderBy) String() string
func (*ListInstanceLogsRequestOrderBy) UnmarshalJSON ¶
func (enum *ListInstanceLogsRequestOrderBy) UnmarshalJSON(data []byte) error
type ListInstanceLogsResponse ¶
type ListInstanceLogsResponse struct { // InstanceLogs: available logs in a given instance InstanceLogs []*InstanceLog `json:"instance_logs"` }
ListInstanceLogsResponse: list instance logs response
type ListInstancesRequest ¶
type ListInstancesRequest struct { Region scw.Region `json:"-"` // Tags: list instance that have a given tags Tags []string `json:"-"` // Name: list instance that match a given name pattern Name *string `json:"-"` // OrderBy: criteria to use when ordering instance listing // // Default value: created_at_asc OrderBy ListInstancesRequestOrderBy `json:"-"` // OrganizationID: please use `project_id` instead OrganizationID *string `json:"-"` // ProjectID: project ID to list the instance of ProjectID *string `json:"-"` Page *int32 `json:"-"` PageSize *uint32 `json:"-"` }
type ListInstancesRequestOrderBy ¶
type ListInstancesRequestOrderBy string
func (ListInstancesRequestOrderBy) MarshalJSON ¶
func (enum ListInstancesRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListInstancesRequestOrderBy) String ¶
func (enum ListInstancesRequestOrderBy) String() string
func (*ListInstancesRequestOrderBy) UnmarshalJSON ¶
func (enum *ListInstancesRequestOrderBy) UnmarshalJSON(data []byte) error
type ListInstancesResponse ¶
type ListInstancesResponse struct { // Instances: list all instances available in a given organization/project Instances []*Instance `json:"instances"` // TotalCount: total count of instances available in a given organization/project TotalCount uint32 `json:"total_count"` }
ListInstancesResponse: list instances response
func (*ListInstancesResponse) UnsafeAppend ¶
func (r *ListInstancesResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListInstancesResponse) UnsafeGetTotalCount ¶
func (r *ListInstancesResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
type ListNodeTypesRequest ¶
type ListNodeTypesResponse ¶
type ListNodeTypesResponse struct { // NodeTypes: types of the node NodeTypes []*NodeType `json:"node_types"` // TotalCount: total count of node-types available TotalCount uint32 `json:"total_count"` }
ListNodeTypesResponse: list node types response
func (*ListNodeTypesResponse) UnsafeAppend ¶
func (r *ListNodeTypesResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListNodeTypesResponse) UnsafeGetTotalCount ¶
func (r *ListNodeTypesResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
type ListPrivilegesRequest ¶
type ListPrivilegesRequest struct { Region scw.Region `json:"-"` // InstanceID: UUID of the instance InstanceID string `json:"-"` // OrderBy: criteria to use when ordering privileges listing // // Default value: user_name_asc OrderBy ListPrivilegesRequestOrderBy `json:"-"` Page *int32 `json:"-"` PageSize *uint32 `json:"-"` // DatabaseName: name of the database DatabaseName *string `json:"-"` // UserName: name of the user UserName *string `json:"-"` }
type ListPrivilegesRequestOrderBy ¶
type ListPrivilegesRequestOrderBy string
func (ListPrivilegesRequestOrderBy) MarshalJSON ¶
func (enum ListPrivilegesRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListPrivilegesRequestOrderBy) String ¶
func (enum ListPrivilegesRequestOrderBy) String() string
func (*ListPrivilegesRequestOrderBy) UnmarshalJSON ¶
func (enum *ListPrivilegesRequestOrderBy) UnmarshalJSON(data []byte) error
type ListPrivilegesResponse ¶
type ListPrivilegesResponse struct { // Privileges: privileges of a given user in a given database in a given instance Privileges []*Privilege `json:"privileges"` // TotalCount: total count of privileges present on a given database TotalCount uint32 `json:"total_count"` }
ListPrivilegesResponse: list privileges response
func (*ListPrivilegesResponse) UnsafeAppend ¶
func (r *ListPrivilegesResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListPrivilegesResponse) UnsafeGetTotalCount ¶
func (r *ListPrivilegesResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
type ListUsersRequest ¶
type ListUsersRequest struct { Region scw.Region `json:"-"` // InstanceID: UUID of the instance InstanceID string `json:"-"` // Name: name of the user Name *string `json:"-"` // OrderBy: criteria to use when ordering users listing // // Default value: name_asc OrderBy ListUsersRequestOrderBy `json:"-"` Page *int32 `json:"-"` PageSize *uint32 `json:"-"` }
type ListUsersRequestOrderBy ¶
type ListUsersRequestOrderBy string
func (ListUsersRequestOrderBy) MarshalJSON ¶
func (enum ListUsersRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListUsersRequestOrderBy) String ¶
func (enum ListUsersRequestOrderBy) String() string
func (*ListUsersRequestOrderBy) UnmarshalJSON ¶
func (enum *ListUsersRequestOrderBy) UnmarshalJSON(data []byte) error
type ListUsersResponse ¶
type ListUsersResponse struct { // Users: list of users in a given instance Users []*User `json:"users"` // TotalCount: total count of users present on a given instance TotalCount uint32 `json:"total_count"` }
ListUsersResponse: list users response
func (*ListUsersResponse) UnsafeAppend ¶
func (r *ListUsersResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListUsersResponse) UnsafeGetTotalCount ¶
func (r *ListUsersResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
type NodeType ¶
type NodeType struct { Name string `json:"name"` // StockStatus: // // Default value: unknown StockStatus NodeTypeStock `json:"stock_status"` Description string `json:"description"` Vcpus uint32 `json:"vcpus"` Memory scw.Size `json:"memory"` VolumeConstraint *NodeTypeVolumeConstraintSizes `json:"volume_constraint"` IsBssdCompatible bool `json:"is_bssd_compatible"` Disabled bool `json:"disabled"` Beta bool `json:"beta"` Region scw.Region `json:"region"` }
type NodeTypeStock ¶
type NodeTypeStock string
func (NodeTypeStock) MarshalJSON ¶
func (enum NodeTypeStock) MarshalJSON() ([]byte, error)
func (NodeTypeStock) String ¶
func (enum NodeTypeStock) String() string
func (*NodeTypeStock) UnmarshalJSON ¶
func (enum *NodeTypeStock) UnmarshalJSON(data []byte) error
type Permission ¶
type Permission string
func (Permission) MarshalJSON ¶
func (enum Permission) MarshalJSON() ([]byte, error)
func (Permission) String ¶
func (enum Permission) String() string
func (*Permission) UnmarshalJSON ¶
func (enum *Permission) UnmarshalJSON(data []byte) error
type PrepareInstanceLogsRequest ¶
type PrepareInstanceLogsRequest struct { Region scw.Region `json:"-"` // InstanceID: UUID of the instance you want logs of InstanceID string `json:"-"` // StartDate: start datetime of your log. Format: `{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z` StartDate *time.Time `json:"start_date"` // EndDate: end datetime of your log. Format: `{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z` EndDate *time.Time `json:"end_date"` }
type PrepareInstanceLogsResponse ¶
type PrepareInstanceLogsResponse struct { // InstanceLogs: instance logs for a given instance between a start and an end date InstanceLogs []*InstanceLog `json:"instance_logs"` }
PrepareInstanceLogsResponse: prepare instance logs response
type Privilege ¶
type Privilege struct { // Permission: permission (Read, Read/Write, All, Custom) // // Default value: readonly Permission Permission `json:"permission"` // DatabaseName: name of the database DatabaseName string `json:"database_name"` // UserName: name of the user UserName string `json:"user_name"` }
Privilege: privilege
type RestoreDatabaseBackupRequest ¶
type RestoreDatabaseBackupRequest struct { Region scw.Region `json:"-"` // DatabaseBackupID: backup of a logical database DatabaseBackupID string `json:"-"` // DatabaseName: defines the destination database in order to restore into a specified database, the default destination is set to the origin database of the backup DatabaseName *string `json:"database_name"` // InstanceID: defines the rdb instance where the backup has to be restored InstanceID string `json:"instance_id"` }
type SetInstanceACLRulesRequest ¶
type SetInstanceACLRulesRequest struct { Region scw.Region `json:"-"` // InstanceID: UUID of the instance where the ACL rules has to be set InstanceID string `json:"-"` // Rules: ACL rules to define for the instance Rules []*ACLRuleRequest `json:"rules"` }
type SetInstanceACLRulesResponse ¶
type SetInstanceACLRulesResponse struct { // Rules: aCLs rules configured for an instance Rules []*ACLRule `json:"rules"` }
SetInstanceACLRulesResponse: set instance acl rules response
type SetInstanceSettingsRequest ¶
type SetInstanceSettingsRequest struct { Region scw.Region `json:"-"` // InstanceID: UUID of the instance where the settings has to be set InstanceID string `json:"-"` // Settings: settings to define for the instance Settings []*InstanceSetting `json:"settings"` }
type SetInstanceSettingsResponse ¶
type SetInstanceSettingsResponse struct { // Settings: settings configured for a given instance Settings []*InstanceSetting `json:"settings"` }
SetInstanceSettingsResponse: set instance settings response
type SetPrivilegeRequest ¶
type SetPrivilegeRequest struct { Region scw.Region `json:"-"` // InstanceID: UUID of the instance InstanceID string `json:"-"` // DatabaseName: name of the database DatabaseName string `json:"database_name"` // UserName: name of the user UserName string `json:"user_name"` // Permission: permission to set (Read, Read/Write, All, Custom) // // Default value: readonly Permission Permission `json:"permission"` }
type UpdateDatabaseBackupRequest ¶
type UpdateDatabaseBackupRequest struct { Region scw.Region `json:"-"` // DatabaseBackupID: UUID of the database backup to update DatabaseBackupID string `json:"-"` // Name: name of the Database Backup Name *string `json:"name"` // ExpiresAt: expiration date (Format ISO 8601) ExpiresAt *time.Time `json:"expires_at"` }
type UpdateInstanceRequest ¶
type UpdateInstanceRequest struct { Region scw.Region `json:"-"` // InstanceID: UUID of the instance to update InstanceID string `json:"-"` // BackupScheduleFrequency: in hours BackupScheduleFrequency *uint32 `json:"backup_schedule_frequency"` // BackupScheduleRetention: in days BackupScheduleRetention *uint32 `json:"backup_schedule_retention"` // IsBackupScheduleDisabled: whether or not the backup schedule is disabled IsBackupScheduleDisabled *bool `json:"is_backup_schedule_disabled"` // Name: name of the instance Name *string `json:"name"` // Tags: tags of a given instance Tags *[]string `json:"tags"` }
type UpdateUserRequest ¶
type UpdateUserRequest struct { Region scw.Region `json:"-"` // InstanceID: UUID of the instance the user belongs to InstanceID string `json:"-"` // Name: name of the database user Name string `json:"-"` // Password: password of the database user Password *string `json:"password"` // IsAdmin: whether or not this user got administrative privileges IsAdmin *bool `json:"is_admin"` }
type UpgradeInstanceRequest ¶
type UpgradeInstanceRequest struct { Region scw.Region `json:"-"` // InstanceID: UUID of the instance you want to upgrade InstanceID string `json:"-"` // NodeType: node type of the instance you want to upgrade to // Precisely one of EnableHa, NodeType must be set. NodeType *string `json:"node_type,omitempty"` // EnableHa: set to true to enable high availability on your instance // Precisely one of EnableHa, NodeType must be set. EnableHa *bool `json:"enable_ha,omitempty"` }
type User ¶
type User struct { // Name: name of the user (Length must be between 1 and 63 characters, First character must be an alphabet character (a-zA-Z), Your Username cannot start with '_rdb', Only a-zA-Z0-9_$- characters are accepted) Name string `json:"name"` // IsAdmin: whether or not a user got administrative privileges on the database instance IsAdmin bool `json:"is_admin"` }
User: user
type Volume ¶
type Volume struct { // Type: // // Default value: lssd Type VolumeType `json:"type"` Size scw.Size `json:"size"` }
type VolumeType ¶
type VolumeType string
func (VolumeType) MarshalJSON ¶
func (enum VolumeType) MarshalJSON() ([]byte, error)
func (VolumeType) String ¶
func (enum VolumeType) String() string
func (*VolumeType) UnmarshalJSON ¶
func (enum *VolumeType) UnmarshalJSON(data []byte) error