Documentation ¶
Index ¶
- Constants
- type API
- func (this *API) ImageDelete(imageIdentification int) error
- func (this *API) ImageDetails(imageIdentification int) (*APIImage, error)
- func (this *API) ImageFetch(region string, location string, format string, virtio bool) (int, error)
- func (this *API) ImageList(region string) ([]*APIImage, error)
- func (this *API) PlanList() ([]*APIPlan, error)
- func (this *API) VmCreateImage(region string, hostname string, planIdentification int, ...) (int, error)
- func (this *API) VmCreateVolume(region string, hostname string, planIdentification int, ...) (int, error)
- func (this *API) VmDelete(vmIdentification int) error
- func (this *API) VmDiskSwap(vmIdentification int) error
- func (this *API) VmInfo(vmIdentification int) (*APIVmInfoStruct, error)
- func (this *API) VmReboot(vmIdentification int) error
- func (this *API) VmReimage(vmIdentification int, imageIdentification int) error
- func (this *API) VmSnapshot(vmIdentification int, region string) (int, error)
- func (this *API) VmStart(vmIdentification int) error
- func (this *API) VmStop(vmIdentification int) error
- func (this *API) VmVnc(vmIdentification int) (string, error)
- func (this *API) VolumeCreate(region string, size int, imageIdentification int, timeout time.Duration) (int, error)
- func (this *API) VolumeDelete(region string, volumeIdentification int) error
- type APIGenericResponse
- type APIImage
- type APIImageCreateResponse
- type APIImageDetailsResponse
- type APIImageListResponse
- type APIPlan
- type APIPlanListResponse
- type APIVmCreateResponse
- type APIVmInfoResponse
- type APIVmInfoStruct
- type APIVmVncResponse
- type APIVolume
- type APIVolumeInfoResponse
- type APIVolumeListResponse
- type LunaNode
- func (this *LunaNode) BandwidthAccounting(vm *lobster.VirtualMachine) int64
- func (this *LunaNode) ImageDelete(imageIdentification string) error
- func (this *LunaNode) ImageFetch(url string, format string) (string, error)
- func (this *LunaNode) ImageInfo(imageIdentification string) (*lobster.ImageInfo, error)
- func (this *LunaNode) ImageList() ([]*lobster.Image, error)
- func (this *LunaNode) PlanList() ([]*lobster.Plan, error)
- func (this *LunaNode) VmAction(vm *lobster.VirtualMachine, action string, value string) error
- func (this *LunaNode) VmCreate(vm *lobster.VirtualMachine, options *lobster.VMIVmCreateOptions) (string, error)
- func (this *LunaNode) VmDelete(vm *lobster.VirtualMachine) error
- func (this *LunaNode) VmInfo(vm *lobster.VirtualMachine) (*lobster.VmInfo, error)
- func (this *LunaNode) VmReboot(vm *lobster.VirtualMachine) error
- func (this *LunaNode) VmReimage(vm *lobster.VirtualMachine, imageIdentification string) error
- func (this *LunaNode) VmSnapshot(vm *lobster.VirtualMachine) (string, error)
- func (this *LunaNode) VmStart(vm *lobster.VirtualMachine) error
- func (this *LunaNode) VmStop(vm *lobster.VirtualMachine) error
- func (this *LunaNode) VmVnc(vm *lobster.VirtualMachine) (string, error)
Constants ¶
View Source
const LNDYNAMIC_API_URL = "https://dynamic.lunanode.com/api/{CATEGORY}/{ACTION}/"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
func (*API) ImageDelete ¶
func (*API) ImageDetails ¶
func (*API) ImageFetch ¶
func (*API) VmCreateImage ¶
func (*API) VmCreateVolume ¶
func (*API) VmDiskSwap ¶
func (*API) VmSnapshot ¶
func (*API) VolumeCreate ¶
func (this *API) VolumeCreate(region string, size int, imageIdentification int, timeout time.Duration) (int, error)
Create a volume with the given size in gigabytes and image identification. If timeout is greater than zero, we will wait for the volume to become ready, or return error if timeout is exceeded. Otherwise, we return immediately without error.
type APIGenericResponse ¶
type APIImageCreateResponse ¶
type APIImageCreateResponse struct {
Id string `json:"image_id"`
}
type APIImageDetailsResponse ¶
type APIImageDetailsResponse struct {
Image *APIImage `json:"details"`
}
type APIImageListResponse ¶
type APIImageListResponse struct {
Images []*APIImage `json:"images"`
}
type APIPlanListResponse ¶
type APIPlanListResponse struct {
Plans []*APIPlan `json:"plans"`
}
type APIVmCreateResponse ¶
type APIVmCreateResponse struct {
VmId string `json:"vm_id"`
}
type APIVmInfoResponse ¶
type APIVmInfoResponse struct {
Info *APIVmInfoStruct `json:"info"`
}
type APIVmInfoStruct ¶
type APIVmInfoStruct struct { Ip string `json:"ip"` PrivateIp string `json:"privateip"` Status string `json:"status"` StatusColor string `json:"-"` Hostname string `json:"hostname"` BandwidthUsed string `json:"bandwidthUsedGB"` LoginDetails string `json:"login_details"` DiskSwap string `json:"diskswap"` }
type APIVmVncResponse ¶
type APIVmVncResponse struct {
VncUrl string `json:"vnc_url"`
}
type APIVolumeInfoResponse ¶
type APIVolumeInfoResponse struct {
Volume *APIVolume `json:"volume"`
}
type APIVolumeListResponse ¶
type APIVolumeListResponse struct {
Volumes []*APIVolume `json:"volumes"`
}
type LunaNode ¶
type LunaNode struct {
// contains filtered or unexported fields
}
func (*LunaNode) BandwidthAccounting ¶
func (this *LunaNode) BandwidthAccounting(vm *lobster.VirtualMachine) int64
func (*LunaNode) ImageDelete ¶
func (*LunaNode) ImageFetch ¶
func (*LunaNode) VmCreate ¶
func (this *LunaNode) VmCreate(vm *lobster.VirtualMachine, options *lobster.VMIVmCreateOptions) (string, error)
func (*LunaNode) VmReimage ¶
func (this *LunaNode) VmReimage(vm *lobster.VirtualMachine, imageIdentification string) error
func (*LunaNode) VmSnapshot ¶
func (this *LunaNode) VmSnapshot(vm *lobster.VirtualMachine) (string, error)
Click to show internal directories.
Click to hide internal directories.