Documentation
¶
Overview ¶
Deprecated: This module has moved to github.com/sacloud/sacloud-sdk-go. Please migrate to that module. This repository will be archived.
Index ¶
- Constants
- Variables
- func NewClient(client saclient.ClientAPI) (*v1.Client, error)
- func NewClientWithAPIRootURL(client saclient.ClientAPI, apiRootURL string) (*v1.Client, error)
- type BackupAPI
- type DatabaseAPI
- type Error
- type InstanceAPI
- type Plan
- func (Plan) AllValues() []Plan
- func (Plan) AllValuesAsString() []string
- func (p Plan) GetDiskSizeMB() int
- func (p Plan) GetMemoryMB() int
- func (p Plan) GetNodes() int
- func (p Plan) GetNodesForNodes() int
- func (p Plan) GetPlanID() int
- func (p Plan) GetPlanIDforNodes() int
- func (p Plan) GetServiceClass() v1.ServiceClass
- func (p Plan) GetServiceClassForNodes() v1.ServiceClass
- func (p Plan) GetVirtualCore() int
Constants ¶
View Source
const ( // DefaultAPIRootURL デフォルトのAPIルートURL DefaultAPIRootURL = "https://secure.sakura.ad.jp/cloud/zone/tk1b/api/cloud/1.1" // ServiceKey SDKの種別を示すキー、プロファイルでのエンドポイント取得に利用する ServiceKey = "nosql" )
View Source
const Version = "0.3.1"
Variables ¶
View Source
var UserAgent = fmt.Sprintf( "nosql-api-go/%s (%s/%s; +https://github.com/sacloud/nosql-api-go)", Version, runtime.GOOS, runtime.GOARCH, )
UserAgent APIリクエスト時のユーザーエージェント
Functions ¶
Types ¶
type BackupAPI ¶
type DatabaseAPI ¶
type DatabaseAPI interface {
List(ctx context.Context) ([]v1.GetNosqlAppliance, error)
Create(ctx context.Context, plan Plan, request v1.NosqlCreateRequestAppliance) (*v1.NosqlAppliance, error)
Read(ctx context.Context, id string) (*v1.GetNosqlAppliance, error)
Update(ctx context.Context, id string, request v1.NosqlUpdateRequestAppliance) error
Delete(ctx context.Context, id string) error
ApplyChanges(ctx context.Context, id string) error
GetStatus(ctx context.Context, id string) (*v1.NosqlStatusResponseApplianceSettingsResponseNosql, error)
}
func NewDatabaseOp ¶
func NewDatabaseOp(client *v1.Client) DatabaseAPI
type InstanceAPI ¶
type InstanceAPI interface {
GetVersion(ctx context.Context) (*v1.NosqlGetVersionResponseNosql, error)
UpgradeVersion(ctx context.Context, version string) error
GetParameters(ctx context.Context) ([]v1.NosqlGetParameter, error)
SetParameters(ctx context.Context, params []v1.NosqlPutParameter) error
GetNodeHealth(ctx context.Context) (v1.NodeHealthNosqlStatus, error)
AddNodes(ctx context.Context, plan Plan, request v1.NosqlCreateRequestAppliance) (*v1.NosqlAppliance, error)
Recover(ctx context.Context) (string, error)
Repair(ctx context.Context, repairType string) error
Start(ctx context.Context) error
Stop(ctx context.Context) error
}
func NewInstanceOp ¶
func NewInstanceOp(client *v1.Client, dbId string, zone string) InstanceAPI
type Plan ¶ added in v0.2.0
type Plan string
func GetPlanFromID ¶ added in v0.2.0
func (Plan) AllValuesAsString ¶ added in v0.2.0
func (Plan) GetDiskSizeMB ¶ added in v0.2.0
func (Plan) GetMemoryMB ¶ added in v0.2.0
func (Plan) GetNodesForNodes ¶ added in v0.2.0
func (Plan) GetPlanIDforNodes ¶ added in v0.2.0
func (Plan) GetServiceClass ¶ added in v0.2.0
func (p Plan) GetServiceClass() v1.ServiceClass
func (Plan) GetServiceClassForNodes ¶ added in v0.2.0
func (p Plan) GetServiceClassForNodes() v1.ServiceClass
func (Plan) GetVirtualCore ¶ added in v0.2.0
Source Files
¶
Click to show internal directories.
Click to hide internal directories.