Documentation ¶
Index ¶
- Constants
- func WaitUntilDone(do DoFunc, check Checker, client *Client) error
- type AttachCbsStorageArgs
- type AttachCbsStorageResponse
- type Checker
- type Client
- func (client *Client) AttachCbsStorage(storageIds []string, uInstanceId string) (*AttachCbsStorageResponse, error)
- func (client *Client) AttachCbsStorageTask(storageId string, uInstanceId string) error
- func (client *Client) CreateCbsStorage(args *CreateCbsStorageArgs) ([]string, error)
- func (client *Client) CreateCbsStorageTask(args *CreateCbsStorageArgs) ([]string, error)
- func (client *Client) DescribeCbsStorage(args *DescribeCbsStorageArgs) (*DescribeCbsStorageResponse, error)
- func (client *Client) DetachCbsStorage(storageIds []string) (*DetachCbsStorageResponse, error)
- func (client *Client) DetachCbsStorageTask(storageId string) error
- func (client *Client) ModifyCbsRenewFlag(storageIds []string, RenewFlag string) (*ModifyCbsRenewFlagResponse, error)
- func (client *Client) ModifyCbsStorageAttribute(storageId string, storageName string) (*ModifyCbsStorageAttribute, error)
- func (client *Client) TerminateCbsStorage(storageIds []string) (*TerminateCbsStorageResponse, error)
- type CreateCbsStorageArgs
- type CreateCbsStorageResponse
- type DescribeCbsStorageArgs
- type DescribeCbsStorageResponse
- type DetachCbsStorageArgs
- type DetachCbsStorageResponse
- type DoFunc
- type ModifyCbsRenewFlagArgs
- type ModifyCbsRenewFlagResponse
- type ModifyCbsStorageAttribute
- type ModifyCbsStorageAttributeArg
- type Response
- type Storage
- type StorageSet
- type SubAttachDetachTask
- type TerminateCbsStorageArgs
- type TerminateCbsStorageResponse
Constants ¶
View Source
const ( PayModePrePay = "prePay" StorageTypeCloudBasic = "cloudBasic" StorageTypeCloudPremium = "cloudPremium" StorageTypeCloudSSD = "cloudSSD" DiskTypeRoot = "root" DiskTypeData = "data" StorageStatusNormal = "normal" RenewFlagAutoRenew = "NOTIFY_AND_AUTO_RENEW" RenewFlagManulRenew = "NOTIFY_AND_MANUAL_RENEW" RenewFlagManulRenewDisableNotify = "DISABLE_NOTIFY_AND_MANUAL_RENEW" )
View Source
const ( CbsHost = "cbs.api.qcloud.com" CbsPath = "/v2/index.php" )
View Source
const ( TaskCheckInterval = time.Second * 1 TaskSuccceed = 0 TaskFailed = 1 TaskRunning = 2 TaskStatusUnknown = 9 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AttachCbsStorageArgs ¶
type AttachCbsStorageResponse ¶
type AttachCbsStorageResponse struct { Response Detail map[string]SubAttachDetachTask `json:"detail"` }
type Checker ¶
type Checker func(info *StorageSet) (bool, error)
type Client ¶
func NewClientFromEnv ¶
func (*Client) AttachCbsStorage ¶
func (client *Client) AttachCbsStorage(storageIds []string, uInstanceId string) (*AttachCbsStorageResponse, error)
func (*Client) AttachCbsStorageTask ¶
func (*Client) CreateCbsStorage ¶
func (client *Client) CreateCbsStorage(args *CreateCbsStorageArgs) ([]string, error)
func (*Client) CreateCbsStorageTask ¶
func (client *Client) CreateCbsStorageTask(args *CreateCbsStorageArgs) ([]string, error)
func (*Client) DescribeCbsStorage ¶
func (client *Client) DescribeCbsStorage(args *DescribeCbsStorageArgs) (*DescribeCbsStorageResponse, error)
func (*Client) DetachCbsStorage ¶
func (client *Client) DetachCbsStorage(storageIds []string) (*DetachCbsStorageResponse, error)
func (*Client) DetachCbsStorageTask ¶
func (*Client) ModifyCbsRenewFlag ¶
func (client *Client) ModifyCbsRenewFlag(storageIds []string, RenewFlag string) (*ModifyCbsRenewFlagResponse, error)
func (*Client) ModifyCbsStorageAttribute ¶
func (client *Client) ModifyCbsStorageAttribute(storageId string, storageName string) (*ModifyCbsStorageAttribute, error)
func (*Client) TerminateCbsStorage ¶
func (client *Client) TerminateCbsStorage(storageIds []string) (*TerminateCbsStorageResponse, error)
type CreateCbsStorageArgs ¶
type DescribeCbsStorageArgs ¶
type DescribeCbsStorageResponse ¶
type DescribeCbsStorageResponse struct { Response TotalCount int `json:"totalCount"` StorageSet []StorageSet `json:"storageSet"` }
type DetachCbsStorageArgs ¶
type DetachCbsStorageArgs struct {
StorageIds []string `qcloud_arg:"storageIds"`
}
type DetachCbsStorageResponse ¶
type DetachCbsStorageResponse struct { Response Detail map[string]SubAttachDetachTask `json:"detail"` }
type ModifyCbsRenewFlagArgs ¶
type ModifyCbsRenewFlagResponse ¶
type ModifyCbsRenewFlagResponse struct {
Response
}
type ModifyCbsStorageAttribute ¶
type ModifyCbsStorageAttribute struct {
Response
}
type Storage ¶
func NewStorage ¶
func (Storage) GetInfo ¶
func (s Storage) GetInfo() (*StorageSet, error)
type StorageSet ¶
type StorageSet struct { StorageID string `json:"storageId"` UInstanceID string `json:"uInstanceId"` StorageName string `json:"storageName"` ProjectID int `json:"projectId"` DiskType string `json:"diskType"` StorageType string `json:"storageType"` StorageStatus string `json:"storageStatus"` ZoneID int `json:"zoneId"` CreateTime string `json:"createTime"` StorageSize int `json:"storageSize"` SnapshotAbility int `json:"snapshotAbility"` PayMode string `json:"payMode"` Portable int `json:"portable"` Attached int `json:"attached"` DeadlineTime string `json:"deadlineTime"` Rollbacking int `json:"rollbacking"` RollbackPercent int `json:"rollbackPercent"` Zone string `json:"zone"` }
type SubAttachDetachTask ¶
type TerminateCbsStorageArgs ¶
type TerminateCbsStorageArgs struct {
StorageIds []string `qcloud_arg:"storageIds"`
}
Click to show internal directories.
Click to hide internal directories.