Documentation ¶
Index ¶
- func GetDetailsVM(insts []Instance, project string, zone string) []gce.Instance
- type Config
- func (c *Config) Down() (string, error)
- func (c *Config) DownAll() (string, error)
- func (c *Config) DownSingle() (string, error)
- func (c *Config) GetConfig(b []byte) error
- func (c *Config) GetData() ([]byte, error)
- func (c *Config) ParseEnvironmentFile() error
- func (c *Config) ParseFlags(args []string) error
- func (c *Config) Show() (string, error)
- func (c *Config) ShowAll() (string, error)
- func (c *Config) ShowSingle() (string, error)
- func (c *Config) Up() (string, error)
- func (c *Config) UpAll() (string, error)
- func (c *Config) UpSingle() (string, error)
- type EnvScript
- type Environment
- type Environments
- type Group
- type Instance
- type Record
- type Resource
- type SSH
- type ShowEnvironment
- type ShowGroup
- type ShowResource
- type VM
- type Variable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Name string `json:"name"` Label string `json:"label"` All bool `json:"all"` Data Environments `json:"data"` File string Host string Dry bool Format string }
Config stores options from parsed flags.
func (*Config) DownSingle ¶
DownSingle will shutdown an environment.
func (*Config) ParseEnvironmentFile ¶
ParseEnvironmentFile will parse an environment file for environments.
func (*Config) ParseFlags ¶
ParseFlags will parse flags for options.
func (*Config) ShowSingle ¶
ShowSingle returns the information about an environment.
type Environment ¶
type Environment struct { Group []Group `yaml:"group"` Label string `yaml:"label"` Name string `yaml:"name"` }
Environment stores details of an environment.
func (*Environment) CheckLabel ¶
func (env *Environment) CheckLabel(label string) bool
CheckLabel will check if a specific environment is labeled with provided labels.
func (*Environment) State ¶
func (env *Environment) State(state string)
State manages the state of an environment.
type Environments ¶
type Environments struct { Envs []Environment `yaml:"environment"` Vars Variable `yaml:"variable"` }
Environments stores environment details, and variables.
func NewEnvironments ¶
func NewEnvironments(data string) (*Environments, error)
NewEnvironments returns an Environment struct.
func (*Environments) GetEnvironment ¶
func (e *Environments) GetEnvironment(name string, label string) (Environment, error)
GetEnvironment return an Environment struct from the list of environments.
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 ShowEnvironment ¶
type ShowEnvironment struct { Name string `json:"name"` Label string `json:"label"` Group []ShowGroup `json:"group"` }
ShowEnvironment stores environment information for show command.
func (*ShowEnvironment) GetDetailsEnv ¶
func (se *ShowEnvironment) GetDetailsEnv(e Environment)
GetDetailsEnv will get details about the environment for show command.
func (*ShowEnvironment) GetDetailsGroup ¶
func (se *ShowEnvironment) GetDetailsGroup(groups []Group)
GetDetailsEnv will get details about the group for show command.
type ShowGroup ¶
type ShowGroup struct { Name string `json:"name"` Project string `json:"project"` Zone string `json:"zone"` Resource ShowResource `json:"resource"` }
ShowEnvironment stores group information for show command.
type ShowResource ¶
ShowEnvironment stores resource information for show command.