digitalocean

package
v0.0.0-...-75a7993 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const TypeURI = "digitalocean.com/v1"

Variables

This section is empty.

Functions

This section is empty.

Types

type DNS

type DNS struct {
	Nameservers []Nameserver `json:"nameservers"  yaml:"nameservers" toml:"nameservers"`
}

type Droplet

type Droplet struct {
	ID                uint64            `json:"droplet_id" yaml:"droplet_id" toml:"droplet_id"`
	Hostname          string            `json:"hostname" yaml:"hostname" toml:"hostname"`
	UserData          UserData          `json:"user_data"  yaml:"user_data" toml:"user_data"`
	VendorData        VendorData        `json:"vendor_data"  yaml:"vendor_data" toml:"vendor_data"`
	PublicKeys        []PublicKey       `json:"public_keys"  yaml:"public_keys" toml:"public_keys"`
	Region            string            `json:"region"  yaml:"region" toml:"region"`
	NetworkInterfaces NetworkInterfaces `json:"interfaces" yaml:"interfaces" toml:"interfaces"`
	FloatingIP        *FloatingIp       `json:"floating_ip"  yaml:"floating_ip" toml:"floating_ip"`
	DNS               *DNS              `json:"dns"  yaml:"dns" toml:"dns"`
	Tags              []string          `json:"tags,omitempty"  yaml:"tags,omitempty" toml:"tags,omitempty"`
	Features          Features          `json:"features"  yaml:"features" toml:"features"`
}

func (*Droplet) DataLinkAddrs

func (d *Droplet) DataLinkAddrs() []model.DataLinkAddr

func (*Droplet) TypeURI

func (d *Droplet) TypeURI() string

type Features

type Features struct {
	DhcpEnabled bool `json:"dhcp_enabled"  yaml:"dhcp_enabled" toml:"dhcp_enabled"`
}

type FloatingIp

type FloatingIp struct {
	Ipv4 FloatingIpv4 `json:"ipv4" yaml:"ipv4" toml:"ipv4"`
}

type FloatingIpv4

type FloatingIpv4 struct {
	Active    bool       `json:"active"  yaml:"active" toml:"active"`
	IPAddress model.IPv4 `json:"ip_address,omitempty"  yaml:"ip_address,omitempty" toml:"ip_address,omitempty"`
}

type IPv4Addr

type IPv4Addr struct {
	Address model.IPv4     `json:"ip_address" yaml:"ip_address" toml:"ip_address"`
	Netmask model.IPv4Mask `json:"netmask" yaml:"netmask" toml:"netmask"`
	Gateway model.IPv4     `json:"gateway" yaml:"gateway" toml:"gateway"`
}

type IPv6Addr

type IPv6Addr struct {
	Address model.IPv6 `json:"ip_address" yaml:"ip_address" toml:"ip_address"`
	// CIDR block size
	Cidr    uint8      `json:"cidr" yaml:"cidr" toml:"cidr"`
	Gateway model.IPv6 `json:"gateway" yaml:"gateway" toml:"gateway"`
}

type Nameserver

type Nameserver struct {
	Host string
	Port uint16
}

func (*Nameserver) MarshalJSON

func (n *Nameserver) MarshalJSON() ([]byte, error)

func (*Nameserver) MarshalText

func (n *Nameserver) MarshalText() ([]byte, error)

func (Nameserver) MarshalYAML

func (n Nameserver) MarshalYAML() (interface{}, error)

func (*Nameserver) String

func (n *Nameserver) String() string

func (*Nameserver) UnmarshalJSON

func (n *Nameserver) UnmarshalJSON(data []byte) (err error)

func (*Nameserver) UnmarshalTOML

func (n *Nameserver) UnmarshalTOML(data []byte) (err error)

func (*Nameserver) UnmarshalYAML

func (n *Nameserver) UnmarshalYAML(value *yaml.Node) error

type NetworkInterfaces

type NetworkInterfaces struct {
	PrivateInterfaces []PrivateNetworkInterface `json:"private" yaml:"private" toml:"private"`
	PublicInterfaces  []PublicNetworkInterface  `json:"public" yaml:"public" toml:"public"`
}

type PrivateNetworkInterface

type PrivateNetworkInterface struct {
	Mac  model.MACAddr `json:"mac" yaml:"mac" toml:"mac"`
	Ipv4 *IPv4Addr     `json:"ipv4,omitempty" yaml:"ipv4,omitempty" toml:"ipv4,omitempty"`
	Ipv6 *IPv6Addr     `json:"ipv6,omitempty" yaml:"ipv6,omitempty" toml:"ipv6,omitempty"`
}

func (*PrivateNetworkInterface) MarshalJSON

func (p *PrivateNetworkInterface) MarshalJSON() ([]byte, error)

MarshalJSON implements `json.Marshaler`

func (PrivateNetworkInterface) MarshalYAML

func (p PrivateNetworkInterface) MarshalYAML() (interface{}, error)

MarshalYAML implements `yaml.Marshaler`

type PublicKey

type PublicKey string

type PublicNetworkInterface

type PublicNetworkInterface struct {
	Mac        model.MACAddr `json:"mac" yaml:"mac" toml:"mac"`
	Ipv4       *IPv4Addr     `json:"ipv4" yaml:"ipv4" toml:"ipv4"`
	Ipv6       *IPv6Addr     `json:"ipv6" yaml:"ipv6" toml:"ipv6"`
	AnchorIpv4 *IPv4Addr     `json:"anchor_ipv4,omitempty"  yaml:"anchor_ipv4,omitempty" toml:"anchor_ipv4,omitempty"`
}

func (*PublicNetworkInterface) MarshalJSON

func (p *PublicNetworkInterface) MarshalJSON() ([]byte, error)

MarshalJSON implements `json.Marshaler`

func (PublicNetworkInterface) MarshalYAML

func (p PublicNetworkInterface) MarshalYAML() (interface{}, error)

MarshalYAML implements `yaml.Marshaler`

type UserData

type UserData string

type VendorData

type VendorData string

Jump to

Keyboard shortcuts

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