Documentation
¶
Index ¶
- 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 VMHandler
- type VMInfo
- type VMReqInfo
- 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) // AWS는 keyPairName DeleteKey(keyName string) (bool, error) // AWS는 keyPairName }
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 PublicIPInfo struct { Name string // AWS : Name Tag대신 AllocationId를 리턴 함.(편의를 위해 Name 정보는 KeyValueList에 전달 함.), OpenStack : 381a10f8-5831-4822-8388-922673addde4(ID), Cloudit : 182.252.135.44(IP) Id string // AWS : Name에는 NameId가 설정되기 때문에 삭제를 위해 Id 필드 추가 PublicIP string OwnedVMID string Status string KeyValueList []KeyValue }
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 // GCP 는 하나에 한개의 Direction만 생성/조회 가능 SecurityRules *[]SecurityRuleInfo KeyValueList []KeyValue }
type SecurityReqInfo ¶
type SecurityReqInfo struct { Name string Direction string // GCP 는 하나에 한개의 Direction만 생성/조회 가능 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 // AWS, Id string // AWS, StartTime time.Time // Timezone: based on cloud-barista server location. Region RegionInfo // AWS, ex) {us-east1, us-east1-c} or {ap-northeast-2} ImageId string VMSpecId string // AWS, 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 // ex) AWS, 13.125.43.21 PublicDNS string // ex) AWS, ec2-13-125-43-0.ap-northeast-2.compute.amazonaws.com PrivateIP string // ex) AWS, ip-172-31-4-60.ap-northeast-2.compute.internal PrivateDNS string // ex) AWS, 172.31.4.60 KeyPairName string // ex) AWS, powerkimKeyPair VMUserId string // ex) user1 VMUserPasswd string VMBootDisk string // ex) /dev/sda1 VMBlockDisk string // ex) KeyValueList []KeyValue }
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.