Documentation ¶
Overview ¶
Package gaiadb defines the GAIADB services of BCE. The supported APIs are all defined in sub-package
gaiadb.go - the gaiadb APIs definition supported by the GAIADB service
util.go - define the utilities for api package of GAIADB service
Index ¶
- Constants
- func Aes128EncryptUseSecreteKey(sk string, data string) (string, error)
- func Json(v interface{}) string
- type Access
- type AccountDetail
- type AccountInfo
- type AccountList
- type AccountPrivilege
- type ApplyParamTemplateArgs
- type ApplyRecord
- type AuthIp
- type AuthIpArgs
- type AutoJoinRequestItem
- type AvailableSubnet
- type BindTagsArgs
- type BinlogDetail
- type BinlogItem
- type BinlogList
- type Client
- func (c *Client) ApplyParamTemplate(templateId string, args *ApplyParamTemplateArgs) error
- func (c *Client) BindTags(args *BindTagsArgs) error
- func (c *Client) CancelTask(taskId string) error
- func (c *Client) ClusterSwitch(clusterId string, args *ClusterSwitchArgs) (*ClusterSwitchResult, error)
- func (c *Client) CreateAccount(clusterId string, args *CreateAccountArgs) error
- func (c *Client) CreateCluster(args *CreateClusterArgs) (*CreateResult, error)
- func (c *Client) CreateDatabase(clusterId string, args *CreateDatabaseArgs) error
- func (c *Client) CreateMultiactiveGroup(args *CreateMultiactiveGroupArgs) (*CreateMultiactiveGroupResult, error)
- func (c *Client) CreateParamTemplate(args *CreateParamTemplateArgs) error
- func (c *Client) CreateSnapshot(clusterId string) error
- func (c *Client) DeleteAccount(clusterId, accountName string) error
- func (c *Client) DeleteCluster(clusterId string) error
- func (c *Client) DeleteDatabase(clusterId, dbName string) error
- func (c *Client) DeleteMultiactiveGroup(groupId string) error
- func (c *Client) DeleteParamTemplate(templateId string) error
- func (c *Client) DeleteParamsFromTemp(templateId string, args *Params) error
- func (c *Client) ExecuteTaskNow(taskId string) error
- func (c *Client) GetAccountDetail(clusterId, accountName string) (*AccountDetail, error)
- func (c *Client) GetAccountList(clusterId string) (*AccountList, error)
- func (c *Client) GetAvailableSubnetList(vpcId string) ([]AvailableSubnet, error)
- func (c *Client) GetBinlogDetail(binlogId string, args *GetBinlogArgs) (*BinlogDetail, error)
- func (c *Client) GetBinlogList(args *GetBinlogListArgs) (*BinlogList, error)
- func (c *Client) GetClusterByLbId(lbIds string) (*ClusterList, error)
- func (c *Client) GetClusterByVpcId(vpcId string) (*ClusterList, error)
- func (c *Client) GetClusterCapacity(clusterId string) (*ClusterCapacityResult, error)
- func (c *Client) GetClusterDetail(clusterId string) (*ClusterDetailResult, error)
- func (c *Client) GetClusterList(args *Marker) (*ClusterListResult, error)
- func (c *Client) GetInterfaceList(clusterId string) (*InterfaceListResult, error)
- func (c *Client) GetMaintenTime(clusterId string) (*MaintenTimeDetail, error)
- func (c *Client) GetOrderInfo(orderId string) (*OrderInfo, error)
- func (c *Client) GetParamTemplateDetail(templateId, detail string) (*ParamTemplateDetail, error)
- func (c *Client) GetParamTemplateHistory(templateId, action string) (*ParamTemplateHistory, error)
- func (c *Client) GetParamsHistory(clusterId string) (*GetParamsHistoryResult, error)
- func (c *Client) GetParamsList(clusterId string) (*GetParamsListResult, error)
- func (c *Client) GetSlowSqlDetail(clusterId string, args *GetSlowSqlArgs) (*SlowSqlDetailDetail, error)
- func (c *Client) GetSnapshotPolicy(clusterId string) (*SnapshotPolicy, error)
- func (c *Client) GetSyncStatus(groupId, followerClusterId string) (*GetSyncStatusResult, error)
- func (c *Client) GetTaskList(args *TaskListArgs) (*TaskList, error)
- func (c *Client) GetTemplateApplyRecords(templateId string) (*GetTemplateApplyRecordsResult, error)
- func (c *Client) GetWhiteList(clusterId string) (*WhiteList, error)
- func (c *Client) GroupExchange(groupId string, args *ExchangeArgs) error
- func (c *Client) ListDatabase(clusterId string) (*DatabaseList, error)
- func (c *Client) ListParamTemplate(args *ListParamTempArgs) (*ListParamTempResult, error)
- func (c *Client) ListSnapshot(clusterId string) (*SnapshotList, error)
- func (c *Client) ModifyParams(templateId string, args *ModifyParamsArgs) error
- func (c *Client) MultiactiveGroupDetail(groupId string) (*MultiactiveGroupDetailResult, error)
- func (c *Client) MultiactiveGroupList() (*MultiactiveGroupListResult, error)
- func (c *Client) NewInstanceAutoJoin(clusterId string, args *NewInstanceAutoJoinArgs) error
- func (c *Client) QueryClusterPrice(args *QueryPriceArgs) (*PriceResult, error)
- func (c *Client) QueryResizeClusterPrice(args *QueryResizePriceArgs) (*PriceResult, error)
- func (c *Client) RebootInstance(clusterId, instanceId string, args *RebootInstanceArgs) error
- func (c *Client) RenameCluster(clusterId string, args *ClusterName) error
- func (c *Client) RenameMultiactiveGroup(groupId string, args *RenameMultiactiveGroupArgs) error
- func (c *Client) Request(method, uri string, body interface{}) (interface{}, error)
- func (c *Client) ResizeCluster(clusterId string, args *ResizeClusterArgs) (*OrderId, error)
- func (c *Client) SaveAsParamTemplate(args *ParamTempArgs) error
- func (c *Client) SlowSqlAdvice(clusterId, sqlId string) (*SlowSqlAdviceDetail, error)
- func (c *Client) UpdateAccountAuthIp(clusterId, accountName string, args *AuthIpArgs) error
- func (c *Client) UpdateAccountPassword(clusterId, accountName string, args *PasswordArgs) error
- func (c *Client) UpdateAccountPrivileges(clusterId, accountName string, args *PrivilegesArgs) error
- func (c *Client) UpdateAccountRemark(clusterId, accountName string, args *RemarkArgs) error
- func (c *Client) UpdateDnsName(clusterId string, args *UpdateDnsNameArgs) error
- func (c *Client) UpdateInterface(clusterId string, args *UpdateInterfaceArgs) error
- func (c *Client) UpdateMaintenTime(clusterId string, args *UpdateMaintenTimeArgs) error
- func (c *Client) UpdateParamTemplate(templateId string, args *UpdateParamTplArgs) error
- func (c *Client) UpdateParams(clusterId string, args *UpdateParamsArgs) error
- func (c *Client) UpdateSnapshotPolicy(clusterId string, args *UpdateSnapshotPolicyArgs) error
- func (c *Client) UpdateWhiteList(clusterId string, args *WhiteList) error
- type Cluster
- type ClusterCapacityResult
- type ClusterDetailResult
- type ClusterItem
- type ClusterList
- type ClusterListResult
- type ClusterName
- type ClusterSwitchArgs
- type ClusterSwitchResult
- type ComputeNode
- type CreateAccountArgs
- type CreateClusterArgs
- type CreateDatabaseArgs
- type CreateMultiactiveGroupArgs
- type CreateMultiactiveGroupResult
- type CreateParamTemplateArgs
- type CreateResult
- type DataBackupRetainStrategy
- type DatabaseInfo
- type DatabaseList
- type DatabasePrivilege
- type EncryptStrategy
- type Endpoint
- type ExchangeArgs
- type Flavor
- type FollowerCluster
- type GetBinlogArgs
- type GetBinlogListArgs
- type GetParamsHistoryResult
- type GetParamsListResult
- type GetSlowSqlArgs
- type GetSyncStatusResult
- type GetTemplateApplyRecordsResult
- type InstanceInfo
- type InstanceParam
- type Interface
- type InterfaceInfo
- type InterfaceListResult
- type Interfacee
- type LbInfos
- type LeaderCluster
- type ListParamTempArgs
- type ListParamTempResult
- type MaintenTime
- type MaintenTimeDetail
- type Marker
- type ModifyParamsArgs
- type MultiactiveGroupDetailResult
- type MultiactiveGroupInfo
- type MultiactiveGroupListResult
- type NewInstanceAutoJoinArgs
- type OrderId
- type OrderInfo
- type Pagination
- type Param
- type ParamTempArgs
- type ParamTemplate
- type ParamTemplateDetail
- type ParamTemplateHistory
- type ParamTemplateRecord
- type Params
- type ParamsItem
- type PasswordArgs
- type PriceResult
- type PrivilegesArgs
- type Proxy
- type QueryPriceArgs
- type QueryResizePriceArgs
- type RebootInstanceArgs
- type Record
- type RemarkArgs
- type RenameMultiactiveGroupArgs
- type ResizeClusterArgs
- type Resource
- type SlowSqlAdvice
- type SlowSqlAdviceDetail
- type SlowSqlDetailDetail
- type SlowSqlDetailItem
- type Snapshot
- type SnapshotList
- type SnapshotPolicy
- type SnapshotPolicyPolicy
- type Tag
- type TaskId
- type TaskItem
- type TaskList
- type TaskListArgs
- type UpdateDnsNameArgs
- type UpdateInterfaceArgs
- type UpdateMaintenTimeArgs
- type UpdateParamTplArgs
- type UpdateParamsArgs
- type UpdateSnapshotPolicyArgs
- type WhiteList
Constants ¶
const ( URI_PREFIX = bce.URI_PREFIX + "v1" DEFAULT_ENDPOINT = "gaiadb.bj.baidubce.com" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AccountDetail ¶
type AccountDetail struct {
Account AccountInfo `json:"account"`
}
type AccountInfo ¶
type AccountList ¶
type AccountList struct {
Accounts []AccountInfo `json:"accounts"`
}
type AccountPrivilege ¶
type ApplyParamTemplateArgs ¶
type ApplyParamTemplateArgs struct { Timing string `json:"timing"` Clusters ParamsItem `json:"clusters"` }
type ApplyRecord ¶
type ApplyRecord struct { Status string `json:"status"` FinishTime string `json:"finishTime"` ClusterId string `json:"clusterId"` ClusterName string `json:"clusterName"` ClusterStatus string `json:"clusterStatus"` ClusterRegion string `json:"clusterRegion"` StartTime string `json:"startTime"` ErrMsg string `json:"errMsg"` }
type AuthIpArgs ¶
type AutoJoinRequestItem ¶
type AvailableSubnet ¶ added in v0.9.183
type BindTagsArgs ¶
type BindTagsArgs struct {
Resources []Resource `json:"resources"`
}
type BinlogDetail ¶
type BinlogItem ¶
type BinlogList ¶
type BinlogList struct { LogBackups []BinlogItem `json:"logBackups"` Pagination Pagination `json:"pagination"` }
type Client ¶
Client of GAIADB service is a kind of BceClient, so derived from BceClient
func (*Client) ApplyParamTemplate ¶
func (c *Client) ApplyParamTemplate(templateId string, args *ApplyParamTemplateArgs) error
ApplyParamTemplate - apply param template
PARAMS:
-templateId: template id - args: the params to apply param template
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) BindTags ¶
func (c *Client) BindTags(args *BindTagsArgs) error
BindTags - bind tags
PARAMS:
- args: the arguments to bind tags
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) CancelTask ¶
CancelTask - cancel task
PARAMS:
- taskId : task id
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) ClusterSwitch ¶
func (c *Client) ClusterSwitch(clusterId string, args *ClusterSwitchArgs) (*ClusterSwitchResult, error)
ClusterSwitch - cluster switch
PARAMS:
- clusterId: the cluster id
- args: the arguments to switch cluster
RETURNS:
- error: nil if success otherwise the specific error
- *SwitchResult: the result of switch cluster
func (*Client) CreateAccount ¶
func (c *Client) CreateAccount(clusterId string, args *CreateAccountArgs) error
CreateAccount - create account
PARAMS:
- clusterId: cluster id
- args: the arguments to create account
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) CreateCluster ¶
func (c *Client) CreateCluster(args *CreateClusterArgs) (*CreateResult, error)
CreateCluster - create gaiadb cluster
PARAMS:
- args: the arguments to create gaiadb cluster
RETURNS:
- *CreateResult: the result of create gaiadb cluster
- error: nil if success otherwise the specific error
func (*Client) CreateDatabase ¶
func (c *Client) CreateDatabase(clusterId string, args *CreateDatabaseArgs) error
CreateDatabase - create database
PARAMS:
- clusterId: cluster id
- args: the arguments to create database
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) CreateMultiactiveGroup ¶
func (c *Client) CreateMultiactiveGroup(args *CreateMultiactiveGroupArgs) (*CreateMultiactiveGroupResult, error)
CreateMultiactiveGroup - create multiactive group
PARAMS:
- args: the arguments to create multiactive group
RETURNS:
- error: nil if success otherwise the specific error
- *CreateMultiactiveGroupResult: multiactive group result
func (*Client) CreateParamTemplate ¶
func (c *Client) CreateParamTemplate(args *CreateParamTemplateArgs) error
CreateParamTemplate - create param template
PARAMS:
- args: the params to create param template
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) CreateSnapshot ¶
CreateSnapshot - create snapshot
PARAMS:
- clusterId: cluster id
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) DeleteAccount ¶
DeleteAccount - delete account
PARAMS:
- clusterId: cluster id
- accountName: account name to delete
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) DeleteCluster ¶
DeleteCluster - delete gaiadb cluster
PARAMS:
- clusterId: the cluster id which you want to delete
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) DeleteDatabase ¶
DeleteDatabase - delete database
PARAMS:
- clusterId: cluster id
- dbName: the database name to delete
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) DeleteMultiactiveGroup ¶
DeleteMultiactiveGroup - elete multiactive group
PARAMS:
- groupId: multiactive group id
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) DeleteParamTemplate ¶
DeleteParamTemplate - delete param template
PARAMS:
- templateId: template id
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) DeleteParamsFromTemp ¶
DeleteParamsFromTemp - delete params from template
PARAMS:
- templateId: template id
- args: the params to delete
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) ExecuteTaskNow ¶
ExecuteTaskNow - execute task now
PARAMS:
- taskId : task id
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) GetAccountDetail ¶
func (c *Client) GetAccountDetail(clusterId, accountName string) (*AccountDetail, error)
GetAccountDetail - get account detail
PARAMS:
- clusterId: cluster id
- accountName: account name to delete
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) GetAccountList ¶
func (c *Client) GetAccountList(clusterId string) (*AccountList, error)
GetAccountList - get account list
PARAMS:
- clusterId: cluster id
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) GetAvailableSubnetList ¶ added in v0.9.183
func (c *Client) GetAvailableSubnetList(vpcId string) ([]AvailableSubnet, error)
GetAvailableSubnetList - get available subnetList
PARAMS:
- vpcId: the vpc id which you want to query
RETURNS:
- []AvailableSubnet: the result of get available subnetList
- error: nil if success otherwise the specific error
func (*Client) GetBinlogDetail ¶
func (c *Client) GetBinlogDetail(binlogId string, args *GetBinlogArgs) (*BinlogDetail, error)
GetBinlogDetail - get binlog detail
PARAMS:
- binlogId : binlog id
- args: the params to get binlog detail
RETURNS:
- error: nil if success otherwise the specific error
- *BinlogDetail: binlog detail
func (*Client) GetBinlogList ¶
func (c *Client) GetBinlogList(args *GetBinlogListArgs) (*BinlogList, error)
GetBinlogList - get binlog list
PARAMS:
- args: the params to get binlog list
RETURNS:
- error: nil if success otherwise the specific error
- *BinlogList: binlog List
func (*Client) GetClusterByLbId ¶
func (c *Client) GetClusterByLbId(lbIds string) (*ClusterList, error)
GetClusterByLbId - get cluster by lb id
PARAMS:
- LbId : the params to get cluster by lb id
RETURNS:
- error: nil if success otherwise the specific error
- *ClusterList: cluster List
func (*Client) GetClusterByVpcId ¶
func (c *Client) GetClusterByVpcId(vpcId string) (*ClusterList, error)
GetClusterByVpcId - get cluster by vpc id
PARAMS:
- vpcId : the params to get cluster by vpc id
RETURNS:
- error: nil if success otherwise the specific error
- *ClusterList: cluster List
func (*Client) GetClusterCapacity ¶
func (c *Client) GetClusterCapacity(clusterId string) (*ClusterCapacityResult, error)
GetClusterCapacity - get cluster capacity PARAMS:
- ClusterId: cluster id
RETURNS:
- *ClusterCapacityResult: the result of cluster capacity
- error: nil if success otherwise the specific error
func (*Client) GetClusterDetail ¶
func (c *Client) GetClusterDetail(clusterId string) (*ClusterDetailResult, error)
GetClusterCapacity - get cluster Capacity PARAMS:
- ClusterId: cluster id
RETURNS:
- *ClusterCapacityResult: the result of cluster detail
- error: nil if success otherwise the specific error
func (*Client) GetClusterList ¶
func (c *Client) GetClusterList(args *Marker) (*ClusterListResult, error)
GetClusterList - get gaiadb cluster list
PARAMS:
- *Markder: the arguments to get cluster list
RETURNS:
- error: nil if success otherwise the specific error
- *ClusterListResult: the result of get cluster list
func (*Client) GetInterfaceList ¶
func (c *Client) GetInterfaceList(clusterId string) (*InterfaceListResult, error)
GetInterfaceList - get interface list PARAMS:
- clusterId: cluster id
RETURNS:
- *InterfaceListResult: the result of interface list
- error: nil if success otherwise the specific error
func (*Client) GetMaintenTime ¶
func (c *Client) GetMaintenTime(clusterId string) (*MaintenTimeDetail, error)
GetMaintenTime - get maintenTime
PARAMS:
- clusterId: cluster id
RETURNS:
- error: nil if success otherwise the specific error
- *MaintenTime: maintenTime data
func (*Client) GetOrderInfo ¶
GetOrderInfo - get order info
PARAMS:
- orderId : the params to get order info
RETURNS:
- error: nil if success otherwise the specific error
- *OrderInfo: order info
func (*Client) GetParamTemplateDetail ¶
func (c *Client) GetParamTemplateDetail(templateId, detail string) (*ParamTemplateDetail, error)
GetParamTemplateDetail - get param template detail
PARAMS:
- templateId: template id
- detail: detail type
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) GetParamTemplateHistory ¶
func (c *Client) GetParamTemplateHistory(templateId, action string) (*ParamTemplateHistory, error)
GetParamTemplateHistory - get param template history
PARAMS:
- templateId: template id
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) GetParamsHistory ¶
func (c *Client) GetParamsHistory(clusterId string) (*GetParamsHistoryResult, error)
GetParamsHistory - get paremeters history
PARAMS:
- clusterId: cluster id
RETURNS:
- error: nil if success otherwise the specific error
- *GetParamsHistoryResult: get paremeters history result
func (*Client) GetParamsList ¶
func (c *Client) GetParamsList(clusterId string) (*GetParamsListResult, error)
GetParamsList - get paremeters list
PARAMS:
- clusterId: cluster id
RETURNS:
- error: nil if success otherwise the specific error
- *GetParamsListResult: get paremeters list result
func (*Client) GetSlowSqlDetail ¶
func (c *Client) GetSlowSqlDetail(clusterId string, args *GetSlowSqlArgs) (*SlowSqlDetailDetail, error)
GetSlowSqlDetail - get slow sql detail
PARAMS:
- args: the params to get slow sql detail
RETURNS:
- error: nil if success otherwise the specific error
- *SlowSqlDetail: slow sql detail
func (*Client) GetSnapshotPolicy ¶
func (c *Client) GetSnapshotPolicy(clusterId string) (*SnapshotPolicy, error)
GetSnapshotPolicy - get snapshot policy
PARAMS:
- clusterId: cluster id
RETURNS:
- error: nil if success otherwise the specific error
- *SnapshotPolicy: the snapshot policy
func (*Client) GetSyncStatus ¶
func (c *Client) GetSyncStatus(groupId, followerClusterId string) (*GetSyncStatusResult, error)
GetSyncStatus - get multiactive group sync status
PARAMS:
- groupId: multiactive group id
- followerClusterId: the follower cluster id
RETURNS:
- error: nil if success otherwise the specific error
- *GetSyncStatusResult: multiactive group Detail result
func (*Client) GetTaskList ¶
func (c *Client) GetTaskList(args *TaskListArgs) (*TaskList, error)
GetTaskList - get task list
PARAMS:
- args : the params to get task list
RETURNS:
- error: nil if success otherwise the specific error
- *TaskList: task List
func (*Client) GetTemplateApplyRecords ¶
func (c *Client) GetTemplateApplyRecords(templateId string) (*GetTemplateApplyRecordsResult, error)
GetTemplateApplyRecords - get template apply records
PARAMS:
- templateId: template id
RETURNS:
- error: nil if success otherwise the specific error
- *GetTemplateApplyRecordsResult: get template apply records result
func (*Client) GetWhiteList ¶
GetWhiteList - get white list
PARAMS:
- clusterId: cluster id
RETURNS:
- error: nil if success otherwise the specific error
- *WhiteListResult: the result of white list
func (*Client) GroupExchange ¶
func (c *Client) GroupExchange(groupId string, args *ExchangeArgs) error
GroupExchange - group exchange
PARAMS:
- groupId: multiactive group id
- args: the arguments to group exchange
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) ListDatabase ¶
func (c *Client) ListDatabase(clusterId string) (*DatabaseList, error)
ListDatabase - list database
PARAMS:
- clusterId: cluster id
RETURNS:
- error: nil if success otherwise the specific error
- *DatabaseList: the database list
func (*Client) ListParamTemplate ¶
func (c *Client) ListParamTemplate(args *ListParamTempArgs) (*ListParamTempResult, error)
ListParamTemplate - list param template
PARAMS:
- args: the arguments to list param template
RETURNS:
- error: nil if success otherwise the specific error
- *ListParamTemplateResult: get paremeters list result
func (*Client) ListSnapshot ¶
func (c *Client) ListSnapshot(clusterId string) (*SnapshotList, error)
ListSnapshot - list snapshot
PARAMS:
- clusterId: cluster id
RETURNS:
- error: nil if success otherwise the specific error
- *SnapshotList: the snapshot list
func (*Client) ModifyParams ¶
func (c *Client) ModifyParams(templateId string, args *ModifyParamsArgs) error
ModifyParams - modify params
PARAMS:
- templateId: template id
- args: the params to modify
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) MultiactiveGroupDetail ¶
func (c *Client) MultiactiveGroupDetail(groupId string) (*MultiactiveGroupDetailResult, error)
MultiactiveGroupDetail - get multiactive group detail
PARAMS:
- groupId: multiactive group id
RETURNS:
- error: nil if success otherwise the specific error
- *MultiactiveGroupDetailResult: multiactive group Detail result
func (*Client) MultiactiveGroupList ¶
func (c *Client) MultiactiveGroupList() (*MultiactiveGroupListResult, error)
MultiactiveGroupList - list multiactive group
PARAMS:
RETURNS:
- error: nil if success otherwise the specific error
- *MultiactiveGroupListResult: multiactive group list result
func (*Client) NewInstanceAutoJoin ¶
func (c *Client) NewInstanceAutoJoin(clusterId string, args *NewInstanceAutoJoinArgs) error
NewInstanceAutoJoin - new instance auto join
PARAMS:
- clusterId: cluster id
- args: the arguments to new instance auto join
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) QueryClusterPrice ¶
func (c *Client) QueryClusterPrice(args *QueryPriceArgs) (*PriceResult, error)
QueryClusterPrice - query cluster price
PARAMS:
- args: the arguments to query cluster price
RETURNS:
- *PriceResult: the result of query cluster price
- error: nil if success otherwise the specific error
func (*Client) QueryResizeClusterPrice ¶
func (c *Client) QueryResizeClusterPrice(args *QueryResizePriceArgs) (*PriceResult, error)
QueryResizeClusterPrice - query resize cluster price
PARAMS:
- args: the arguments to query resize cluster price
RETURNS:
- *PriceResult: the result of query resize cluster price
- error: nil if success otherwise the specific error
func (*Client) RebootInstance ¶
func (c *Client) RebootInstance(clusterId, instanceId string, args *RebootInstanceArgs) error
RebootInstance - reboot instance
PARAMS:
- args: the arguments to reboot instance
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) RenameCluster ¶
func (c *Client) RenameCluster(clusterId string, args *ClusterName) error
RenameCluster - rename gaiadb cluster
PARAMS:
- clusterId: the cluster id which you want to delete
- *ClusterName: the new cluster name
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) RenameMultiactiveGroup ¶
func (c *Client) RenameMultiactiveGroup(groupId string, args *RenameMultiactiveGroupArgs) error
RenameMultiactiveGroup - rename multiactive group
PARAMS:
- groupId: multiactive group id
- args: the arguments to rename multiactive group
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) ResizeCluster ¶
func (c *Client) ResizeCluster(clusterId string, args *ResizeClusterArgs) (*OrderId, error)
ResizeCluster - resize gaiadb cluster
PARAMS:
- clusterId: the cluster id which you want to delete
- *ResizeClusterArgs: the arguments to resize gaiadb cluster
RETURNS:
- error: nil if success otherwise the specific error
- *ResizeResult: the result of resize gaiadb cluster
func (*Client) SaveAsParamTemplate ¶
func (c *Client) SaveAsParamTemplate(args *ParamTempArgs) error
SaveAsParamTemplate - save as params template
PARAMS:
- args: the arguments to save as params template
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) SlowSqlAdvice ¶
func (c *Client) SlowSqlAdvice(clusterId, sqlId string) (*SlowSqlAdviceDetail, error)
SlowSqlAdvice - slow sql advice
PARAMS:
- clusterId: cluster id
- sqlId : sql id
RETURNS:
- error: nil if success otherwise the specific error
- *SlowSqlAdviceDetail: slow sql advice detail
func (*Client) UpdateAccountAuthIp ¶
func (c *Client) UpdateAccountAuthIp(clusterId, accountName string, args *AuthIpArgs) error
UpdateAccountAuthIp - update account auth ip
PARAMS:
- clusterId: cluster id
- accountName: account name to update
- args: the arguments to update account auth ip
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) UpdateAccountPassword ¶
func (c *Client) UpdateAccountPassword(clusterId, accountName string, args *PasswordArgs) error
UpdateAccountPassword - update account password
PARAMS:
- clusterId: cluster id
- accountName: account name to update
- args: the arguments to update account password
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) UpdateAccountPrivileges ¶
func (c *Client) UpdateAccountPrivileges(clusterId, accountName string, args *PrivilegesArgs) error
UpdateAccountPrivileges - update account privileges
PARAMS:
- clusterId: cluster id
- accountName: account name to update
- args: the arguments to update account privileges
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) UpdateAccountRemark ¶
func (c *Client) UpdateAccountRemark(clusterId, accountName string, args *RemarkArgs) error
UpdateAccountRemark - update account remark
PARAMS:
- clusterId: cluster id
- accountName: account name to update
- args: the arguments to update account
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) UpdateDnsName ¶
func (c *Client) UpdateDnsName(clusterId string, args *UpdateDnsNameArgs) error
UpdateDnsName - update dns name
PARAMS:
- clusterId: the cluster id
- args: the arguments to update dns name
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) UpdateInterface ¶
func (c *Client) UpdateInterface(clusterId string, args *UpdateInterfaceArgs) error
UpdateInterface - update interface
PARAMS:
- clusterId: cluster id
- args: the arguments to update interface
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) UpdateMaintenTime ¶
func (c *Client) UpdateMaintenTime(clusterId string, args *UpdateMaintenTimeArgs) error
UpdateMaintenTime - update maintenTime
PARAMS:
- clusterId: cluster id
- args: the params to update maintenTime
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) UpdateParamTemplate ¶
func (c *Client) UpdateParamTemplate(templateId string, args *UpdateParamTplArgs) error
UpdateParamTemplate - update param template
PARAMS:
- templateId: template id
- args: the params to update
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) UpdateParams ¶
func (c *Client) UpdateParams(clusterId string, args *UpdateParamsArgs) error
UpdateParams - update paremeters
PARAMS:
- clusterId: cluster id
- args: the arguments to update paremeters
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) UpdateSnapshotPolicy ¶
func (c *Client) UpdateSnapshotPolicy(clusterId string, args *UpdateSnapshotPolicyArgs) error
UpdateSnapshotPolicy - update snapshot policy
PARAMS:
- clusterId: cluster id
- args: the arguments to update snapshot policy
RETURNS:
- error: nil if success otherwise the specific error
type Cluster ¶
type Cluster struct { ClusterId string `json:"clusterId"` ClusterName string `json:"clusterName"` Endpoint Endpoint `json:"endpoint"` AllocatedCpuInCore int `json:"allocatedCpuInCore"` AllocatedMemoryInMB int `json:"allocatedMemoryInMB"` InstanceStatus string `json:"instanceStatus"` PubliclyAccessible bool `json:"publiclyAccessible"` InstanceCreateTime string `json:"instanceCreateTime"` InstanceExpireTime string `json:"instanceExpireTime"` InstanceAmount int `json:"instanceAmount"` ProxyAmount int `json:"proxyAmount"` ProductType string `json:"productType"` MultiActiveGroupId string `json:"multiActiveGroupId"` MultiActiveGroupRole string `json:"multiActiveGroupRole"` MultiActiveGroupName string `json:"multiActiveGroupName"` }
type ClusterCapacityResult ¶
type ClusterDetailResult ¶
type ClusterDetailResult struct { ClusterId string `json:"clusterId"` ClusterName string `json:"clusterName"` Endpoint Endpoint `json:"endpoint"` AllocatedCpuInCore int `json:"allocatedCpuInCore"` AllocatedMemoryInMB int `json:"allocatedMemoryInMB"` InstanceStatus string `json:"instanceStatus"` PubliclyAccessible bool `json:"publiclyAccessible"` InstanceCreateTime string `json:"instanceCreateTime"` InstanceExpireTime string `json:"instanceExpireTime"` InstanceAmount int `json:"instanceAmount"` ProductType string `json:"productType"` MultiActiveGroupId string `json:"multiActiveGroupId"` MultiActiveGroupRole string `json:"multiActiveGroupRole"` MultiActiveGroupName string `json:"multiActiveGroupName"` ComputeList []ComputeNode `json:"computeList"` }
type ClusterItem ¶
type ClusterList ¶
type ClusterList struct {
Clusters []ClusterItem `json:"clusters"`
}
type ClusterListResult ¶
type ClusterName ¶
type ClusterName struct {
ClusterName string `json:"clusterName"`
}
type ClusterSwitchArgs ¶
type ClusterSwitchResult ¶
type ClusterSwitchResult struct {
Switch TaskId `json:"switch"`
}
type ComputeNode ¶
type CreateAccountArgs ¶
type CreateClusterArgs ¶
type CreateClusterArgs struct { ClientToken string `json:"-"` ProductType string `json:"productType"` Duration string `json:"duration,omitempty"` AutoRenewTimeUnit string `json:"autoRenewTimeUnit,omitempty"` AutoRenewTime int `json:"autoRenewTime,omitempty"` Number int `json:"number"` InstanceParam InstanceParam `json:"instanceParam"` }
type CreateDatabaseArgs ¶
type CreateMultiactiveGroupResult ¶
type CreateMultiactiveGroupResult struct {
MultiActiveGroupId string `json:"multiActiveGroupId"`
}
type CreateParamTemplateArgs ¶
type CreateResult ¶
type DatabaseInfo ¶
type DatabaseInfo struct { DbName string `json:"dbName"` Remark string `json:"remark"` DbStatus string `json:"dbStatus"` CharacterSetName string `json:"characterSetName"` AccountPrivileges []AccountPrivilege `json:"accountPrivileges"` }
type DatabaseList ¶
type DatabaseList struct {
Databases []DatabaseInfo `json:"databases"`
}
type DatabasePrivilege ¶
type EncryptStrategy ¶
type ExchangeArgs ¶
type FollowerCluster ¶
type GetBinlogArgs ¶
type GetBinlogListArgs ¶
type GetParamsHistoryResult ¶
type GetParamsHistoryResult struct {
Records []Record `json:"records"`
}
type GetParamsListResult ¶
type GetParamsListResult struct {
Params []Param `json:"params"`
}
type GetSlowSqlArgs ¶
type GetSlowSqlArgs struct { Page string `json:"page,omitempty"` PageSize string `json:"pageSize,omitempty"` Offset string `json:"offset,omitempty"` Sort string `json:"sort,omitempty"` NodeId string `json:"nodeId,omitempty"` Engine string `json:"engine,omitempty"` Schema string `json:"schema,omitempty"` Digest string `json:"digest,omitempty"` Start string `json:"start,omitempty"` End string `json:"end,omitempty"` }
type GetSyncStatusResult ¶
type GetTemplateApplyRecordsResult ¶
type GetTemplateApplyRecordsResult struct {
Records []ApplyRecord `json:"records"`
}
type InstanceInfo ¶
type InstanceInfo struct { ReleaseVersion string `json:"releaseVersion"` AllocatedStorageInGB int `json:"allocatedStorageInGB"` AllocatedMemoryInMB int `json:"allocatedMemoryInMB"` AllocatedCpuInCore int `json:"allocatedCpuInCore"` InstanceAmount int `json:"instanceAmount"` ProxyAmount int `json:"proxyAmount"` }
type InstanceParam ¶
type InstanceParam struct { ReleaseVersion string `json:"releaseVersion"` AllocatedCpuInCore int `json:"allocatedCpuInCore"` AllocatedMemoryInMB int `json:"allocatedMemoryInMB"` AllocatedStorageInGB int `json:"allocatedStorageInGB"` InstanceAmount int `json:"instanceAmount"` ProxyAmount int `json:"proxyAmount"` VpcId string `json:"vpcId"` SubnetId string `json:"subnetId"` SrcClusterId string `json:"srcClusterId,omitempty"` SnapshotId string `json:"snapshotId,omitempty"` Pit string `json:"pit,omitempty"` LowerCaseTableNames string `json:"lowercaseTableNames,omitempty"` ComputeTplId string `json:"computeTplId,omitempty"` }
type Interface ¶
type Interface struct { AppId string `json:"appId"` InterfaceId string `json:"interfaceId"` Status string `json:"status"` CreateTime string `json:"createTime"` InstanceBinding []string `json:"instanceBinding"` NewInstanceAutoJoin int `json:"newInstanceAutoJoin"` ReadWriteMode string `json:"readWriteMode"` InterfaceType string `json:"interfaceType"` MasterReadable int `json:"masterReadable"` Access Access `json:"access"` Flavor Flavor `json:"flavor"` Proxies []Proxy `json:"proxies"` }
type InterfaceInfo ¶
type InterfaceListResult ¶
type InterfaceListResult struct {
Interfaces []Interface `json:"interfaces"`
}
type Interfacee ¶
type LeaderCluster ¶
type ListParamTempArgs ¶
type ListParamTempResult ¶
type ListParamTempResult struct {
ParamTemplates []ParamTemplate `json:"paramTemplates"`
}
type MaintenTime ¶
type MaintenTimeDetail ¶
type MaintenTimeDetail struct {
MaintenTime MaintenTime `json:"maintenTime"`
}
type ModifyParamsArgs ¶
type ModifyParamsArgs struct {
Params ParamsItem `json:"params"`
}
type MultiactiveGroupDetailResult ¶
type MultiactiveGroupDetailResult struct {
MultiActiveGroupInfo MultiactiveGroupInfo `json:"multiActiveGroupInfo"`
}
type MultiactiveGroupInfo ¶
type MultiactiveGroupInfo struct { MultiActiveGroupId string `json:"multiActiveGroupId"` MultiActiveGroupName string `json:"multiActiveGroupName"` Status string `json:"status"` CreateTime string `json:"createTime"` LeaderCluster LeaderCluster `json:"leaderCluster"` FollowerClusterList []FollowerCluster `json:"followerClusterList"` }
type MultiactiveGroupListResult ¶
type MultiactiveGroupListResult struct {
MultiActiveGroupInfoList []MultiactiveGroupInfo `json:"multiActiveGroupInfoList"`
}
type NewInstanceAutoJoinArgs ¶
type NewInstanceAutoJoinArgs struct {
AutoJoinRequestItems []AutoJoinRequestItem `json:"autoJoinRequestItems"`
}
type Pagination ¶
type Pagination struct {
TotalKeys int64 `json:"totalKeys"`
}
type Param ¶
type Param struct { Status string `json:"status"` UpdateTime string `json:"updateTime"` Type string `json:"type"` Name string `json:"name"` CaseSensitive bool `json:"caseSensitive"` Modifiable bool `json:"modifiable"` CreateTime string `json:"createTime"` Attention string `json:"attention"` Precision int `json:"precision"` Value string `json:"value"` AllowedValues string `json:"allowedValues"` BestValue string `json:"bestValue"` Id int64 `json:"id"` Description string `json:"description"` AllowEmpty bool `json:"allowEmpty"` }
type ParamTempArgs ¶
type ParamTemplate ¶
type ParamTemplate struct { Uuid string `json:"uuid"` Name string `json:"name"` Type string `json:"type"` Version string `json:"version"` Description string `json:"description"` IsReboot bool `json:"isReboot"` ParamAmount int `json:"paramAmount"` Status string `json:"status"` IsSystem bool `json:"isSystem"` UserId string `json:"userId,omitempty"` UserName string `json:"userName,omitempty"` CreateTime string `json:"createTime"` UpdateTime string `json:"updateTime"` }
type ParamTemplateDetail ¶
type ParamTemplateDetail struct {
ParamTemplate ParamTemplate `json:"paramTemplate"`
}
type ParamTemplateHistory ¶
type ParamTemplateHistory struct {
Records []ParamTemplateRecord `json:"records"`
}
type ParamTemplateRecord ¶
type ParamTemplateRecord struct { Action string `json:"action"` Name string `json:"name"` ParamTemplateId string `json:"paramTemplateId"` RequestId string `json:"requestId"` Id int64 `json:"id"` ErrMsg string `json:"errMsg"` AfterValue string `json:"afterValue"` StartTime string `json:"startTime"` FinishTime string `json:"finishTime"` }
type ParamsItem ¶
type ParamsItem map[string]interface{}
type PasswordArgs ¶
type PriceResult ¶
type PrivilegesArgs ¶
type PrivilegesArgs struct { DatabasePrivileges []DatabasePrivilege `json:"databasePrivileges"` Etag string `json:"etag"` }
type QueryPriceArgs ¶
type QueryPriceArgs struct { Number int `json:"number"` InstanceParam InstanceInfo `json:"instanceParam"` ProductType string `json:"productType"` Duration int `json:"duration"` }
type QueryResizePriceArgs ¶
type QueryResizePriceArgs struct { ClusterId string `json:"clusterId"` ResizeType string `json:"resizeType"` SlaveId string `json:"slaveId"` AllocatedCpuInCore int `json:"allocatedCpuInCore"` AllocatedMemoryInMB int `json:"allocatedMemoryInMB"` ProxyAmount int `json:"proxyAmount"` InterfaceId string `json:"interfaceId"` Interfacee Interfacee `json:"interfacee"` }
type RebootInstanceArgs ¶
type RebootInstanceArgs struct {
ExecuteAction string `json:"executeAction"`
}
type RemarkArgs ¶
type RenameMultiactiveGroupArgs ¶
type RenameMultiactiveGroupArgs struct {
MultiActiveGroupName string `json:"multiActiveGroupName"`
}
type ResizeClusterArgs ¶
type ResizeClusterArgs struct { ResizeType string `json:"resizeType"` SlaveId string `json:"slaveId,omitempty"` AllocatedCpuInCore int `json:"allocatedCpuInCore,omitempty"` AllocatedMemoryInMB int `json:"allocatedMemoryInMB,omitempty"` ProxyAmount int `json:"proxyAmount,omitempty"` InterfaceId int `json:"interfaceId,omitempty"` Interfacee Interfacee `json:"interfacee"` }
type SlowSqlAdvice ¶
type SlowSqlAdviceDetail ¶
type SlowSqlAdviceDetail struct { IndexAdvice []SlowSqlAdvice `json:"indexAdvice"` StatementAdvice []SlowSqlAdvice `json:"statementAdvice"` }
type SlowSqlDetailDetail ¶
type SlowSqlDetailDetail struct { Items []SlowSqlDetailItem `json:"items"` TotalCount int64 `json:"totalCount"` }
type SlowSqlDetailItem ¶
type SlowSqlDetailItem struct { AffectedRows int64 `json:"affectedRows"` App string `json:"app"` ClientHost string `json:"clientHost"` ClientIP string `json:"clientIP"` Cluster string `json:"cluster"` ConnectionId int `json:"connectionId"` CurrentDB string `json:"currentDB"` Digest string `json:"digest"` Duration string `json:"duration"` ExaminedRows int64 `json:"examinedRows"` LockTime string `json:"lockTime"` Node string `json:"node"` NumRows int64 `json:"numRows"` SqlId string `json:"sqlId"` Start string `json:"start"` User string `json:"user"` }
type Snapshot ¶
type Snapshot struct { SnapshotId string `json:"snapshotId"` AppId string `json:"appId"` SnapshotSizeInBytes int `json:"snapshotSizeInBytes"` SnapshotType string `json:"snapshotType"` SnapshotStatus string `json:"snapshotStatus"` SnapshotStartTime string `json:"snapshotStartTime"` SnapshotEndTime string `json:"snapshotEndTime"` SnapshotDataTime string `json:"snapshotDataTime"` }
type SnapshotList ¶
type SnapshotList struct {
Snapshots []Snapshot `json:"snapshots"`
}
type SnapshotPolicy ¶
type SnapshotPolicy struct {
Policys []SnapshotPolicyPolicy `json:"policys"`
}
type SnapshotPolicyPolicy ¶
type SnapshotPolicyPolicy struct { PolicyID string `json:"policyID"` PolicyName string `json:"policyName"` DataBackupWeekDay []string `json:"dataBackupWeekDay"` DataBackupTime string `json:"dataBackupTime"` DataBackupRetainStrategys []DataBackupRetainStrategy `json:"dataBackupRetainStrategys"` LogBackupRetainDays int `json:"logBackupRetainDays"` SpeedLimitBytesPerSec int `json:"speedLimitBytesPerSec"` EncryptStrategy EncryptStrategy `json:"encryptStrategy"` }
type TaskItem ¶
type TaskItem struct { TaskId int64 `json:"taskId"` Region string `json:"region"` StartTime string `json:"startTime"` EndTime string `json:"endTime"` TaskName string `json:"taskName"` ClusterId string `json:"clusterId"` ClusterName string `json:"clusterName"` TaskStatus string `json:"taskStatus"` SupportedOperate []string `json:"supportedOperate"` }
type TaskListArgs ¶
type UpdateDnsNameArgs ¶
type UpdateInterfaceArgs ¶
type UpdateInterfaceArgs struct { InterfaceId string `json:"instanceId"` Interface InterfaceInfo `json:"interface"` }
type UpdateMaintenTimeArgs ¶
type UpdateParamTplArgs ¶
type UpdateParamsArgs ¶
type UpdateParamsArgs struct { Params ParamsItem `json:"params"` Timing string `json:"timing"` }
type UpdateSnapshotPolicyArgs ¶
type UpdateSnapshotPolicyArgs struct { DataBackupWeekDay []string `json:"dataBackupWeekDay"` DataBackupRetainStrategys []DataBackupRetainStrategy `json:"dataBackupRetainStrategys"` DataBackupTime string `json:"dataBackupTime"` }