digitalocean

package
v0.0.0-...-85c0cb9 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

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

Config represents VM configuration

func NewConfig

func NewConfig(optionsYamlFile string) (*Config, error)

NewConfig initializes configuration for DigitalOcean VM

func (Config) Render

func (d Config) Render(apiToken string) ([]string, error)

Render a configuration's argument string array

type Options

type Options struct {
	Region            string `yaml:"region"`
	Image             string `yaml:"image"`
	Size              string `yaml:"size"`
	SSHUser           string `yaml:"sshUser"`
	SSHPort           int    `yaml:"sshPort"`
	SSHKeyFile        string `yaml:"sshKeyFile"`
	SSHKeyFingerprint string `yaml:"sshKeyFingerprint"`
}

Options represents the VM options for DO

func GetDefaults

func GetDefaults() *Options

GetDefaults returns default option values

func LoadOptionsFromFile

func LoadOptionsFromFile(optionsYamlFile string) (*Options, error)

LoadOptionsFromFile parses YAML file and return as Options struct

func (Options) Render

func (d Options) Render(apiToken string) ([]string, error)

Render options as argument string array

Jump to

Keyboard shortcuts

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