Documentation
¶
Index ¶
- type GpuInfo
- type IID
- type ImageHandler
- type ImageInfo
- type ImageReqInfo
- type KeyPairHandler
- type KeyPairInfo
- type KeyPairReqInfo
- type KeyValue
- type PublicIPHandler
- type PublicIPInfo
- type PublicIPReqInfo
- type RegionInfo
- type SecurityHandler
- type SecurityInfo
- type SecurityReqInfo
- type SecurityRuleInfo
- type VCpuInfo
- type VMHandler
- type VMInfo
- type VMReqInfo
- type VMSpecHandler
- type VMSpecInfo
- type VMStatus
- type VMStatusInfo
- type VNetworkHandler
- type VNetworkInfo
- type VNetworkReqInfo
- type VNicHandler
- type VNicInfo
- type VNicReqInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ImageHandler ¶
type ImageReqInfo ¶
type KeyPairHandler ¶
type KeyPairHandler interface {
CreateKey(keyPairReqInfo KeyPairReqInfo) (KeyPairInfo, error)
ListKey() ([]*KeyPairInfo, error)
GetKey(keyName string) (KeyPairInfo, error)
DeleteKey(keyName string) (bool, error)
}
type KeyPairInfo ¶
type KeyPairReqInfo ¶
type KeyPairReqInfo struct {
Name string
}
type PublicIPHandler ¶
type PublicIPHandler interface {
CreatePublicIP(publicIPReqInfo PublicIPReqInfo) (PublicIPInfo, error)
ListPublicIP() ([]*PublicIPInfo, error)
GetPublicIP(publicIPID string) (PublicIPInfo, error)
DeletePublicIP(publicIPID string) (bool, error)
}
type PublicIPInfo ¶
type PublicIPReqInfo ¶
type RegionInfo ¶
type SecurityHandler ¶
type SecurityHandler interface {
CreateSecurity(securityReqInfo SecurityReqInfo) (SecurityInfo, error)
ListSecurity() ([]*SecurityInfo, error)
GetSecurity(securityID string) (SecurityInfo, error)
DeleteSecurity(securityID string) (bool, error)
}
type SecurityInfo ¶
type SecurityInfo struct {
Id string
Name string
Direction string
SecurityRules *[]SecurityRuleInfo
KeyValueList []KeyValue
}
type SecurityReqInfo ¶
type SecurityReqInfo struct {
Name string
Direction string
SecurityRules *[]SecurityRuleInfo
}
type SecurityRuleInfo ¶
type VMHandler ¶
type VMHandler interface {
StartVM(vmReqInfo VMReqInfo) (VMInfo, error)
SuspendVM(vmID string) (VMStatus, error)
ResumeVM(vmID string) (VMStatus, error)
RebootVM(vmID string) (VMStatus, error)
TerminateVM(vmID string) (VMStatus, error)
ListVMStatus() ([]*VMStatusInfo, error)
GetVMStatus(vmID string) (VMStatus, error)
ListVM() ([]*VMInfo, error)
GetVM(vmID string) (VMInfo, error)
}
type VMInfo ¶
type VMInfo struct {
Name string
Id string
StartTime time.Time // Timezone: based on cloud-barista server location.
Region RegionInfo // ex) {us-east1, us-east1-c} or {ap-northeast-2}
ImageId string
VMSpecId string // instance type or flavour, etc... ex) t2.micro or f1.micro
VirtualNetworkId string // AWS, ex) subnet-8c4a53e4
SecurityGroupIds []string // AWS, ex) sg-0b7452563e1121bb6
NetworkInterfaceId string // ex) eth0
PublicIP string
PublicDNS string
PrivateIP string
PrivateDNS string
KeyPairName string
VMUserId string // ex) user1
VMUserPasswd string
VMBootDisk string // ex) /dev/sda1
VMBlockDisk string // ex)
KeyValueList []KeyValue
}
type VMSpecHandler ¶
type VMSpecHandler interface {
// Region: AWS=Region, GCP=Zone, Azure=Location
ListVMSpec(Region string) ([]*VMSpecInfo, error)
GetVMSpec(Region string, Name string) (VMSpecInfo, error)
ListOrgVMSpec(Region string) (string, error) // return string: json format
GetOrgVMSpec(Region string, Name string) (string, error) // return string: json format
}
type VMSpecInfo ¶
type VMStatus ¶
type VMStatus string
GO do not support Enum. So, define like this.
const ( Creating VMStatus = "Creating" // from launch to running Running VMStatus = "Running" Suspending VMStatus = "Suspending" // from running to suspended Suspended VMStatus = "Suspended" Resuming VMStatus = "Resuming" // from suspended to running Rebooting VMStatus = "Rebooting" // from running to running Terminating VMStatus = "Terminating" // from running, suspended to terminated Terminated VMStatus = "Terminated" NotExist VMStatus = "NotExist" // VM does not exist Failed VMStatus = "Failed" )
type VMStatusInfo ¶
type VNetworkHandler ¶
type VNetworkHandler interface {
CreateVNetwork(vNetworkReqInfo VNetworkReqInfo) (VNetworkInfo, error)
ListVNetwork() ([]*VNetworkInfo, error)
GetVNetwork(vNetworkID string) (VNetworkInfo, error)
DeleteVNetwork(vNetworkID string) (bool, error)
}
type VNetworkInfo ¶
type VNetworkReqInfo ¶
type VNetworkReqInfo struct {
Name string
}
type VNicHandler ¶
Click to show internal directories.
Click to hide internal directories.