Documentation
¶
Index ¶
- Constants
- type API
- func (api *API) ImageDelete(imageIdentification int) error
- func (api *API) ImageDetails(imageIdentification int) (*Image, error)
- func (api *API) ImageFetch(region string, location string, format string, virtio bool) (int, error)
- func (api *API) ImageList(region string) ([]*Image, error)
- func (api *API) PlanList() ([]*Plan, error)
- func (api *API) VmCreateImage(region string, hostname string, planIdentification int, ...) (string, error)
- func (api *API) VmCreateVolume(region string, hostname string, planIdentification int, ...) (string, error)
- func (api *API) VmDelete(vmIdentification string) error
- func (api *API) VmDiskSwap(vmIdentification string) error
- func (api *API) VmInfo(vmIdentification string) (*VmStruct, *VmInfoStruct, error)
- func (api *API) VmList() ([]VmStruct, error)
- func (api *API) VmReboot(vmIdentification string) error
- func (api *API) VmReimage(vmIdentification string, imageIdentification int) error
- func (api *API) VmSnapshot(vmIdentification string) (int, error)
- func (api *API) VmStart(vmIdentification string) error
- func (api *API) VmStop(vmIdentification string) error
- func (api *API) VmVnc(vmIdentification string) (string, error)
- func (api *API) VolumeAttach(region string, volumeIdentification int, vmIdentification string) error
- func (api *API) VolumeCreate(region string, size int, imageIdentification *int) (int, error)
- func (api *API) VolumeDelete(region string, volumeIdentification int) error
- func (api *API) VolumeDetach(region string, volumeIdentification int) error
- func (api *API) VolumeInfo(region string, volumeIdentification int) (*Volume, error)
- func (api *API) VolumeList(region string) ([]*Volume, error)
- type GenericResponse
- type Image
- type ImageCreateResponse
- type ImageDetailsResponse
- type ImageListResponse
- type Plan
- type PlanListResponse
- type VmCreateResponse
- type VmInfoResponse
- type VmInfoStruct
- type VmListResponse
- type VmStruct
- type VmVncResponse
- type Volume
- type VolumeCreateResponse
- type VolumeInfoResponse
- type VolumeListResponse
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) ImageFetch ¶
func (*API) VmCreateImage ¶
func (*API) VmCreateVolume ¶
func (*API) VmDiskSwap ¶
func (*API) VmInfo ¶
func (api *API) VmInfo(vmIdentification string) (*VmStruct, *VmInfoStruct, error)
func (*API) VolumeAttach ¶
func (*API) VolumeCreate ¶
Create a volume with the given size in gigabytes and image identification (or nil for empty volume).
func (*API) VolumeDelete ¶
func (*API) VolumeDetach ¶
func (*API) VolumeInfo ¶
type GenericResponse ¶
type ImageCreateResponse ¶
type ImageCreateResponse struct {
ID int `json:"image_id,string"`
}
type ImageDetailsResponse ¶
type ImageDetailsResponse struct {
Image *Image `json:"details"`
}
type ImageListResponse ¶
type ImageListResponse struct {
Images []*Image `json:"images"`
}
type PlanListResponse ¶
type PlanListResponse struct {
Plans []*Plan `json:"plans"`
}
type VmCreateResponse ¶
type VmCreateResponse struct {
ID string `json:"vm_id"`
}
type VmInfoResponse ¶
type VmInfoResponse struct { Info *VmInfoStruct `json:"info"` Extra *VmStruct `json:"extra"` }
type VmInfoStruct ¶
type VmListResponse ¶
type VmListResponse struct {
Vms []VmStruct `json:"vms"`
}
type VmStruct ¶
type VmStruct struct { ID string `json:"vm_id"` Name string `json:"name"` Region string `json:"region"` Hostname string `json:"hostname"` PrimaryIP string `json:"primaryip"` PrivateIP string `json:"privateip"` PlanID string `json:"plan_id"` RAM string `json:"ram"` Vcpu string `json:"vcpu"` Storage string `json:"storage"` Bandwidth string `json:"bandwidth"` }
type VmVncResponse ¶
type VmVncResponse struct {
VncUrl string `json:"vnc_url"`
}
type VolumeCreateResponse ¶
type VolumeCreateResponse struct {
ID int `json:"volume_id,string"`
}
type VolumeInfoResponse ¶
type VolumeInfoResponse struct {
Volume *Volume `json:"volume"`
}
type VolumeListResponse ¶
type VolumeListResponse struct {
Volumes []*Volume `json:"volumes"`
}
Click to show internal directories.
Click to hide internal directories.