doclient

package
v0.0.0-...-cec08c1 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDroplet

func CreateDroplet(client *godo.Client, req *godo.DropletCreateRequest, timeout time.Duration) (int, error)

func CreateOrGetSSHKey

func CreateOrGetSSHKey(PublicKey string, client *godo.Client) (int, error)

CreateOrGetSSHKey creates ssh key in DigitalOcean account, if the key already exists in DO, retrieves its ID and returns it

func DeleteDroplets

func DeleteDroplets(droplets []string, client *godo.Client) ([]string, error)

func ListDroplets

func ListDroplets(tag string, client *godo.Client) ([]godo.Droplet, error)

func NewClient

func NewClient(token string) (*godo.Client, error)

NewClient initializes new DigitalOcean client

Types

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