common

package
v2.3.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Nas
	ActionDescribeNasInstances = "DescribeNasInstances"
	ActionMountNas             = "MountNas"
	ActionUmountNas            = "UmountNas"
	ActionCreateNas            = "CreateNas"
	ActionResizeNas            = "ResizeNas"
	ActionDeleteNas            = "DeleteNas"
	ActionTaskStatus           = "CheckNasTaskStatus"

	// Disk
	ActionCreateDisk                = "CreateBlock"
	ActionAttachDisk                = "AttachBlock"
	ActionDetachDisk                = "DetachBlock"
	ActionDeleteDisk                = "DeleteBlock"
	ActionFindDiskByVolumeID        = "DescribeBlock"
	ActionDiskTaskStatus            = "CheckBlockTaskStatus"
	ActionUpdateBlock               = "UpdateBlock"
	ActionDescribeClusterNodePvInfo = "DescribeClusterNodePvInfo"

	// Ebs
	ActionCreateEbs         = "CreateDisk"
	ActionDescribeEvent     = "DescribeEvent"
	ActionDeleteEbs         = "DeleteDisk"
	ActionAttachEbs         = "AttachDisk"
	ActionDetachEbs         = "DetachDisk"
	ActionDescribeEbs       = "DescribeDisk"
	ActionExtendEbs         = "ExtendDisk"
	ActionDescribeDiskQuota = "DescribeDiskQuota"

	ActionDescribeInstance = "DescribeInstance"

	EbsSuccessCode = "Success"

	// Alarm
	ActionSendAlarm = "SendAlarm"
)

Variables

View Source
var (
	APIHost         string
	AccessKeyID     string
	AccessKeySecret string
	ClusterName     string
)

Functions

func DoRequest

func DoRequest(req *CloudRequest) (resp *http.Response, err error)

func IsAccessKeySet

func IsAccessKeySet() bool

func MarshalJsonToIOReader

func MarshalJsonToIOReader(v interface{}) (io.Reader, error)

Types

type CloudRequest

type CloudRequest struct {
	// contains filtered or unexported fields
}

func NewCCKRequest

func NewCCKRequest(action, method string, params map[string]string, body io.Reader) (*CloudRequest, error)

func NewCCSRequest

func NewCCSRequest(action, method string, params map[string]string, body io.Reader) (*CloudRequest, error)

func NewEbsRequest

func NewEbsRequest(action, method string, params map[string]string, body io.Reader) (*CloudRequest, error)

func NewEcsRequest

func NewEcsRequest(action, method string, params map[string]string, body io.Reader) (*CloudRequest, error)

func NewRequest

func NewRequest(action, method string, params map[string]string, productType string, body io.Reader) (*CloudRequest, error)

Jump to

Keyboard shortcuts

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