Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) Clone(params CloneParams) error
- func (c *Client) Copy(params CopyParams) error
- func (c *Client) Create(params CreateParams, outputStreamer chan string) (CreateResponse, error)
- func (c *Client) Delete(params DeleteParams) error
- func (c *Client) Describe(vmName string) (DescribeResponse, error)
- func (c *Client) Exists(vmName string) (bool, error)
- func (c *Client) License() (LicenseResponse, error)
- func (c *Client) Modify(vmName string, command string, property string, flags ...string) error
- func (c *Client) Run(params RunParams) (error, int)
- func (c *Client) Show(vmName string) (ShowResponse, error)
- func (c *Client) Start(params StartParams) error
- func (c *Client) Stop(params StopParams) error
- func (c *Client) Suspend(params SuspendParams) error
- func (c *Client) Version() (VersionResponse, error)
- type CloneParams
- type CopyParams
- type CreateParams
- type CreateResponse
- type DeleteParams
- type DescribeResponse
- type LicenseResponse
- type RunParams
- type Runner
- type ShowResponse
- type StartParams
- type StopParams
- type SuspendParams
- type VersionResponse
- type VersionResponseBody
Constants ¶
View Source
const ( AnkaNameAlreadyExistsErrorCode = 18 AnkaVMNotFoundExceptionErrorCode = 3 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { }
func (*Client) Clone ¶
func (c *Client) Clone(params CloneParams) error
func (*Client) Copy ¶ added in v1.7.0
func (c *Client) Copy(params CopyParams) error
func (*Client) Create ¶
func (c *Client) Create(params CreateParams, outputStreamer chan string) (CreateResponse, error)
func (*Client) Delete ¶
func (c *Client) Delete(params DeleteParams) error
func (*Client) License ¶ added in v1.8.0
func (c *Client) License() (LicenseResponse, error)
func (*Client) Start ¶
func (c *Client) Start(params StartParams) error
func (*Client) Stop ¶
func (c *Client) Stop(params StopParams) error
func (*Client) Suspend ¶
func (c *Client) Suspend(params SuspendParams) error
func (*Client) Version ¶
func (c *Client) Version() (VersionResponse, error)
type CloneParams ¶
type CopyParams ¶ added in v1.7.0
type CreateParams ¶
type CreateResponse ¶
type DeleteParams ¶
type DeleteParams struct {
VMName string
}
type DescribeResponse ¶
type DescribeResponse struct { Name string `json:"name"` Version int `json:"version"` UUID string `json:"uuid"` CPU struct { Cores int `json:"cores"` Threads int `json:"threads"` } `json:"cpu"` RAM string `json:"ram"` Usb struct { Tablet int `json:"tablet"` Kbd int `json:"kbd"` Host interface{} `json:"host"` Location interface{} `json:"location"` PciSlot int `json:"pci_slot"` Mouse int `json:"mouse"` } `json:"usb"` OpticalDrives []interface{} `json:"optical_drives"` HardDrives []struct { Controller string `json:"controller"` PciSlot int `json:"pci_slot"` File string `json:"file"` } `json:"hard_drives"` NetworkCards []struct { Index int `json:"index"` Mode string `json:"mode"` MacAddress string `json:"mac_address"` PortForwardingRules []struct { GuestPort int `json:"guest_port"` RuleName string `json:"rule_name"` Protocol string `json:"protocol"` HostIP string `json:"host_ip"` HostPort int `json:"host_port"` } `json:"port_forwarding_rules"` PciSlot int `json:"pci_slot"` Type string `json:"type"` } `json:"network_cards"` Smbios struct { Type string `json:"type"` } `json:"smbios"` Smc struct { Type string `json:"type"` } `json:"smc"` Nvram bool `json:"nvram"` Firmware struct { Type string `json:"type"` } `json:"firmware"` Display struct { Headless int `json:"headless"` FrameBuffer struct { PciSlot int `json:"pci_slot"` VncPort int `json:"vnc_port"` Height int `json:"height"` Width int `json:"width"` VncIP string `json:"vnc_ip"` Password string `json:"password"` } `json:"frame_buffer"` } `json:"display"` }
type LicenseResponse ¶ added in v1.8.0
type ShowResponse ¶
type ShowResponse struct { UUID string `json:"uuid"` Name string `json:"name"` CPUCores int `json:"cpu_cores"` RAM string `json:"ram"` ImageID string `json:"image_id"` Status string `json:"status"` HardDrive uint64 `json:"hard_drive"` }
func (ShowResponse) IsRunning ¶
func (sr ShowResponse) IsRunning() bool
func (ShowResponse) IsStopped ¶ added in v1.1.0
func (sr ShowResponse) IsStopped() bool
type StartParams ¶
type StopParams ¶
type SuspendParams ¶
type SuspendParams struct {
VMName string
}
type VersionResponse ¶ added in v1.7.0
type VersionResponse struct { Status string `json:"status"` Body VersionResponseBody `json:"body"` }
type VersionResponseBody ¶ added in v1.7.0
Click to show internal directories.
Click to hide internal directories.