api

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2014 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ApiUrl           = "https://api.linode.com/"
	MaxBatchRequests = 25
)

Variables

This section is empty.

Functions

func NewApiRequest

func NewApiRequest(apiKey string) (*apiRequest, error)

Types

type Linode

type Linode struct {
	Id           int    `json:"LINODEID"`
	Status       int    `json:"STATUS"`
	Label        string `json:"LABEL"`
	DisplayGroup string `json:"LPM_DISPLAYGROUP"`
	Ram          int    `json:"TOTALRAM"`
	Ips          []*LinodeIp
}

func (*Linode) IsRunning added in v0.0.2

func (node *Linode) IsRunning() bool

func (*Linode) PrivateIp

func (node *Linode) PrivateIp() string

func (*Linode) PublicIp

func (node *Linode) PublicIp() string

type LinodeIp

type LinodeIp struct {
	LinodeId int    `json:"LINODEID"`
	Public   int    `json:"ISPUBLIC"`
	Ip       string `json:"IPADDRESS"`
}

type LinodeIps added in v0.0.2

type LinodeIps map[int][]*LinodeIp

map of LinodeIps by their Linode.Id

func FetchLinodeIpList added in v0.0.2

func FetchLinodeIpList(api apiRequest, linodeIds []int) (LinodeIps, error)

type Linodes

type Linodes map[string][]*Linode

map of Linodes by their display group

func FetchLinodeList added in v0.0.2

func FetchLinodeList(api apiRequest) (Linodes, error)

func FetchLinodesWithIps added in v0.0.2

func FetchLinodesWithIps(apiKey string) (Linodes, error)

func (Linodes) Ids added in v0.0.2

func (nodes Linodes) Ids() []int

func (Linodes) Size added in v0.0.2

func (nodes Linodes) Size() int

Jump to

Keyboard shortcuts

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