command

package
v0.0.0-...-a693c21 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CmdImages

func CmdImages(c *cli.Context)

func CmdKill

func CmdKill(c *cli.Context)

func CmdLetgo

func CmdLetgo(_ *cli.Context)

func CmdListDroplets

func CmdListDroplets(_ *cli.Context)

func CmdListKeys

func CmdListKeys(c *cli.Context)

func CmdListSnapshots

func CmdListSnapshots(_ *cli.Context)

func CmdUp

func CmdUp(c *cli.Context)

Types

type ActionResponse

type ActionResponse struct {
	Action struct {
		Id           int    `json:"id"`
		Status       string `json:"status"`
		Type         string `json:"type"`
		StartedAt    string `json:"started_at"`
		CompletedAt  string `json:"completed_at"`
		ResourceId   int    `json:"resource_id"`
		ResourceType string `json:"resource_type"`
	} `json:"action"`
}

func (ActionResponse) String

func (ar ActionResponse) String() string

type Droplet

type Droplet struct {
	Id     int    `json:"id"`
	Name   string `json:"name"`
	Memory int    `json:"memory"`
	Vcpus  int    `json:"vcpus"`
	Locked bool   `json:"locked"`
	Status string `json:"status"`
	Kernel struct {
		Id      int    `json:"id"`
		Name    string `json:"name"`
		Version string `json:"version"`
	} `json:"kernel"`
	CreatedAt string `json:"created_at"`

	Backup_ids   []int `json:"backup_ids"`
	Snapshot_ids []int `json:"snapshot_ids"`
	Image        struct {
		Id             int      `json:"id"`
		Name           string   `json:"name"`
		Distribution   string   `json:"distribution"`
		Slug           string   `json:"slug"`
		Public         bool     `json:"public"`
		Regions        []string `json:"regions"`
		Created_at     string   `json:"created_at"`
		Min_disk_size  int      `json:"min_disk_size"`
		Itype          string   `json:"type"`
		Size_gigabytes float32  `json:"size_gigabytes"`
	} `json:"image"`
	Networks struct {
		V4 []Network `json:"v4"`
		V6 []Network `json:"v6"`
	} `json:"networks"`
	Features []string `json:"features"`
}

func (Droplet) String

func (d Droplet) String() string

type DropletCommand

type DropletCommand struct {
	Type string `json:"type"`
}

type DropletsList

type DropletsList struct {
	Droplets []Droplet `json:"droplets"`
}

type DropletsResponse

type DropletsResponse struct {
	Droplet Droplet `json:"droplet"`
}

type Image

type Image struct {
	Id     int    `json:"id"`
	Name   string `json:"name"`
	Memory int    `json:"memory"`
	Vcpus  int    `json:"vcpus"`
	Locked bool   `json:"locked"`
	Status string `json:"status"`
	Kernel struct {
		Id      int    `json:"id"`
		Name    string `json:"name"`
		Version string `json:"version"`
	} `json:"kernel"`

	Backup_ids   []int `json:"backup_ids"`
	Snapshot_ids []int `json:"snapshot_ids"`
	Image        struct {
		Id             int      `json:"id"`
		Name           string   `json:"name"`
		Distribution   string   `json:"distribution"`
		Slug           string   `json:"slug"`
		Public         bool     `json:"public"`
		Regions        []string `json:"regions"`
		Created_at     string   `json:"created_at"`
		Min_disk_size  int      `json:"min_disk_size"`
		Itype          string   `json:"type"`
		Size_gigabytes float32  `json:"size_gigabytes"`
	} `json:"image"`
	// contains filtered or unexported fields
}

type ImageList

type ImageList struct {
	Images []Image `json:"droplets"`
}

func QueryImages

func QueryImages() ImageList

type Key

type Key struct {
	Id          int    `json:"id"`
	Fingerprint string `json:"fingerprint"`
	PublicKey   string `json:"public_key"`
	Name        string `json:"name"`
}

func ListKeys

func ListKeys() ([]Key, error)

func (Key) String

func (k Key) String() string

type KeysList

type KeysList struct {
	Keys []Key `json:"ssh_keys"`
}

type NamedDropletCommand

type NamedDropletCommand struct {
	Type string `json:"type"`
	Name string `json:"name"`
}

type Network

type Network struct {
	IpAddress string `json:"ip_address"`
	Netmask   string `json:"netmask"`
	Gateway   string `json:"gateway"`
	Type      string `json:"type"`
}

type Snapshot

type Snapshot struct {
	Id      string   `json:"id"`
	Name    string   `json:"name"`
	Regions []string `json:"regions"`

	CreatedAt    time.Time `json:"created_at"`
	ResourceId   string    `json:"resource_id"`
	ResourceType string    `json:"resource_type"`

	MinDISKSize   int     `json:"min_disk_size"`
	SizeGigabytes float32 `json:"size_gigabytes"`
}

func (Snapshot) String

func (s Snapshot) String() string

type SnapshotList

type SnapshotList struct {
	Snapshots []Snapshot `json:"snapshots"`
}

type StartDroplet

type StartDroplet struct {
	Name              string    `json:"name"`
	Region            string    `json:"region"`
	Size              string    `json:"size"`
	Image             string    `json:"image"`
	SshKeys           *[]int    `json:"ssh_keys"`
	Backups           bool      `json:"backups"`
	Ipv6              bool      `json:"ipv6"`
	UserData          *string   `json:"user_data"`
	PrivateNetworking bool      `json:"private_networking"`
	Volumes           *[]string `json:"volumes"`
	Tags              *[]string `json:"tags"`
}

func (StartDroplet) String

func (sd StartDroplet) String() string

Jump to

Keyboard shortcuts

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