v0

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2020 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	KindMissingValidationError    = errors.New("field 'Kind' cannot be nil")
	VersionMissingValidationError = errors.New("field 'Version' cannot be nil")
	ParamsMissingValidationError  = errors.New("params section missing")
	MinimalParamsValidationError  = errors.New("at least 'vms_count', 'location' and 'name' parameters are required")
	MajorVersionMismatchError     = errors.New("version of loaded structure has MAJOR part different than required")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Kind    *string  `json:"kind"`
	Version *string  `json:"version"`
	Params  *Params  `json:"params"`
	Unused  []string `json:"-"`
}

func NewConfig

func NewConfig() *Config

TODO test

func (*Config) Marshall

func (c *Config) Marshall() (b []byte, err error)

func (*Config) Unmarshall

func (c *Config) Unmarshall(b []byte) (err error)

type Output

type Output struct {
	PrivateIps []string `json:"private_ips"`
	PublicIps  []string `json:"public_ips"`
	RgName     *string  `json:"rg_name"`
	VmNames    []string `json:"vm_names"`
	VnetName   *string  `json:"vnet_name"`
}

type Params

type Params struct {
	Name             *string  `json:"name"`
	VmsCount         *int     `json:"vms_count"`
	UsePublicIP      *bool    `json:"use_public_ip"`
	Location         *string  `json:"location"`
	AddressSpace     []string `json:"address_space"`
	AddressPrefixes  []string `json:"address_prefixes"`
	RsaPublicKeyPath *string  `json:"rsa_pub_path"`
}

Jump to

Keyboard shortcuts

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