config

package
v0.0.0-...-3951ee3 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2016 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	Cmd  string   `toml:"cmd"`
	Args []string `toml:"args"`
}

type Config

type Config struct {
	Repeat   int           `toml:"repeat"`
	Host     string        `toml:"host"`
	Prefix   string        `toml:"prefix"`
	User     string        `toml:"user"`
	Group    string        `toml:"group"`
	LogLevel string        `toml:"loglevel"`
	Sets     []TemplateSet `toml:"set"`
}

func NewFromCtx

func NewFromCtx(ctx *cli.Context) (*Config, error)

////////////////////////////////////////////////////////////////////////////

func NewFromFile

func NewFromFile(configPath string) (*Config, error)

////////////////////////////////////////////////////////////////////////////

func (*Config) OverrideFromCtx

func (cnf *Config) OverrideFromCtx(ctx *cli.Context)

////////////////////////////////////////////////////////////////////////////

func (*Config) Print

func (cnf *Config) Print()

////////////////////////////////////////////////////////////////////////////

func (*Config) Validate

func (cnf *Config) Validate() error

////////////////////////////////////////////////////////////////////////////

type TemplateSet

type TemplateSet struct {
	Name            string  `toml:"name"`
	TemplatePath    string  `toml:"template"`
	DestinationPath string  `toml:"dest"`
	User            string  `toml:"user"`
	Group           string  `toml:"group"`
	Check           Command `toml:"check"`
	Run             Command `toml:"run"`
}

Jump to

Keyboard shortcuts

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