config

package
v0.0.0-...-139c8a2 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DefaultConfig is the default config.
	DefaultConfig = Config{
		Tasks: map[string]TaskConfig{},
	}
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Tasks map[string]TaskConfig `config:"tasks"`
	Debug bool                  `config:"debug"`
}

Config is the root struct for the config file.

type TaskConfig

type TaskConfig struct {
	CommandRaw       interface{}            `config:"command"`
	WorkingDirectory string                 `config:"workdir"`
	ParserRaw        map[string]interface{} `config:"parser"`
	Schedule         string                 `config:"schedule"`
	Debug            bool                   `config:"debug"`
	Shell            bool                   `config:"shell"`
}

TaskConfig represents the task config.

func (*TaskConfig) Command

func (t *TaskConfig) Command() ([]string, error)

Command parses the command line as array.

func (*TaskConfig) Parser

func (t *TaskConfig) Parser() (parser.Parser, error)

Parser creates parser from config.

Jump to

Keyboard shortcuts

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