Versions in this module Expand all Collapse all v0 v0.1.0 Oct 13, 2020 Changes in this version + type BillingService interface + Credit func() (string, error) + type BillingServiceOp struct + func (s *BillingServiceOp) Credit() (string, error) + type Client struct + Billing BillingService + FloatingIPs FloatingIPsService + Images ImagesService + Plans PlansService + Regions RegionsService + SSHKeys SSHKeysService + SecurityGroups SecurityGroupsService + StartupScripts StartupScriptsService + VMs VMsService + VirtualNetworks VirtualNetworksService + Volumes VolumesService + func NewClient(key, id string, baseURL string) (*Client, error) + func (c *Client) Request(category, action string, request interface{}, response interface{}) error + type FloatingIP struct + AttachedID string + AttachedName string + AttachedType string + Hostname string + IP string + Region string + Reverse string + TimeUpdated string + type FloatingIPsService interface + Add func(region string) (string, error) + Delete func(region, ip string) error + List func() ([]FloatingIP, error) + type FloatingIPsServiceOp struct + func (s *FloatingIPsServiceOp) Add(region string) (string, error) + func (s *FloatingIPsServiceOp) Delete(region, ip string) error + func (s *FloatingIPsServiceOp) List() ([]FloatingIP, error) + type IP struct + Floating string + NetworkID string + Networking string + Port string + Subnet string + SubnetIdentification string + type Image struct + ImageID string + Name string + Region string + Status string + type ImageDetails struct + CacheMode string + Checksum string + DiskFormat string + HwDiskBus string + HwVideoModel string + HwVifModel string + IsReadOnly string + LibvirtCPUMode string + Metadata []string + Name string + Region string + Size string + Status string + TimeCreated string + type ImagesService interface + Delete func(imageID string) error + Details func(imageID string) (*ImageDetails, error) + Fetch func(region, name, location, format string, virtio *string) (string, error) + List func() ([]Image, error) + Rename func(imageID, name string) error + Replicate func(imageID, region string) (string, error) + type ImagesServiceOp struct + func (s *ImagesServiceOp) Delete(imageID string) error + func (s *ImagesServiceOp) Details(imageID string) (*ImageDetails, error) + func (s *ImagesServiceOp) Fetch(region, name, location, format string, virtio *string) (string, error) + func (s *ImagesServiceOp) List() ([]Image, error) + func (s *ImagesServiceOp) Replicate(imageID, region string) (string, error) + func (s ImagesServiceOp) Rename(imageID, name string) error + type Network struct + Name string + NetID string + Subnet string + type Plan struct + AllRegions string + Bandwidth string + CPUPoints string + Category string + Name string + PlanID string + Price string + PriceMonthlyNice string + PriceNice string + RAM string + Regions []string + RegionsNice string + Storage string + VCPU string + type PlansService interface + List func() ([]Plan, error) + type PlansServiceOp struct + func (s *PlansServiceOp) List() ([]Plan, error) + type RegionsService interface + List func() (map[string]string, error) + type RegionsServiceOp struct + func (s *RegionsServiceOp) List() (map[string]string, error) + type Rule struct + Direction string + EtherType string + ID string + Label string + PortRange string + Protocol string + Remote string + type RuleInsertOptions struct + Direction string + GroupID string + Label string + PortMax string + PortMin string + Protocol string + Region string + RemoteType string + RemoteValue string + Type string + type SSHKey struct + ID string + Name string + Value string + type SSHKeysService interface + Add func(label, sshKey string) (string, error) + List func() ([]SSHKey, error) + Remove func(keyID string) error + type SSHKeysServiceOp struct + func (s *SSHKeysServiceOp) Add(label, sshKey string) (string, error) + func (s *SSHKeysServiceOp) List() ([]SSHKey, error) + func (s *SSHKeysServiceOp) Remove(keyID string) error + type SecurityGroup struct + ID string + Name string + Region string + type SecurityGroupsService interface + Create func(region, name string) (string, error) + Delete func(region, groupID string) error + List func() ([]SecurityGroup, error) + Rename func(region, groupID, name string) error + RuleDelete func(region, groupID, ruleID string) error + RuleInsert func(options *RuleInsertOptions) (string, error) + RuleList func(region, groupID string) ([]Rule, error) + type SecurityGroupsServiceOp struct + func (s *SecurityGroupsServiceOp) Create(region, name string) (string, error) + func (s *SecurityGroupsServiceOp) Delete(region, groupID string) error + func (s *SecurityGroupsServiceOp) List() ([]SecurityGroup, error) + func (s *SecurityGroupsServiceOp) Rename(region, groupID, name string) error + func (s *SecurityGroupsServiceOp) RuleDelete(region, groupID, ruleID string) error + func (s *SecurityGroupsServiceOp) RuleInsert(options *RuleInsertOptions) (string, error) + func (s *SecurityGroupsServiceOp) RuleList(region, groupID string) ([]Rule, error) + type Snapshot struct + ID string + Name string + Region string + Size string + Status string + UserID string + Volume Volume + type StartupScript struct + Content string + ID string + Name string + type StartupScriptsService interface + Create func(name, content string) (string, error) + Delete func(scriptID string) error + Get func(scriptID string) (*StartupScript, error) + List func() ([]StartupScript, error) + Update func(scriptID, name, content string) error + type StartupScriptsServiceOp struct + func (s *StartupScriptsServiceOp) Create(name, content string) (string, error) + func (s *StartupScriptsServiceOp) Delete(scriptID string) error + func (s *StartupScriptsServiceOp) Get(scriptID string) (*StartupScript, error) + func (s *StartupScriptsServiceOp) List() ([]StartupScript, error) + func (s *StartupScriptsServiceOp) Update(scriptID, name, content string) error + type VM struct + Bandwidth string + Hostname string + ID string + Name string + OSStatus string + PlanID string + PrimaryIP string + PrivateIP string + RAM string + Region string + Storage string + VCPU string + type VMAddress struct + Addr string + External string + Version string + type VMCreateOptions struct + AffinityGroup string + IP string + ImageID string + KeyIDs string + NetID string + Region string + Scripts string + SecurityGroups string + SetPassword string + VolumeID string + VolumeVirtio string + type VMFloatingIPAddOptions struct + IP string + PrivateIP string + type VMFloatingIPDeleteOptions struct + IP string + Keep string + type VMInfo struct + Extra VM + Info struct{ ... } + type VMsService interface + Create func(hostname, planID string, options *VMCreateOptions) (string, error) + Delete func(vmID string) error + Diskswap func(vmID string) error + FloatingIPAdd func(vmID string, options *VMFloatingIPAddOptions) error + FloatingIPDelete func(vmID string, options *VMFloatingIPDeleteOptions) error + IPAdd func(vmID string, ip *string) (string, error) + IPDelete func(vmID, ip string) error + IPList func(vmID string) ([]IP, error) + Info func(vmID string) (*VMInfo, error) + List func() ([]VM, error) + Reboot func(vmID string) error + Reimage func(vmID, imageID string) error + Rename func(vmID, hostname string) error + Rescue func(vmID string) error + Resize func(vmID, planID string) error + SecurityGroupAdd func(vmID, groupID string) error + SecurityGroupRemove func(vmID, groupID string) error + Shelve func(vmID string) error + Snapshot func(vmID, label string) (string, error) + Start func(vmID string) error + Stop func(vmID string) error + Unshelve func(vmID string) error + VNC func(vmID string) (string, error) + type VMsServiceOp struct + func (s *VMsServiceOp) Create(hostname, planID string, options *VMCreateOptions) (string, error) + func (s *VMsServiceOp) Delete(vmID string) error + func (s *VMsServiceOp) Diskswap(vmID string) error + func (s *VMsServiceOp) FloatingIPAdd(vmID string, options *VMFloatingIPAddOptions) error + func (s *VMsServiceOp) FloatingIPDelete(vmID string, options *VMFloatingIPDeleteOptions) error + func (s *VMsServiceOp) IPAdd(vmID string, ip *string) (string, error) + func (s *VMsServiceOp) IPDelete(vmID, ip string) error + func (s *VMsServiceOp) IPList(vmID string) ([]IP, error) + func (s *VMsServiceOp) Info(vmID string) (*VMInfo, error) + func (s *VMsServiceOp) List() ([]VM, error) + func (s *VMsServiceOp) Reboot(vmID string) error + func (s *VMsServiceOp) Reimage(vmID, imageID string) error + func (s *VMsServiceOp) Rename(vmID, hostname string) error + func (s *VMsServiceOp) Rescue(vmID string) error + func (s *VMsServiceOp) Resize(vmID, planID string) error + func (s *VMsServiceOp) SecurityGroupAdd(vmID, groupID string) error + func (s *VMsServiceOp) SecurityGroupRemove(vmID, groupID string) error + func (s *VMsServiceOp) Shelve(vmID string) error + func (s *VMsServiceOp) Snapshot(vmID, label string) (string, error) + func (s *VMsServiceOp) Start(vmID string) error + func (s *VMsServiceOp) Stop(vmID string) error + func (s *VMsServiceOp) Unshelve(vmID string) error + func (s *VMsServiceOp) VNC(vmID string) (string, error) + type VirtualNetworksService interface + Create func(region, name, subnet, dns string) (string, error) + Delete func(region, netID string) error + List func() ([]Network, error) + type VirtualNetworksServiceOp struct + func (s *VirtualNetworksServiceOp) Create(region, name, subnet, dns string) (string, error) + func (s *VirtualNetworksServiceOp) Delete(region, netID string) error + func (s *VirtualNetworksServiceOp) List() ([]Network, error) + type Volume struct + ID string + Identification string + Name string + Region string + Size string + Status string + TimeCreated string + UserID string + type VolumeCreateOptions struct + Image string + SnapshotID string + type VolumeInfo struct + Attached string + Created string + ID string + Identification string + Name string + Size string + Status string + type VolumesService interface + Attach func(volumeID, vmID, target string) error + Create func(region, label, size string, options *VolumeCreateOptions) (string, error) + Delete func(volumeID string) error + Detach func(volumeID string) error + Extend func(volumeID, size string) error + Info func(volumeID string) (*VolumeInfo, error) + List func() ([]Volume, error) + Rename func(volumeID, name string) error + SnapshotCreate func(volumeID, label string) (string, error) + SnapshotDelete func(region, snapshotID string) error + SnapshotList func(region string) ([]Snapshot, error) + SnapshotReplicate func(region, snapshotID, imageName, destinationRegion string) (string, error) + type VolumesServiceOp struct + func (s *VolumesServiceOp) Attach(volumeID, vmID, target string) error + func (s *VolumesServiceOp) Create(region, label, size string, options *VolumeCreateOptions) (string, error) + func (s *VolumesServiceOp) Delete(volumeID string) error + func (s *VolumesServiceOp) Detach(volumeID string) error + func (s *VolumesServiceOp) Extend(volumeID, size string) error + func (s *VolumesServiceOp) Info(volumeID string) (*VolumeInfo, error) + func (s *VolumesServiceOp) List() ([]Volume, error) + func (s *VolumesServiceOp) Rename(volumeID, name string) error + func (s *VolumesServiceOp) SnapshotCreate(volumeID, label string) (string, error) + func (s *VolumesServiceOp) SnapshotDelete(region, snapshotID string) error + func (s *VolumesServiceOp) SnapshotList(region string) ([]Snapshot, error) + func (s *VolumesServiceOp) SnapshotReplicate(region, snapshotID, imageName, destinationRegion string) (string, error)