Help us shape the future of Go! Take the 2026 Go Developer Survey

instance

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateReplica

func CreateReplica(client *golangsdk.ServiceClient, instanceId string, opts CreateReplicaOpts) (*string, error)

func Delete

func Delete(client *golangsdk.ServiceClient, instanceID string) (*string, error)

func DeleteReplica

func DeleteReplica(client *golangsdk.ServiceClient, instanceID string, nodeId string) (*string, error)

func Resize

func Resize(client *golangsdk.ServiceClient, instanceId string, specCode string) (*string, error)

func UpdateName

func UpdateName(client *golangsdk.ServiceClient, instanceId string, name string) (*string, error)

func UpdatePass

func UpdatePass(client *golangsdk.ServiceClient, instanceId string, password string) error

func UpdatePort

func UpdatePort(client *golangsdk.ServiceClient, instanceId string, port int) (*string, error)

func UpdateSecondLevelMonitoring

func UpdateSecondLevelMonitoring(client *golangsdk.ServiceClient, opts UpdateSecondLevelMonitoringOpts) (*string, error)

Types

type BackupStrategy

type BackupStrategy struct {
	StartTime string `json:"start_time"`
	KeepDays  string `json:"keep_days"`
}

type BackupStrategyOpt

type BackupStrategyOpt struct {
	StartTime string `json:"start_time" required:"true"`
	KeepDays  string `json:"keep_days" required:"true"`
}

type ChargeInfo

type ChargeInfo struct {
	ChargingMode string `json:"charge_mode,omitempty"`
	OrderId      string `json:"order_id,omitempty"`
}

type CreateOpts

type CreateOpts struct {
	Name                string             `json:"name" required:"true"`
	Region              string             `json:"region" required:"true"`
	Mode                string             `json:"mode" required:"true"`
	Flavor              string             `json:"flavor_ref" required:"true"`
	VpcId               string             `json:"vpc_id" required:"true"`
	SubnetId            string             `json:"subnet_id" required:"true"`
	SecurityGroupId     string             `json:"security_group_id,omitempty"`
	Password            string             `json:"password" required:"true"`
	TimeZone            string             `json:"time_zone,omitempty"`
	AZMode              string             `json:"availability_zone_mode" required:"true"`
	SlaveCount          int                `json:"slave_count" required:"true"`
	MasterAZ            string             `json:"master_availability_zone,omitempty"`
	ConfigurationId     string             `json:"configuration_id,omitempty"`
	DedicatedResourceId string             `json:"dedicated_resource_id,omitempty"`
	LowerCaseTableNames *int               `json:"lower_case_table_names,omitempty"`
	EnterpriseProjectId *string            `json:"enterprise_project_id,omitempty"`
	DataStore           DataStoreOpt       `json:"datastore" required:"true"`
	BackupStrategy      *BackupStrategyOpt `json:"backup_strategy,omitempty"`
	ChargeInfo          *ChargeInfo        `json:"charge_info,omitempty"`
	Volume              *VolumeOpt         `json:"volume,omitempty"`
	Tags                *Tags              `json:"tags,omitempty"`
}

type CreateReplicaOpts

type CreateReplicaOpts struct {
	Priorities []int `json:"priorities" required:"true"`
}

type CreateResponse

type CreateResponse struct {
	Instance TaurusDBResponse `json:"instance"`
	JobId    string           `json:"job_id"`
}

func Create

func Create(client *golangsdk.ServiceClient, opts CreateOpts) (*CreateResponse, error)

type DataStore

type DataStore struct {
	Type          string `json:"type"`
	Version       string `json:"version"`
	KernelVersion string `json:"kernel_version"`
}

type DataStoreOpt

type DataStoreOpt struct {
	Type    string `json:"type" required:"true"`
	Version string `json:"version" required:"true"`
}

type DatastoresResponse added in v0.9.6

type DatastoresResponse struct {
	Datastores []MysqlEngineVersionInfo `json:"datastores"`
}

func ListDatastores added in v0.9.6

func ListDatastores(client *golangsdk.ServiceClient, databaseName string) (*DatastoresResponse, error)

type FlavorInfo

type FlavorInfo struct {
	Vcpus string `json:"vcpus"`
	Ram   string `json:"ram"`
}

type ListFlavorsOpts added in v0.9.6

type ListFlavorsOpts struct {
	DatabaseName         string `json:"-"`
	VersionName          string `q:"version_name"`
	AvailabilityZoneMode string `q:"availability_zone_mode" required:"true"`
	SpecCode             string `q:"spec_code"`
}

type ListOpts

type ListOpts struct {
	// Instance ID.
	Id string `q:"id"`
	// Instance name.
	Name string `q:"name"`
	// Instance type.
	Type string `q:"type"`
	// Datastore type.
	DataStoreType string `q:"datastore_type"`
	// VPC ID.
	VpcId string `q:"vpc_id"`
	// Subnet ID.
	SubnetId string `q:"subnet_id"`
	// Offset from which the query starts.
	Offset int `q:"offset"`
	// Number of items displayed on each page.
	Limit int `q:"limit"`
}

type ListTaurusDBInstance

type ListTaurusDBInstance struct {
	Id                  string         `json:"id"`
	Name                string         `json:"name"`
	Status              string         `json:"status"`
	Type                string         `json:"type"`
	Port                string         `json:"port"`
	VpcId               string         `json:"vpc_id"`
	SubnetId            string         `json:"subnet_id"`
	SecurityGroupId     string         `json:"security_group_id"`
	Flavor              string         `json:"flavor_ref"`
	FlavorInfo          FlavorInfo     `json:"flavor_info"`
	ConfigurationId     string         `json:"configuration_id"`
	AZMode              string         `json:"az_mode"`
	MasterAZ            string         `json:"master_az_code"`
	TimeZone            string         `json:"time_zone"`
	ProjectId           string         `json:"project_id"`
	DbUserName          string         `json:"db_user_name"`
	PublicIps           []string       `json:"public_ips"`
	PrivateIps          []string       `json:"private_ips"`
	Created             string         `json:"created"`
	Updated             string         `json:"updated"`
	Volume              Volume         `json:"volume"`
	Nodes               []Nodes        `json:"nodes"`
	DataStore           DataStore      `json:"datastore"`
	BackupStrategy      BackupStrategy `json:"backup_strategy"`
	DedicatedResourceId string         `json:"dedicated_resource_id"`
	Tags                []Tags         `json:"tags"`
}

func ExtractInstances

func ExtractInstances(r pagination.NewPage) ([]ListTaurusDBInstance, error)

func List

type MysqlEngineVersionInfo added in v0.9.6

type MysqlEngineVersionInfo struct {
	Id   string `json:"id"`
	Name string `json:"name"`
}

type MysqlFlavorInfo added in v0.9.6

type MysqlFlavorInfo struct {
	Id           string            `json:"id"`
	SpecCode     string            `json:"spec_code"`
	Vcpus        string            `json:"vcpus"`
	Ram          string            `json:"ram"`
	Type         string            `json:"type"`
	VersionName  string            `json:"version_name"`
	InstanceMode string            `json:"instance_mode"`
	AzStatus     map[string]string `json:"az_status"`
}

func ListFlavors added in v0.9.6

func ListFlavors(client *golangsdk.ServiceClient, opts ListFlavorsOpts) ([]MysqlFlavorInfo, error)

type NodeVolume

type NodeVolume struct {
	Type string `json:"type"`
	Size int64  `json:"size"`
	Used string `json:"used"`
}

type Nodes

type Nodes struct {
	Id               string     `json:"id"`
	Name             string     `json:"name"`
	Type             string     `json:"type"`
	Status           string     `json:"status"`
	PrivateIps       []string   `json:"private_read_ips"`
	Port             int        `json:"port"`
	Flavor           string     `json:"flavor_ref"`
	FlavorId         string     `json:"flavor_id"`
	Region           string     `json:"region_code"`
	AvailabilityZone string     `json:"az_code"`
	Volume           NodeVolume `json:"volume"`
	Created          string     `json:"created"`
	Updated          string     `json:"updated"`
	MaxConnections   string     `json:"max_connections"`
	Vcpus            string     `json:"vcpus"`
	Ram              string     `json:"ram"`
	NeedRestart      bool       `json:"need_restart"`
	Priority         int        `json:"priority"`
}

type ProxyInfo

type ProxyInfo struct {
	PoolId  string `json:"pool_id"`
	Name    string `json:"name"`
	Address string `json:"address"`
}

type SecondLevelMonitoring

type SecondLevelMonitoring struct {
	MonitorSwitch bool `json:"monitor_switch"`
	Period        int  `json:"period"`
}

func GetSecondLevelMonitoring

func GetSecondLevelMonitoring(client *golangsdk.ServiceClient, instanceId string) (*SecondLevelMonitoring, error)

type Tags

type Tags struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type TaurusDBInstance

type TaurusDBInstance struct {
	Id                  string   `json:"id"`
	Name                string   `json:"name"`
	Alias               string   `json:"alias"`
	Status              string   `json:"status"`
	Type                string   `json:"type"`
	Port                string   `json:"port"`
	NodeCount           int      `json:"node_count"`
	VpcId               string   `json:"vpc_id"`
	SubnetId            string   `json:"subnet_id"`
	SecurityGroupId     string   `json:"security_group_id"`
	ConfigurationId     string   `json:"configuration_id"`
	AZMode              string   `json:"az_mode"`
	MasterAZ            string   `json:"master_az_code"`
	TimeZone            string   `json:"time_zone"`
	ProjectId           string   `json:"project_id"`
	DbUserName          string   `json:"db_user_name"`
	PublicIps           string   `json:"public_ips"`
	PrivateIps          []string `json:"private_write_ips"`
	Created             string   `json:"created"`
	Updated             string   `json:"updated"`
	MaintenanceWindow   string   `json:"maintenance_window"`
	BackupUsedSpace     float64  `json:"backup_used_space"`
	EnterpriseProjectId string   `json:"enterprise_project_id"`

	Nodes          []Nodes        `json:"nodes"`
	DataStore      DataStore      `json:"datastore"`
	BackupStrategy BackupStrategy `json:"backup_strategy"`
	ChargeInfo     ChargeInfo     `json:"charge_info"`
	Tags           []Tags         `json:"tags"`
	Proxies        []ProxyInfo    `json:"proxies"`

	DedicatedResourceId string `json:"dedicated_resource_id"`
}

func Get

func Get(client *golangsdk.ServiceClient, instanceId string) (*TaurusDBInstance, error)

type TaurusDBPage

type TaurusDBPage struct {
	pagination.NewSinglePageBase
}

type TaurusDBResponse

type TaurusDBResponse struct {
	Id              string         `json:"id"`
	Name            string         `json:"name"`
	Status          string         `json:"status"`
	Region          string         `json:"region"`
	Mode            string         `json:"mode"`
	Port            string         `json:"port"`
	VpcId           string         `json:"vpc_id"`
	SubnetId        string         `json:"subnet_id"`
	Flavor          string         `json:"flavor_ref"`
	SecurityGroupId string         `json:"security_group_id"`
	ConfigurationId string         `json:"configuration_id"`
	AZMode          string         `json:"availability_zone_mode"`
	MasterAZ        string         `json:"master_availability_zone"`
	SlaveCount      int            `json:"slave_count"`
	DataStore       DataStore      `json:"datastore"`
	BackupStrategy  BackupStrategy `json:"backup_strategy"`
	ChargeInfo      ChargeInfo     `json:"charge_info"`
}

type UpdateSecondLevelMonitoringOpts

type UpdateSecondLevelMonitoringOpts struct {
	InstanceId    string `json:"-"`
	MonitorSwitch bool   `json:"monitor_switch" required:"true"`
	Period        int    `json:"period,omitempty"`
}

type Volume

type Volume struct {
	Type string `json:"type"`
	Used string `json:"used"`
}

type VolumeOpt

type VolumeOpt struct {
	Size int `json:"size" required:"true"`
}

Jump to

Keyboard shortcuts

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