digitalocean

package
v0.0.0-...-1f15dd0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2021 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DigitalOcean

type DigitalOcean struct {
	// contains filtered or unexported fields
}

func New

func New() *DigitalOcean

New creates a new instance of the DigitalOcean provider

func (*DigitalOcean) CreateSSHKey

func (d *DigitalOcean) CreateSSHKey(token string, sshKey string) (interface{}, error)

func (*DigitalOcean) CreateServer

func (d *DigitalOcean) CreateServer(token string, sshKey interface{}) (*string, *string, error)

func (*DigitalOcean) EnterCredentials

func (d *DigitalOcean) EnterCredentials() (string, map[string]string)

func (*DigitalOcean) OAuth2

func (d *DigitalOcean) OAuth2() *oauth2.Config

func (*DigitalOcean) ValidateCredentials

func (d *DigitalOcean) ValidateCredentials(ctx *fiber.Ctx, session *session.Session) error

type Droplet

type Droplet struct {
	Droplet struct {
		ID       int64                       `json:"id"`
		Name     string                      `json:"name"`
		Locked   bool                        `json:"locked"`
		Status   string                      `json:"status"`
		Networks map[string][]DropletNetwork `json:"networks"`
	} `json:"droplet"`
}

type DropletCreate

type DropletCreate struct {
	Name    string   `json:"name"`
	Region  string   `json:"region"`
	Size    string   `json:"size"`
	Image   string   `json:"image"`
	SSHKeys []int    `json:"ssh_keys"`
	Backups bool     `json:"backups"`
	IPv6    bool     `json:"ipv6"`
	Tags    []string `json:"tags"`
}

type DropletNetwork

type DropletNetwork struct {
	IP   string `json:"ip_address"`
	Type string `json:"type"`
}

type SSHKey

type SSHKey struct {
	ID int `json:"id"`
}

type SSHKeyCreate

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

type SSHKeyCreated

type SSHKeyCreated struct {
	SSHKey struct {
		ID int `json:"id"`
	} `json:"ssh_key"`
}

Jump to

Keyboard shortcuts

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