Documentation
¶
Index ¶
- Constants
- Variables
- func UnmarshalResultInto(data []byte, result interface{}) error
- type AccountObject
- type AccountPrivilegeObject
- type AddressesObject
- type ChargeDetailObject
- type CreateDBAccountReq
- type CreateDBAccountResp
- type CreateDBInstanceReq
- type CreateDBInstanceResp
- type CreateDatabaseReq
- type CreateDatabaseResp
- type DatabaseObject
- type DatabasesPrivilegeObject
- type DeleteDBAccountReq
- type DeleteDBAccountResp
- type DeleteDatabaseReq
- type DeleteDatabaseResp
- type DescribeDBAccountsReq
- type DescribeDBAccountsResp
- type DescribeDBInstanceDetailReq
- type DescribeDBInstanceDetailResp
- type DescribeDatabasesReq
- type DescribeDatabasesResp
- type EndpointObject
- type InstanceDetailObject
- type NodeObject
- type RdsVedbMysql
- func (p *RdsVedbMysql) CreateDBAccount(req *CreateDBAccountReq) (*CreateDBAccountResp, error)
- func (p *RdsVedbMysql) CreateDBInstance(req *CreateDBInstanceReq) (*CreateDBInstanceResp, error)
- func (p *RdsVedbMysql) CreateDatabase(req *CreateDatabaseReq) (*CreateDatabaseReq, error)
- func (p *RdsVedbMysql) DeleteDBAccount(req *DeleteDBAccountReq) (*DeleteDBAccountResp, error)
- func (p *RdsVedbMysql) DeleteDatabase(req *DeleteDatabaseReq) (*DeleteDatabaseResp, error)
- func (p *RdsVedbMysql) DescribeDBAccounts(req *DescribeDBAccountsReq) (*DescribeDBAccountsResp, error)
- func (p *RdsVedbMysql) DescribeDBInstanceDetail(req *DescribeDBInstanceDetailReq) (*DescribeDBInstanceDetailResp, error)
- func (p *RdsVedbMysql) DescribeDatabases(req *DescribeDatabasesReq) (*DescribeDatabasesResp, error)
- func (p *RdsVedbMysql) SetRegion(region string) error
Constants ¶
View Source
const ( ActionCreateDBInstance = "CreateDBInstance" ActionDescribeDBInstanceDetail = "DescribeDBInstanceDetail" ActionCreateDatabase = "CreateDatabase" ActionDescribeDatabases = "DescribeDatabases" ActionDeleteDatabase = "DeleteDatabase" ActionCreateDBAccount = "CreateDBAccount" ActionDescribeDBAccounts = "DescribeDBAccounts" ActionDeleteDBAccount = "DeleteDBAccount" )
View Source
const ( APIVersion20220101 = "2022-01-01" ServiceName = "vedbm" )
Variables ¶
View Source
var ( ServiceInfoMap = map[string]*base.ServiceInfo{ base.RegionCnNorth1: { Timeout: 5 * time.Second, Host: "open.volcengineapi.com", Header: http.Header{ "Accept": []string{"application/json"}, }, Credentials: base.Credentials{Region: base.RegionCnNorth1, Service: ServiceName}, }, } ApiInfoList = map[string]*base.ApiInfo{ ActionCreateDBInstance: { Method: http.MethodPost, Path: "/", Query: url.Values{ "Action": []string{ActionCreateDBInstance}, "Version": []string{APIVersion20220101}, }, }, ActionDescribeDBInstanceDetail: { Method: http.MethodPost, Path: "/", Query: url.Values{ "Action": []string{ActionDescribeDBInstanceDetail}, "Version": []string{APIVersion20220101}, }, }, ActionCreateDatabase: { Method: http.MethodPost, Path: "/", Query: url.Values{ "Action": []string{ActionCreateDatabase}, "Version": []string{APIVersion20220101}, }, }, ActionDescribeDatabases: { Method: http.MethodPost, Path: "/", Query: url.Values{ "Action": []string{ActionDescribeDatabases}, "Version": []string{APIVersion20220101}, }, }, ActionDeleteDatabase: { Method: http.MethodPost, Path: "/", Query: url.Values{ "Action": []string{ActionDeleteDatabase}, "Version": []string{APIVersion20220101}, }, }, ActionCreateDBAccount: { Method: http.MethodPost, Path: "/", Query: url.Values{ "Action": []string{ActionCreateDBAccount}, "Version": []string{APIVersion20220101}, }, }, ActionDescribeDBAccounts: { Method: http.MethodPost, Path: "/", Query: url.Values{ "Action": []string{ActionDescribeDBAccounts}, "Version": []string{APIVersion20220101}, }, }, ActionDeleteDBAccount: { Method: http.MethodPost, Path: "/", Query: url.Values{ "Action": []string{ActionDeleteDBAccount}, "Version": []string{APIVersion20220101}, }, }, } )
View Source
var DefaultInstance = NewInstance(base.RegionCnNorth1)
Functions ¶
func UnmarshalResultInto ¶
Types ¶
type AccountObject ¶
type AccountObject struct {
DBName string
CharacterSetName string
DatabasesPrivileges []DatabasesPrivilegeObject
}
type AccountPrivilegeObject ¶
type AddressesObject ¶
type ChargeDetailObject ¶
type CreateDBAccountReq ¶
type CreateDBAccountReq struct {
InstanceId string `json:"InstanceId"`
AccountName string `json:"AccountName"`
AccountPassword string `json:"AccountPassword"`
AccountType string `json:"AccountType"`
AccountPrivileges []AccountPrivilegeObject `json:"AccountPrivileges,omitempty"`
}
type CreateDBAccountResp ¶
type CreateDBAccountResp struct {
}
type CreateDBInstanceReq ¶
type CreateDBInstanceReq struct {
DBEngineVersion string `json:"DBEngineVersion"`
ZoneIds string `json:"ZoneIds"`
NodeSpec string `json:"NodeSpec"`
NodeNumber int `json:"NodeNumber"`
VpcId string `json:"VpcId"`
SubnetId string `json:"SubnetId"`
SuperAccountName string `json:"SuperAccountName"`
SuperAccountPassword string `json:"SuperAccountPassword"`
ChargeType string `json:"ChargeType"`
InstanceName string `json:"InstanceName,omitempty"`
DBTimeZone string `json:"DBTimeZone,omitempty"`
LowerCaseTableNames string `json:"LowerCaseTableNames,omitempty"`
ProjectName string `json:"ProjectName,omitempty"`
}
type CreateDBInstanceResp ¶
type CreateDatabaseReq ¶
type CreateDatabaseReq struct {
InstanceId string `json:"InstanceId"`
DBName string `json:"DBName"`
CharacterSetName string `json:"CharacterSetName,omitempty"`
DatabasesPrivileges []DatabasesPrivilegeObject `json:"DatabasesPrivileges,omitempty"`
}
type CreateDatabaseResp ¶
type CreateDatabaseResp struct {
}
type DatabaseObject ¶
type DatabaseObject struct {
DBName string
CharacterSetName string
DatabasesPrivileges []DatabasesPrivilegeObject
}
type DeleteDBAccountReq ¶
type DeleteDBAccountResp ¶
type DeleteDBAccountResp struct {
}
type DeleteDatabaseReq ¶
type DeleteDatabaseResp ¶
type DeleteDatabaseResp struct {
}
type DescribeDBAccountsReq ¶
type DescribeDBAccountsResp ¶
type DescribeDBAccountsResp struct {
Total int
Accounts []AccountObject
}
type DescribeDBInstanceDetailReq ¶
type DescribeDBInstanceDetailReq struct {
InstanceId string `json:"InstanceId"`
}
type DescribeDBInstanceDetailResp ¶
type DescribeDBInstanceDetailResp struct {
ChargeDetail ChargeDetailObject
Nodes []NodeObject
Endpoints []EndpointObject
InstanceDetail InstanceDetailObject
}
type DescribeDatabasesReq ¶
type DescribeDatabasesResp ¶
type DescribeDatabasesResp struct {
Total int
Databases []DatabaseObject
}
type EndpointObject ¶
type InstanceDetailObject ¶
type NodeObject ¶
type RdsVedbMysql ¶
func NewInstance ¶
func NewInstance(region string) *RdsVedbMysql
func (*RdsVedbMysql) CreateDBAccount ¶
func (p *RdsVedbMysql) CreateDBAccount(req *CreateDBAccountReq) (*CreateDBAccountResp, error)
Create DB Account
func (*RdsVedbMysql) CreateDBInstance ¶
func (p *RdsVedbMysql) CreateDBInstance(req *CreateDBInstanceReq) (*CreateDBInstanceResp, error)
Create instance
func (*RdsVedbMysql) CreateDatabase ¶
func (p *RdsVedbMysql) CreateDatabase(req *CreateDatabaseReq) (*CreateDatabaseReq, error)
Create Database
func (*RdsVedbMysql) DeleteDBAccount ¶
func (p *RdsVedbMysql) DeleteDBAccount(req *DeleteDBAccountReq) (*DeleteDBAccountResp, error)
Delete DB Account
func (*RdsVedbMysql) DeleteDatabase ¶
func (p *RdsVedbMysql) DeleteDatabase(req *DeleteDatabaseReq) (*DeleteDatabaseResp, error)
Delete Database
func (*RdsVedbMysql) DescribeDBAccounts ¶
func (p *RdsVedbMysql) DescribeDBAccounts(req *DescribeDBAccountsReq) (*DescribeDBAccountsResp, error)
Delete Database
func (*RdsVedbMysql) DescribeDBInstanceDetail ¶
func (p *RdsVedbMysql) DescribeDBInstanceDetail(req *DescribeDBInstanceDetailReq) (*DescribeDBInstanceDetailResp, error)
Describe Instance Detail
func (*RdsVedbMysql) DescribeDatabases ¶
func (p *RdsVedbMysql) DescribeDatabases(req *DescribeDatabasesReq) (*DescribeDatabasesResp, error)
Describe Databases
func (*RdsVedbMysql) SetRegion ¶
func (p *RdsVedbMysql) SetRegion(region string) error
Click to show internal directories.
Click to hide internal directories.