cmd

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(args []string) int

Run executes the specified command.

Types

type EnvScript

type EnvScript struct {
	Down []string `yaml:"down"`
	SSH  SSH      `yaml:"ssh"`
	Up   []string `yaml:"up"`
}

EnvScript stores shell commands.

type Environment

type Environment struct {
	Group []Group `yaml:"group"`
	Label string  `yaml:"label"`
	Name  string  `yaml:"name"`
	State string
}

Environment stores details of an environment.

type Environments

type Environments struct {
	Envs     []Environment `yaml:"environment"`
	Provider string        `yaml:"provider"`
	Vars     Variable      `yaml:"variable"`
	// contains filtered or unexported fields
}

Environments stores all environments, provided Options, and related information.

func NewEnvironments

func NewEnvironments(args []string) (*Environments, error)

NewEnvironments return a Environments struct.

type Group

type Group struct {
	Name     string   `yaml:"name"`
	Project  string   `yaml:"project"`
	Resource Resource `yaml:"resource"`
	Zone     string   `yaml:"zone"`
}

Group stores details of a group.

type Instance

type Instance struct {
	Name   string    `yaml:"name"`
	Record Record    `yaml:"record"`
	Script EnvScript `yaml:"script"`
}

Instance stores details of an instance in Virtual Machine resource.

type Record

type Record struct {
	Domain     string   `yaml:"domain"`
	ExternalIP bool     `yaml:"external_ip"`
	IP         []string `yaml:"ip"`
	Type       string   `yaml:"type"`
	Zone       string   `yaml:"zone"`
}

Record stores details to create a DNS record.

type Resource

type Resource struct {
	VM VM `yaml:"vm"`
}

Resource stores declared resources in a group.

type SSH

type SSH struct {
	Key  string `yaml:"key"`
	Port string `yaml:"port"`
	User string `yaml:"user"`
}

SSH stores configuration for SSH connection.

type VM

type VM struct {
	Instance []Instance `yaml:"instance"`
	Script   EnvScript  `yaml:"script"`
}

VM stores details about Virtual Machine resource.

type Variable

type Variable map[string]interface{}

Variable stores variables declared in environment file.

type VirtualMachine

type VirtualMachine struct {
	Instances gce.Instances
	Opts      options
}

VirtualMachine holds configuration and methods to manage virtual machine instances.

func NewVirtualMachine

func NewVirtualMachine(args []string) (*VirtualMachine, error)

NewVirtualMachine returns a VirtualMachine struct.

Jump to

Keyboard shortcuts

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