droplets

package
v0.0.0-...-cad3fbd Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionClient

type ActionClient interface {
	Shutdown(ctx context.Context, dropletID int) error
	PowerOff(ctx context.Context, dropletID int) error
	PowerOn(ctx context.Context, dropletID int) error
	PowerCycle(ctx context.Context, dropletID int) error
	Reboot(ctx context.Context, dropletID int) error
	Restore(ctx context.Context, dropletID, imageID int) error
	Resize(ctx context.Context, dropletID int, sizeSlug string, resizeDisk bool) error
	Rename(ctx context.Context, dropletID int, name string) error
	Snapshot(ctx context.Context, dropletID int, name string) error
	EnableBackups(ctx context.Context, dropletID int) error
	DisableBackups(ctx context.Context, dropletID int) error
	PasswordReset(ctx context.Context, dropletID int) error
	RebuildByImageID(ctx context.Context, dropletID int, imageID int) error
	RebuildByImageSlug(ctx context.Context, dropletID int, imageSlug string) error
	ChangeKernel(ctx context.Context, dropletID int, kernelID int) error
	EnableIPv6(ctx context.Context, dropletID int) error
	EnablePrivateNetworking(ctx context.Context, dropletID int) error
}

An ActionClient can interact with the DigitalOcean DropletActions service.

type Client

type Client interface {
	Create(ctx context.Context, name, region, size, image string, opts ...CreateOpt) (Droplet, error)
	CreateMultiple(ctx context.Context, names []string, region, size, image string, opts ...CreateMultipleOpt) ([]Droplet, error)
	Get(ctx context.Context, id int) (Droplet, error)
	Delete(ctx context.Context, id int) error
	List(ctx context.Context) (<-chan Droplet, <-chan error)
	Actions() ActionClient
}

A Client can interact with the DigitalOcean Droplets service.

func New

func New(g *godo.Client) Client

New creates a Client.

type CreateMultipleOpt

type CreateMultipleOpt func(*createMultipleOpt)

type CreateOpt

type CreateOpt func(*createOpt)

CreateOpt is an optional argument to droplets.Create.

func UseGodoCreate

func UseGodoCreate(req *godo.DropletCreateRequest) CreateOpt

type Droplet

type Droplet interface {
	Struct() *godo.Droplet
}

A Droplet in the DigitalOcean cloud.

Jump to

Keyboard shortcuts

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