Documentation ¶
Index ¶
- Constants
- Variables
- func UnmarshalResultInto(data []byte, result interface{}) error
- type AccountType
- type CType
- type Charset
- type CollateType
- type CreateAccountReq
- type CreateDBInstanceIPListReq
- type CreateDatabaseReq
- type CreateInstanceReq
- type CreateInstanceResp
- type ModifyDatabaseOwnerReq
- type RdsPostgresql
- func (p *RdsPostgresql) CreateAccount(req *CreateAccountReq) (*base.CommonResponse, error)
- func (p *RdsPostgresql) CreateDBInstanceIPList(req *CreateDBInstanceIPListReq) (*base.CommonResponse, error)
- func (p *RdsPostgresql) CreateDatabase(req *CreateDatabaseReq) (*base.CommonResponse, error)
- func (p *RdsPostgresql) CreateInstance(req *CreateInstanceReq) (*CreateInstanceResp, error)
- func (p *RdsPostgresql) CreateROInstance(req *CreateInstanceReq) (*CreateInstanceResp, error)
- func (p *RdsPostgresql) ModifyDatabaseOwner(req *ModifyDatabaseOwnerReq) (*base.CommonResponse, error)
- func (p *RdsPostgresql) SetRegion(region string) error
- type SchemaInfo
Constants ¶
View Source
const ( ActionCreateInstance = "CreateDBInstance" ActionCreateIpWhiteList = "CreateDBInstanceIPList" ActionCreateAccount = "CreateAccount" ActionCreateDatabase = "CreateDatabase" ActionModifyDatabaseOwner = "ModifyDatabaseOwner" )
View Source
const (
APIVersion20180101 = "2018-01-01"
)
Variables ¶
View Source
var ( ServiceInfoMap = map[string]*base.ServiceInfo{ base.RegionCnNorth1: { Timeout: 5 * time.Second, Host: "xxx.volcengineapi.com", Header: http.Header{ "Accept": []string{"application/json"}, }, Credentials: base.Credentials{Region: base.RegionCnNorth1, Service: "rds_postgresql"}, }, } ApiInfoList = map[string]*base.ApiInfo{ ActionCreateInstance: { Method: http.MethodPost, Path: "/", Query: url.Values{ "Action": []string{ActionCreateInstance}, "Version": []string{APIVersion20180101}, }, }, ActionCreateIpWhiteList: { Method: http.MethodPost, Path: "/", Query: url.Values{ "Action": []string{ActionCreateIpWhiteList}, "Version": []string{APIVersion20180101}, }, }, ActionCreateAccount: { Method: http.MethodPost, Path: "/", Query: url.Values{ "Action": []string{ActionCreateAccount}, "Version": []string{APIVersion20180101}, }, }, ActionCreateDatabase: { Method: http.MethodPost, Path: "/", Query: url.Values{ "Action": []string{ActionCreateDatabase}, "Version": []string{APIVersion20180101}, }, }, ActionModifyDatabaseOwner: { Method: http.MethodPost, Path: "/", Query: url.Values{ "Action": []string{ActionModifyDatabaseOwner}, "Version": []string{APIVersion20180101}, }, }, } )
View Source
var DefaultInstance = NewInstance(base.RegionCnNorth1)
Functions ¶
func UnmarshalResultInto ¶
Types ¶
type AccountType ¶
type AccountType string
const ( AccountTypeSuper AccountType = "Super" AccountTypeNormal AccountType = "Normal" )
type CollateType ¶
type CollateType string
const ( CollateType_C CollateType = "C" CollateType_CUTF8 CollateType = "CUTF8" CollateType_EnUsUtf8 CollateType = "EnUsUtf8" )
type CreateAccountReq ¶
type CreateAccountReq struct { InstanceId string `json:"InstanceId"` AccountName string `json:"AccountName"` AccountPassword string `json:"AccountPassword"` AccountDesc string `json:"AccountDesc"` AccountType AccountType `json:"AccountType"` }
type CreateDatabaseReq ¶
type CreateInstanceReq ¶
type CreateInstanceReq struct { Region string `json:"Region"` Zone string `json:"Zone"` ZoneSlave string `json:"ZoneSlave"` DBEngine string `json:"DBEngine"` DBEngineVersion string `json:"DBEngineVersion"` InstanceType string `json:"InstanceType"` StorageType string `json:"StorageType"` StorageSpaceGB int32 `json:"StorageSpaceGB"` Internal bool `json:"Internal"` ClusterName string `json:"ClusterName"` NodePoolName string `json:"NodePoolName"` Number int32 `json:"Number"` InstanceSpecName string `json:"InstanceSpecName"` VpcID string `json:"VpcID"` InstanceName string `json:"InstanceName"` InstanceCategory string `json:"InstanceCategory"` MasterInstanceId string `json:"MasterInstanceId"` ChargeType string `json:"ChargeType"` RequestSource string `json:"RequestSource"` }
createInstance
type CreateInstanceResp ¶
type CreateInstanceResp struct {
InstanceID string
}
type ModifyDatabaseOwnerReq ¶
type RdsPostgresql ¶
func NewInstance ¶
func NewInstance(region string) *RdsPostgresql
func (*RdsPostgresql) CreateAccount ¶
func (p *RdsPostgresql) CreateAccount(req *CreateAccountReq) (*base.CommonResponse, error)
Create account
func (*RdsPostgresql) CreateDBInstanceIPList ¶
func (p *RdsPostgresql) CreateDBInstanceIPList(req *CreateDBInstanceIPListReq) (*base.CommonResponse, error)
Create instance IP white list
func (*RdsPostgresql) CreateDatabase ¶
func (p *RdsPostgresql) CreateDatabase(req *CreateDatabaseReq) (*base.CommonResponse, error)
Create account
func (*RdsPostgresql) CreateInstance ¶
func (p *RdsPostgresql) CreateInstance(req *CreateInstanceReq) (*CreateInstanceResp, error)
Create instance
func (*RdsPostgresql) CreateROInstance ¶
func (p *RdsPostgresql) CreateROInstance(req *CreateInstanceReq) (*CreateInstanceResp, error)
Create instance
func (*RdsPostgresql) ModifyDatabaseOwner ¶
func (p *RdsPostgresql) ModifyDatabaseOwner(req *ModifyDatabaseOwnerReq) (*base.CommonResponse, error)
Modify database owner
func (*RdsPostgresql) SetRegion ¶
func (p *RdsPostgresql) SetRegion(region string) error
type SchemaInfo ¶
Click to show internal directories.
Click to hide internal directories.