digitalocean

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAuth

func CheckAuth(config config.Config) error

Query the droplet and spaces APIs to check whether the config contains valid credentials

func DeleteDroplet

func DeleteDroplet(config config.Config, dropletID int64) error

Types

type Droplet

type Droplet struct {
	Name    string
	ID      int64
	IP      string
	Created string
	Size    Size
}

func CreateDroplet

func CreateDroplet(config config.Config, region string, size string, userData string, jobID int64, publicKey string) (Droplet, error)

Launch a new droplet

func GetAllDroplets added in v0.2.0

func GetAllDroplets(config config.Config) ([]Droplet, error)

GetAllDroplets returns a list of droplets with the given tag using a godo client

func GetDropletById

func GetDropletById(config config.Config, id int64) (Droplet, error)

type Size

type Size struct {
	CPUs       int64
	Disk       int64
	Memory     int64
	HourlyCost float64
}

type Snapshot

type Snapshot struct {
	Name string
	ID   string
}

func GetLatestSnapshot

func GetLatestSnapshot(config config.Config) (Snapshot, error)

Jump to

Keyboard shortcuts

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