v0

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: May 31, 2021 License: Apache-2.0 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 {
	Kind    *string  `json:"kind" validate:"required,eq=hi"`
	Version *string  `json:"version" validate:"required,version=~0"`
	Params  *Params  `json:"params" validate:"required"`
	Unused  []string `json:"-"`
}

func NewConfig

func NewConfig() *Config

TODO test

func (*Config) GetParams

func (c *Config) GetParams() *Params

func (*Config) Marshal

func (c *Config) Marshal() ([]byte, error)

func (*Config) Unmarshal

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

type Host

type Host struct {
	Name *string `json:"name" validate:"required,min=1"`
	Ip   *string `json:"ip" validate:"required,min=1"`
}

type MountPoint

type MountPoint struct {
	Lun  *int    `json:"lun" validate:"required,min=0"`
	Path *string `json:"path" validate:"required,min=1"`
}

type Params

type Params struct {
	VmGroups          []VmGroup `json:"vm_groups" validate:"required,dive"`
	RsaPrivateKeyPath *string   `json:"rsa_private_path" validate:"required,min=1"`
}

type VmGroup

type VmGroup struct {
	Name        *string      `json:"name" validate:"required,min=1"`
	AdminUser   *string      `json:"admin_user" validate:"required,min=1"`
	Hosts       []Host       `json:"hosts" validate:"required,min=1,dive"`
	MountPoints []MountPoint `json:"mount_point" validate:"omitempty,dive"`
}

Jump to

Keyboard shortcuts

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