domain

package
v0.0.0-...-3eb98cc Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2017 License: MIT Imports: 0 Imported by: 2

Documentation

Index

Constants

View Source
const TokenHeader = "token"

Variables

This section is empty.

Functions

This section is empty.

Types

type DOToken

type DOToken struct {
	AccessToken  string `json:"access_token"`
	TokenType    string `json:"token_type"`
	ExpiresIn    int    `json:"expires_in"`
	RefreshToken string `json:"refresh_token"`
	Scope        string `json:"scope"`
	Info         Info   `json:"info"`
}

DOToken is the response of the OAUTH for Digital Ocean

type Droplet

type Droplet struct {
	ID                int      `json:"id"`
	Name              string   `json:"name"`
	Region            string   `json:"region"`
	InstanceName      string   `json:"instance_name"`
	OperatingSystem   string   `json:"operating_system"`
	IPV6              bool     `json:"ipv6,omitempty"`
	PrivateNetworking bool     `json:"private_networking"`
	Networks          Networks `json:"networks"`
	SSHKeys           []Key    `json:"ssh_keys"`
}

Droplet represents a droplet inside Digital Ocean

type DropletRequest

type DropletRequest struct {
	Name              string `json:"name"`
	Region            string `json:"region"`
	Size              string `json:"size"`
	Image             string `json:"image"`
	Backups           bool   `json:"backups"`
	IPv6              bool   `json:"ipv6"`
	PrivateNetworking bool   `json:"private_networking"`
	UserData          string `json:"user_data,omitempty"`
	SSHKeys           []Key  `json:"ssh_keys"`
}

DropletRequest is the request used to create a droplet in Digital Ocean

type Info

type Info struct {
	Name  string `json:"name"`
	Email string `json:"email"`
	UUID  string `json:"uuid"`
}

Info is the user information in a OAUTH requests from Digital Ocean

type Key

type Key struct {
	ID          int    `json:"id,omitempty"`
	Name        string `json:"name,omitempty"`
	Fingerprint string `json:"fingerprint,omitempty"`
	PublicKey   string `json:"public_key,omitempty"`
}

Key represents an SSH key

type NetworkV4

type NetworkV4 struct {
	IPAddress string `json:"ip_address,omitempty"`
	Netmask   string `json:"netmask,omitempty"`
	Gateway   string `json:"gateway,omitempty"`
	Type      string `json:"type,omitempty"`
}

NetworkV4 represents a V4 network

type NetworkV6

type NetworkV6 struct {
	IPAddress string `json:"ip_address,omitempty"`
	Netmask   int    `json:"netmask,omitempty"`
	Gateway   string `json:"gateway,omitempty"`
	Type      string `json:"type,omitempty"`
}

NetworkV6 The representation of a V6 network

type Networks

type Networks struct {
	V4 []NetworkV4 `json:"v4"`
	V6 []NetworkV6 `json:"v6"`
}

Networks the networks a droplet has

type User

type User struct {
	ID    int64
	Token DOToken
}

User represents an user in Digital Ocean

Jump to

Keyboard shortcuts

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