digitalocean

package
v0.0.0-...-3a6903f Latest Latest
Warning

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

Go to latest
Published: May 20, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddRecord

func AddRecord(pat, domain, ip, name string)

func CreateDroplet

func CreateDroplet(pat, dropletName, size, key string)

func CreateKey

func CreateKey(name, pubKey string)

func DeleteKey

func DeleteKey(id int)

func GetClient

func GetClient(pat string) (*godo.Client, context.Context)

func ListDomainRecords

func ListDomainRecords(pat, domain string) []string

func ListDroplets

func ListDroplets(pat string, ip2wolf map[string]string)

func ListImages

func ListImages(page int)

func ListKeyFingerprints

func ListKeyFingerprints() []string

func ListKeys

func ListKeys() []int

func ListProducerIps

func ListProducerIps(pat string) []string

func ListSizes

func ListSizes()

func RemoveDroplet

func RemoveDroplet(pat string, id int)

Types

type CreateKeyThing

type CreateKeyThing struct {
	Name      string `json:"name"`
	PublicKey string `json:"public_key"`
}

type DomainRecord

type DomainRecord struct {
	Name string
	Data string
}

/v2/domains/$DOMAIN_NAME/records

type DomainRecordsThing

type DomainRecordsThing struct {
	DomainRecords []DomainRecord `json:"domain_records"`
}

type DropletSize

type DropletSize struct {
	Slug        string
	Memory      int
	Disk        int
	Vcpus       int
	PriceMonth  float64 `json:"price_monthly"`
	Regions     []string
	Available   bool
	Description string
}

type DropletSizes

type DropletSizes struct {
	Sizes []DropletSize
}

type Image

type Image struct {
	Id   int
	Slug string
	Name string
}

type Images

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

type Key

type Key struct {
	ID          int
	Fingerprint string
	Name        string
}

type Keys

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

type RecordThing

type RecordThing struct {
	Name string `json:"name"`
	Type string `json:"type"`
	Data string `json:"data"`
	Ttl  int    `json:"ttl"`
}

type TokenSource

type TokenSource struct {
	AccessToken string
}

func (*TokenSource) Token

func (t *TokenSource) Token() (*oauth2.Token, error)

Jump to

Keyboard shortcuts

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