config

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bucket

type Bucket struct {
	Name  string   `yaml:"name"`
	Tasks []string `yaml:"tasks"`
}

type Config

type Config struct {
	Servers []string  `yaml:"servers"`
	Tasks   []*Task   `yaml:"tasks"`
	Buckets []*Bucket `yaml:"buckets"`
	Vars    EnvVar    `yaml:"vars"`
}

func NewConfig

func NewConfig(path string) (Config, error)

type EnvVar

type EnvVar map[string]string

func (EnvVar) ToStringVars

func (ev EnvVar) ToStringVars() []string

type Parser

type Parser interface {
	Parse() (Config, error)
}

func NewParser

func NewParser(path string) Parser

type Task

type Task struct {
	Name     string   `yaml:"name"`
	Env      EnvVar   `yaml:"env"`
	Commands []string `yaml:"run"`
	Hosts    []ssh.Config
}

type YamlParser

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

func (YamlParser) Parse

func (p YamlParser) Parse() (Config, error)

Jump to

Keyboard shortcuts

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