rdsvedbmysql

package
v0.0.0-...-4e0481d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

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

func UnmarshalResultInto(data []byte, result interface{}) error

Types

type AccountObject

type AccountObject struct {
	DBName              string
	CharacterSetName    string
	DatabasesPrivileges []DatabasesPrivilegeObject
}

type AccountPrivilegeObject

type AccountPrivilegeObject struct {
	DBName           string
	AccountPrivilege string
}

type AddressesObject

type AddressesObject struct {
	DNSVisibility bool
	Domain        string
	IPAddress     string
	NetworkType   string
	Port          string
	SubnetId      string
	EiPId         string
}

type ChargeDetailObject

type ChargeDetailObject struct {
	ChargeType         string
	ChargeStatus       string
	OverdueReclaimTime string
	OverdueTime        string
}

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 CreateDBInstanceResp struct {
	InstanceId string
	OrderId    string
}

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 DatabasesPrivilegeObject

type DatabasesPrivilegeObject struct {
	AccountName      string `json:"AccountName"`
	AccountPrivilege string `json:"AccountPrivilege"`
}

type DeleteDBAccountReq

type DeleteDBAccountReq struct {
	InstanceId  string `json:"InstanceId"`
	AccountName string `json:"AccountName"`
}

type DeleteDBAccountResp

type DeleteDBAccountResp struct {
}

type DeleteDatabaseReq

type DeleteDatabaseReq struct {
	InstanceId string `json:"InstanceId"`
	DBName     string `json:"DBName"`
}

type DeleteDatabaseResp

type DeleteDatabaseResp struct {
}

type DescribeDBAccountsReq

type DescribeDBAccountsReq struct {
	InstanceId  string `json:"InstanceId"`
	PageNumber  int    `json:"PageNumber"`
	PageSize    int    `json:"PageSize,omitempty"`
	AccountName string `json:"AccountName,omitempty"`
}

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 DescribeDatabasesReq struct {
	InstanceId string `json:"InstanceId"`
	PageNumber int    `json:"PageNumber"`
	PageSize   int    `json:"PageSize,omitempty"`
	DBName     string `json:"DBName,omitempty"`
}

type DescribeDatabasesResp

type DescribeDatabasesResp struct {
	Total     int
	Databases []DatabaseObject
}

type EndpointObject

type EndpointObject struct {
	EndpointId               string
	AutoAddNewNodes          bool
	EndpointType             string
	Description              string
	Addresses                []AddressesObject
	MasterAcceptReadRequests bool
	NodeIds                  []string
	ReadWriteMode            string
	DistributedTransaction   bool
	EndpointName             string
}

type InstanceDetailObject

type InstanceDetailObject struct {
	InstanceId          string
	InstanceName        string
	InstanceStatus      string
	RegionId            string
	ZoneIds             string
	DBEngineVersion     string
	CreateTime          string
	StorageUsedGiB      float64
	VpcId               string
	SubnetId            string
	TimeZone            string
	ProjectName         string
	LowerCaseTableNames string
}

type NodeObject

type NodeObject struct {
	Memory   int
	NodeId   string
	NodeSpec string
	NodeType string
	ZoneId   string
	VCPU     int
}

type RdsVedbMysql

type RdsVedbMysql struct {
	*base.Client
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL