Documentation ¶
Index ¶
- Constants
- func RegisterProviderDriver(name string, f ProviderDriverFunc)
- type AcrInstanceListResponse
- type AddSecurityGroupRuleRequest
- type AddSecurityGroupRuleResponse
- type AllocateEipRequest
- type AvailableZone
- type BucketProperties
- type Charge
- type ConvertPublicIpToEipRequest
- type CreateKeyPairRequest
- type CreateKeyPairResponse
- type CreateSecurityGroupRequest
- type CreateSecurityGroupResponse
- type CreateSwitchRequest
- type CreateSwitchResponse
- type CreateVpcRequest
- type CreateVpcResponse
- type DescribeAvailableResourceRequest
- type DescribeAvailableResourceResponse
- type DescribeEipRequest
- type DescribeEipResponse
- type DescribeGroupRulesRequest
- type DescribeGroupRulesResponse
- type DescribeImagesRequest
- type DescribeImagesResponse
- type DescribeInstanceTypesRequest
- type DescribeInstanceTypesResponse
- type DescribeKeyPairsRequest
- type DescribeKeyPairsResponse
- type DescribeSecurityGroupsRequest
- type DescribeSecurityGroupsResponse
- type DescribeSwitchesRequest
- type DescribeSwitchesResponse
- type DescribeVpcsRequest
- type DescribeVpcsResponse
- type DiskConf
- type Disks
- type DockerArtifact
- type Eip
- type EnterpriseContainerCommon
- type EnterpriseImage
- type EnterpriseImageListResponse
- type EnterpriseNamespace
- type EnterpriseNamespaceListResponse
- type EnterpriseRepository
- type EnterpriseRepositoryListResponse
- type GetOrdersRequest
- type GetOrdersResponse
- type GetRegionsResponse
- type GetSwitchRequest
- type GetSwitchResponse
- type GetVpcRequest
- type GetVpcResponse
- type GetZonesRequest
- type GetZonesResponse
- type Image
- type ImageTag
- type ImportKeyPairRequest
- type ImportKeyPairResponse
- type Instance
- type InstanceType
- type KeyPair
- type Namespace
- type Network
- type ObjectProperties
- type Order
- type Params
- type PersonalNamespace
- type PersonalNamespaceListData
- type PersonalNamespaceListResponse
- type PersonalRepo
- type PersonalRepositoryListData
- type PersonalRepositoryListResponse
- type Provider
- type ProviderDriverFunc
- type Region
- type RegistryInstance
- type Repository
- type SecurityGroup
- type SecurityGroupRule
- type Switch
- type Tag
- type TagData
- type TagsResponse
- type VPC
- type Zone
Constants ¶
View Source
const ( PrivateCloud = "PrivateCloud" // 自建机房 私有云 AlibabaCloud = "AlibabaCloud" HuaweiCloud = "HuaweiCloud" TencentCloud = "TencentCloud" BaiduCloud = "BaiduCloud" AWSCloud = "AWSCloud" ECloud = "ECloud" )
View Source
const ( TaskId = "TaskId" ClusterName = "ClusterName" )
View Source
const ( PrePaid = "PrePaid" PostPaid = "PostPaid" )
View Source
const ( Paid = iota + 1 Unpaid Cancelled )
View Source
const ( InstanceChargeTypePrePaid = "PrePaid" InstanceChargeTypePostPaid = "PostPaid" )
View Source
const ( EcsBuilding = "Pending" EcsRunning = "Running" EcsStarting = "Starting" EcsStopping = "Stopping" EcsStopped = "Stopped" EcsAbnormal = "Abnormal" EcsDeleted = "Deleted" )
View Source
const ( BandwidthPayByTraffic = "PayByTraffic" BandwidthPayByFix = "PayByBandwidth" BandwidthPrePaid = "PrePaid" )
View Source
const ( InsTypeChargeTypePrePaid = "PrePaid" InsTypeChargeTypePostPaid = "PostPaid" InsTypeChargeTypeAll = "All" )
View Source
const ( InsTypeAvailable = "Available" InsTypeAvaSoon = "AvailableSoon" InsTypeLowStock = "LowStock" InsTypeSellOut = "Sellout" )
View Source
const ( ImageGlobal = "global" ImagePrivate = "private" )
View Source
const ( SecGroupRuleIn = "ingress" SecGroupRuleOut = "egress" )
View Source
const ( SecGroupAllow = "allow" SecGroupDeny = "deny" )
View Source
const ( IpV4 = "IPv4" IpV6 = "IPv6" )
View Source
const ( ProtocolIcmp = "icmp" ProtocolIcmpV6 = "icmpV6" ProtocolTcp = "tcp" ProtocolUdp = "udp" ProtocolGre = "gre" ProtocolAll = "all" )
View Source
const ( OsLinux = "linux" OsWindows = "windows" OsOther = "other" )
View Source
const ( VPCStatusPending = "Pending" VPCStatusAvailable = "Available" VPCStatusAbnormal = "Abnormal" )
View Source
const ( SubnetPending = "Pending" SubnetAvailable = "Available" SubnetAbnormal = "Abnormal" )
View Source
const ( Year = "Year" Month = "Month" )
Variables ¶
This section is empty.
Functions ¶
func RegisterProviderDriver ¶
func RegisterProviderDriver(name string, f ProviderDriverFunc)
Types ¶
type AcrInstanceListResponse ¶ added in v0.7.1
type AcrInstanceListResponse struct { EnterpriseContainerCommon Instances []RegistryInstance `json:"Instances"` }
type AddSecurityGroupRuleResponse ¶
type AddSecurityGroupRuleResponse struct { }
type AllocateEipRequest ¶ added in v0.7.1
type AvailableZone ¶
type BucketProperties ¶ added in v0.7.1
type BucketProperties struct {
Name string `json:"name"`
}
type ConvertPublicIpToEipRequest ¶ added in v0.7.1
type CreateKeyPairRequest ¶ added in v0.7.0
type CreateKeyPairResponse ¶ added in v0.7.0
type CreateSwitchRequest ¶
type CreateSwitchResponse ¶
type CreateVpcRequest ¶
type CreateVpcResponse ¶
type DescribeAvailableResourceResponse ¶
type DescribeAvailableResourceResponse struct {
InstanceTypes map[string][]InstanceType
}
type DescribeEipRequest ¶ added in v0.7.1
type DescribeEipResponse ¶ added in v0.7.1
type DescribeGroupRulesResponse ¶
type DescribeGroupRulesResponse struct {
Rules []SecurityGroupRule
}
type DescribeImagesRequest ¶
type DescribeImagesResponse ¶
type DescribeImagesResponse struct {
Images []Image
}
type DescribeInstanceTypesRequest ¶
type DescribeInstanceTypesRequest struct {
TypeName []string
}
type DescribeInstanceTypesResponse ¶
type DescribeInstanceTypesResponse struct {
Infos []InstanceType
}
type DescribeKeyPairsRequest ¶ added in v0.7.0
type DescribeKeyPairsResponse ¶ added in v0.7.0
type DescribeSecurityGroupsRequest ¶ added in v0.1.1
type DescribeSecurityGroupsResponse ¶ added in v0.1.1
type DescribeSecurityGroupsResponse struct {
Groups []SecurityGroup
}
type DescribeSwitchesRequest ¶
type DescribeSwitchesRequest struct {
VpcId string
}
type DescribeSwitchesResponse ¶
type DescribeSwitchesResponse struct {
Switches []Switch
}
type DescribeVpcsRequest ¶
type DescribeVpcsRequest struct {
RegionId string
}
type DescribeVpcsResponse ¶
type DescribeVpcsResponse struct {
Vpcs []VPC
}
type DockerArtifact ¶ added in v0.7.1
type DockerArtifact struct {
Name string `json:"name"`
}
type EnterpriseContainerCommon ¶ added in v0.7.1
type EnterpriseImage ¶ added in v0.7.1
type EnterpriseImageListResponse ¶ added in v0.7.1
type EnterpriseImageListResponse struct { EnterpriseContainerCommon Images []EnterpriseImage `json:"Images"` }
type EnterpriseNamespace ¶ added in v0.7.1
type EnterpriseNamespaceListResponse ¶ added in v0.7.1
type EnterpriseNamespaceListResponse struct { EnterpriseContainerCommon Namespaces []EnterpriseNamespace `json:"Namespaces"` }
type EnterpriseRepository ¶ added in v0.7.1
type EnterpriseRepositoryListResponse ¶ added in v0.7.1
type EnterpriseRepositoryListResponse struct { EnterpriseContainerCommon Repositories []EnterpriseRepository `json:"repositories"` }
type GetOrdersRequest ¶
type GetOrdersResponse ¶
type GetOrdersResponse struct {
Orders []Order
}
type GetRegionsResponse ¶
type GetRegionsResponse struct {
Regions []Region
}
type GetSwitchRequest ¶
type GetSwitchRequest struct {
SwitchId string
}
type GetSwitchResponse ¶
type GetSwitchResponse struct {
Switch Switch
}
type GetVpcRequest ¶
type GetVpcResponse ¶
type GetVpcResponse struct {
Vpc VPC
}
type GetZonesRequest ¶
type GetZonesRequest struct {
RegionId string
}
type GetZonesResponse ¶
type GetZonesResponse struct {
Zones []Zone
}
type ImportKeyPairRequest ¶ added in v0.7.0
type ImportKeyPairResponse ¶ added in v0.7.0
type Instance ¶
type Instance struct { Id string `json:"id"` CostWay string `json:"cost_way"` Provider string `json:"provider"` IpInner string `json:"ip_inner"` IpOuter string `json:"ip_outer"` Network *Network `json:"network"` ImageId string `json:"image_id"` Status string `json:"status"` ExpireAt *time.Time `json:"expire_at"` }
type InstanceType ¶
type Network ¶
type Network struct { VpcId string `json:"vpc_id"` SubnetId string `json:"subnet_id"` SecurityGroup string `json:"security_group"` InternetChargeType string `json:"internet_charge_type"` InternetMaxBandwidthOut int `json:"internet_max_bandwidth_out"` InternetIpType string `json:"internet_ip_type"` }
type ObjectProperties ¶ added in v0.7.1
type ObjectProperties struct {
Name string `json:"name"`
}
type PersonalNamespace ¶ added in v0.7.1
type PersonalNamespace struct {
Namespace string `json:"namespace"`
}
type PersonalNamespaceListData ¶ added in v0.7.1
type PersonalNamespaceListData struct {
Namespaces []PersonalNamespace `json:"namespaces"`
}
type PersonalNamespaceListResponse ¶ added in v0.7.1
type PersonalNamespaceListResponse struct {
Data PersonalNamespaceListData `json:"data"`
}
type PersonalRepo ¶ added in v0.7.1
type PersonalRepo struct {
RepoName string `json:"repoName"`
}
type PersonalRepositoryListData ¶ added in v0.7.1
type PersonalRepositoryListData struct { Total int `json:"total"` Page int `json:"page"` PageSize int `json:"pageSize"` Repos []PersonalRepo `json:"repos"` }
type PersonalRepositoryListResponse ¶ added in v0.7.1
type PersonalRepositoryListResponse struct {
Data PersonalRepositoryListData `json:"data"`
}
type Provider ¶
type Provider interface { BatchCreate(m Params, num int) (instanceIds []string, err error) ProviderType() string GetInstances(ids []string) (instances []Instance, err error) GetInstancesByTags(region string, tags []Tag) (instances []Instance, err error) GetInstancesByCluster(regionId, clusterName string) (instances []Instance, err error) BatchDelete(ids []string, regionId string) error StartInstances(ids []string) error StopInstances(ids []string) error CreateVPC(req CreateVpcRequest) (CreateVpcResponse, error) GetVPC(req GetVpcRequest) (GetVpcResponse, error) CreateSwitch(req CreateSwitchRequest) (CreateSwitchResponse, error) GetSwitch(req GetSwitchRequest) (GetSwitchResponse, error) CreateSecurityGroup(req CreateSecurityGroupRequest) (CreateSecurityGroupResponse, error) AddIngressSecurityGroupRule(req AddSecurityGroupRuleRequest) error AddEgressSecurityGroupRule(req AddSecurityGroupRuleRequest) error DescribeSecurityGroups(req DescribeSecurityGroupsRequest) (DescribeSecurityGroupsResponse, error) GetRegions() (GetRegionsResponse, error) GetZones(req GetZonesRequest) (GetZonesResponse, error) DescribeAvailableResource(req DescribeAvailableResourceRequest) (DescribeAvailableResourceResponse, error) DescribeInstanceTypes(req DescribeInstanceTypesRequest) (DescribeInstanceTypesResponse, error) DescribeImages(req DescribeImagesRequest) (DescribeImagesResponse, error) DescribeVpcs(req DescribeVpcsRequest) (DescribeVpcsResponse, error) DescribeSwitches(req DescribeSwitchesRequest) (DescribeSwitchesResponse, error) DescribeGroupRules(req DescribeGroupRulesRequest) (DescribeGroupRulesResponse, error) // order GetOrders(req GetOrdersRequest) (GetOrdersResponse, error) // key pairs CreateKeyPair(req CreateKeyPairRequest) (CreateKeyPairResponse, error) ImportKeyPair(req ImportKeyPairRequest) (ImportKeyPairResponse, error) DescribeKeyPairs(req DescribeKeyPairsRequest) (DescribeKeyPairsResponse, error) // eip AllocateEip(req AllocateEipRequest) (ids []string, err error) GetEips(ids []string, regionId string) (map[string]Eip, error) ReleaseEip(ids []string) (err error) AssociateEip(id, instanceId, vpcId string) error DisassociateEip(id string) error DescribeEip(req DescribeEipRequest) (DescribeEipResponse, error) ConvertPublicIpToEip(req ConvertPublicIpToEipRequest) error // s3 ListObjects(endpoint, bucketName, prefix string) ([]ObjectProperties, error) ListBucket(endpoint string) ([]BucketProperties, error) GetOssDownloadUrl(string, string, string) string GetObjectDownloadUrl(bucketName, objectKey string) (string, error) // container registry ContainerInstanceList(region string, pageNumber, pageSize int) ([]RegistryInstance, int, error) EnterpriseNamespaceList(region, instanceId string, pageNumber, pageSize int) ([]Namespace, int, error) PersonalNamespaceList(region string) ([]Namespace, error) EnterpriseRepositoryList(region, instanceId, namespace string, pageNumber, pageSize int) ([]Repository, int, error) PersonalRepositoryList(region, namespace string, pageNumber, pageSize int) ([]Repository, int, error) EnterpriseImageList(region, instanceId, repoId, namespace, repoName string, pageNumber, pageSize int) ([]DockerArtifact, int, error) PersonalImageList(region, repoNamespace, repoName string, pageNum, pageSize int) ([]DockerArtifact, int, error) }
type ProviderDriverFunc ¶
type RegistryInstance ¶ added in v0.7.1
type Repository ¶ added in v0.7.1
type SecurityGroup ¶
type SecurityGroupRule ¶
type TagsResponse ¶ added in v0.7.1
type TagsResponse struct {
Data TagData `json:"data"`
}
Click to show internal directories.
Click to hide internal directories.