Documentation ¶
Index ¶
- type Client
- func (this *Client) ImageDelete(imageId int) error
- func (this *Client) ImageFetch(region string, name string, url string, format string) (int, error)
- func (this *Client) ImageInfo(imageId int) (*ImageInfoResponse, error)
- func (this *Client) ImageList() ([]*Image, error)
- func (this *Client) KeyAdd(name string, key string) (int, error)
- func (this *Client) KeyList() ([]*Key, error)
- func (this *Client) KeyRemove(keyId int) error
- func (this *Client) PlanList() ([]*Plan, error)
- func (this *Client) VmAction(vmId int, action string, value string) error
- func (this *Client) VmAddressAdd(vmId int) error
- func (this *Client) VmAddressRdns(vmId int, ip string, hostname string) error
- func (this *Client) VmAddressRemove(vmId int, ip string, privateip string) error
- func (this *Client) VmAddresses(vmId int) ([]*IpAddress, error)
- func (this *Client) VmCreate(name string, planId int, imageId int, options *VmCreateOptions) (int, error)
- func (this *Client) VmDelete(vmId int) error
- func (this *Client) VmInfo(vmId int) (*VMInfoResponse, error)
- func (this *Client) VmList() ([]*VirtualMachine, error)
- func (this *Client) VmReimage(vmId int, imageId int) error
- func (this *Client) VmResize(vmId int, planId int) error
- func (this *Client) VmSnapshot(vmId int, name string) (int, error)
- func (this *Client) VmVnc(vmId int) (string, error)
- type Image
- type ImageDetails
- type ImageFetchRequest
- type ImageFetchResponse
- type ImageInfoResponse
- type ImageListResponse
- type IpAddress
- type Key
- type KeyAddRequest
- type KeyAddResponse
- type KeyListResponse
- type Plan
- type PlanListResponse
- type VMActionRequest
- type VMAddressRdnsRequest
- type VMAddressRemoveRequest
- type VMAddressesResponse
- type VMCreateRequest
- type VMCreateResponse
- type VMInfoResponse
- type VMListResponse
- type VMReimageRequest
- type VMResizeRequest
- type VMSnapshotResponse
- type VMVncResponse
- type VirtualMachine
- type VirtualMachineAction
- type VirtualMachineDetails
- type VmCreateOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func (*Client) ImageDelete ¶
func (*Client) ImageFetch ¶
func (*Client) VmAddressAdd ¶
func (*Client) VmAddressRdns ¶
func (*Client) VmAddressRemove ¶
func (*Client) VmList ¶
func (this *Client) VmList() ([]*VirtualMachine, error)
type ImageDetails ¶
type ImageFetchRequest ¶
type ImageFetchResponse ¶
type ImageFetchResponse struct {
Id int `json:"id"`
}
type ImageInfoResponse ¶
type ImageInfoResponse struct { Image *Image `json:"image"` Details *ImageDetails `json:"details"` }
type ImageListResponse ¶
type ImageListResponse struct {
Images []*Image `json:"images"`
}
type KeyAddRequest ¶
type KeyAddResponse ¶
type KeyAddResponse struct {
Id int `json:"id"`
}
type KeyListResponse ¶
type KeyListResponse struct {
Keys []*Key `json:"keys"`
}
type PlanListResponse ¶
type PlanListResponse struct {
Plans []*Plan `json:"plans"`
}
type VMActionRequest ¶
type VMAddressRdnsRequest ¶
type VMAddressRdnsRequest struct {
Hostname string `json:"hostname"`
}
type VMAddressRemoveRequest ¶
type VMAddressesResponse ¶
type VMAddressesResponse struct {
Addresses []*IpAddress `json:"addresses"`
}
type VMCreateRequest ¶
type VMCreateResponse ¶
type VMCreateResponse struct {
Id int `json:"id"`
}
type VMInfoResponse ¶
type VMInfoResponse struct { VirtualMachine *VirtualMachine `json:"vm"` Details *VirtualMachineDetails `json:"details"` }
type VMListResponse ¶
type VMListResponse struct {
VirtualMachines []*VirtualMachine `json:"vms"`
}
type VMReimageRequest ¶
type VMReimageRequest struct {
ImageId int `json:"image_id"`
}
type VMResizeRequest ¶
type VMResizeRequest struct {
PlanId int `json:"plan_id"`
}
type VMSnapshotResponse ¶
type VMSnapshotResponse struct {
Id int `json:"id"`
}
type VMVncResponse ¶
type VMVncResponse struct {
Url string `json:"url"`
}
type VirtualMachine ¶
type VirtualMachine struct { Id int `json:"id"` PlanId int `json:"plan_id"` Region string `json:"region"` Name string `json:"name"` Status string `json:"status"` TaskPending bool `json:"task_pending"` ExternalIP string `json:"external_ip"` PrivateIP string `json:"private_ip"` CreatedTime int64 `json:"created_time"` }
type VirtualMachineAction ¶
type VirtualMachineDetails ¶
type VirtualMachineDetails struct { Ip string `json:"ip"` PrivateIp string `json:"private_ip"` Status string `json:"status"` Hostname string `json:"hostname"` BandwidthUsed int64 `json:"bandwidth_used"` LoginDetails string `json:"login_details"` Details map[string]string `json:"details"` Actions []*VirtualMachineAction `json:"actions"` CanVnc bool `json:"can_vnc"` CanReimage bool `json:"can_reimage"` CanResize bool `json:"can_resize"` CanSnapshot bool `json:"can_snapshot"` CanAddresses bool `json:"can_addresses"` }
type VmCreateOptions ¶
type VmCreateOptions struct {
KeyId int
}
Click to show internal directories.
Click to hide internal directories.