digitalocean

package
v1.11.1 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound = errors.New("Not found")
)

Functions

func CheckSSH added in v1.9.0

func CheckSSH(host string, ctx context.Context) (err error)

func GetAccessToken added in v1.9.0

func GetAccessToken(ui cli.Ui) (accessToken string, err error)

func LoadSSHKey added in v1.9.0

func LoadSSHKey(sshKeys []string) (keyPath string, contents []byte, publicKey ssh.PublicKey, err error)

Types

type Client

type Client struct {
	Client *godo.Client
}

func NewClient

func NewClient(accessToken string) *Client

func (*Client) CreateDomain added in v1.9.0

func (do *Client) CreateDomain(name string) (domain *godo.Domain, err error)

func (*Client) CreateDomainRecord added in v1.9.0

func (do *Client) CreateDomainRecord(domain string, hostName string, ip string) (domainRecord *godo.DomainRecord, err error)

func (*Client) CreateDroplet

func (do *Client) CreateDroplet(region string, size string, image string, publicKey ssh.PublicKey, name string, env string) (newDroplet *godo.Droplet, monitorUri string, err error)

func (*Client) CreateSSHKey

func (do *Client) CreateSSHKey(key string) error

func (*Client) DeleteDomainRecord added in v1.9.0

func (do *Client) DeleteDomainRecord(record godo.DomainRecord, domain string) (err error)

func (*Client) GetAvailableRegions

func (do *Client) GetAvailableRegions() ([]godo.Region, error)

func (*Client) GetDroplet

func (do *Client) GetDroplet(droplet *godo.Droplet) (*godo.Droplet, string, error)

func (*Client) GetDropletByIP added in v1.9.0

func (do *Client) GetDropletByIP(ip string) (droplet *godo.Droplet, err error)

func (*Client) GetDroplets added in v1.9.0

func (do *Client) GetDroplets() (droplets []godo.Droplet, err error)

func (*Client) GetHostRecords added in v1.9.0

func (do *Client) GetHostRecords(hostsMap map[string][]dns.Host) []Host

func (*Client) GetSSHKey

func (do *Client) GetSSHKey(publicKey ssh.PublicKey) (*godo.Response, error)

func (*Client) GetSizesByRegion

func (do *Client) GetSizesByRegion(region *godo.Region) ([]godo.Size, error)

func (*Client) ListDomainRecords added in v1.9.0

func (do *Client) ListDomainRecords(domain string) (records []godo.DomainRecord, err error)

type Domain added in v1.9.0

type Domain struct {
	Name   string
	Exists bool
}

type Host added in v1.9.0

type Host struct {
	Domain Domain
	Name   string
	Fqdn   string
	Error  error
	Record *godo.DomainRecord
}

Jump to

Keyboard shortcuts

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