api

package
v0.9.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 21, 2016 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ADJECTIVES = []string{
	"autumn", "hidden", "bitter", "misty", "silent", "empty", "dry", "dark",
	"summer", "icy", "delicate", "quiet", "white", "cool", "spring", "winter",
	"patient", "twilight", "dawn", "crimson", "wispy", "weathered", "blue",
	"billowing", "broken", "cold", "damp", "falling", "frosty", "green",
	"long", "late", "lingering", "bold", "little", "morning", "muddy", "old",
	"red", "rough", "still", "small", "sparkling", "throbbing", "shy",
	"wandering", "withered", "wild", "black", "young", "holy", "solitary",
	"fragrant", "aged", "snowy", "proud", "floral", "restless", "divine",
	"polished", "ancient", "purple", "lively", "nameless", "lucky", "odd", "tiny",
	"free", "dry", "yellow", "orange", "gentle", "tight", "super", "royal", "broad",
	"steep", "flat", "square", "round", "mute", "noisy", "hushy", "raspy", "soft",
	"shrill", "rapid", "sweet", "curly", "calm", "jolly", "fancy", "plain", "shinny",
}
View Source
var CurrentToken string
View Source
var NOUNS = []string{}/* 106 elements not displayed */

Functions

func AccountCreate

func AccountCreate(name string) (json *gabs.Container, err error)

func AccountDelete

func AccountDelete(name string) (json *gabs.Container, err error)

func AccountFindByToken

func AccountFindByToken(token string) string

func AccountReset

func AccountReset(name string) (json *gabs.Container, err error)

func AccountsList

func AccountsList() (json *gabs.Container, err error)

func Connect

func Connect(token string)

func IPConnect added in v0.9.5

func IPConnect(instanceID, publicIP, privateIP string) (json *gabs.Container, err error)

func IPCreate added in v0.9.5

func IPCreate(instanceID string, public bool) (json *gabs.Container, err error)

func IPDelete added in v0.9.5

func IPDelete(instanceID, ip string) (json *gabs.Container, err error)

func InstanceCreate

func InstanceCreate(params InstanceParams) (json *gabs.Container, err error)

func InstanceDestroy

func InstanceDestroy(id string) (json *gabs.Container, err error)

func InstanceFind

func InstanceFind(search string) string

func InstanceReboot

func InstanceReboot(id string, hard bool) (json *gabs.Container, err error)

func InstanceSuggestHostname

func InstanceSuggestHostname() string

func InstanceUpgrade

func InstanceUpgrade(id, size string) (json *gabs.Container, err error)

func InstancesList

func InstancesList() (json *gabs.Container, err error)

func QuotaGet

func QuotaGet(account string) (json *gabs.Container, err error)

func QuotaSet

func QuotaSet(params QuotaParams) (json *gabs.Container, err error)

func RegionsList

func RegionsList() (json *gabs.Container, err error)

func SizesList

func SizesList() (json *gabs.Container, err error)

func SshKeyCreate added in v0.9.4

func SshKeyCreate(params SshKeyParams) (json *gabs.Container, err error)

func SshKeyDelete added in v0.9.4

func SshKeyDelete(name string) (json *gabs.Container, err error)

func SshKeysList added in v0.9.4

func SshKeysList() (json *gabs.Container, err error)

func TemplateCreate

func TemplateCreate(params TemplateParams) (json *gabs.Container, err error)

func TemplateFind

func TemplateFind(id string) (json *gabs.Container, err error)

func TemplateUpdate

func TemplateUpdate(params TemplateParams) (json *gabs.Container, err error)

func TemplatesList

func TemplatesList() (json *gabs.Container, err error)

Types

type HTTPError

type HTTPError struct {
	Message    string
	URL        string
	StatusCode int
}

func HTTPErrorNew

func HTTPErrorNew(message, url string, statusCode int) *HTTPError

func HTTPErrorNewf

func HTTPErrorNewf(message, url string, statusCode int, a ...interface{}) *HTTPError

func (*HTTPError) Error

func (e *HTTPError) Error() string

type HTTPMethod

type HTTPMethod int
const (
	HTTPGet HTTPMethod = iota
	HTTPPost
	HTTPPut
	HTTPDelete
)

type InstanceParams

type InstanceParams struct {
	Name        string `url:"hostname"`
	Size        string `url:"size"`
	Region      string `url:"region"`
	SSHKey      string `url:"ssh_key"`
	Template    string `url:"template"`
	InitialUser string `url:"initial_user"`
	PublicIP    bool   `url:"public_ip"`
}

type QuotaParams

type QuotaParams struct {
	Account           string `url:"-"`
	InstanceCount     string `url:"instance_count_limit"`
	CpuCore           string `url:"cpu_core_limit"`
	RamMB             string `url:"ram_mb_limit"`
	DiskGB            string `url:"disk_gb_limit"`
	DiskVolumeCount   string `url:"disk_volume_count_limit"`
	DiskSnapshotCount string `url:"disk_snapshot_count_limit"`
	PublicIPAddress   string `url:"public_ip_address_limit"`
	SubnetCount       string `url:"subnet_count_limit"`
	NetworkCount      string `url:"network_count_limit"`
	SecurityGroup     string `url:"security_group_limit"`
	SecurityGroupRule string `url:"security_group_rule_limit"`
	PortCount         string `url:"port_count_limit"`
}

type SshKeyParams added in v0.9.4

type SshKeyParams struct {
	Name      string `url:"name"`
	PublicKey string `url:"public_key"`
}

type TemplateParams

type TemplateParams struct {
	ID               string `url:"id"`
	Name             string `url:"name"`
	ImageID          string `url:"image_id"`
	ShortDescription string `url:"short_description"`
	Description      string `url:"description"`
	CloudConfig      string `url:"cloud_config"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL