config

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2021 License: GPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultFileNames = []string{"taskctl.yaml", "tasks.yaml"}

DefaultFileNames is default names for tasks' files

View Source
var ErrConfigNotFound = errors.New("config file not found")

ErrConfigNotFound occurs when requested config file does not exists

Functions

This section is empty.

Types

type Config

type Config struct {
	Import    []string
	Contexts  map[string]*runner.ExecutionContext
	Pipelines map[string]*scheduler.ExecutionGraph
	Tasks     map[string]*task.Task
	Watchers  map[string]*watch.Watcher

	Debug, DryRun, Summary bool
	Output                 string

	Variables variables.Container
}

Config is a taskctl internal config structure

func NewConfig

func NewConfig() *Config

NewConfig creates new config instance

type Loader

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

Loader reads and parses config files

func NewConfigLoader

func NewConfigLoader(dst *Config) Loader

NewConfigLoader is Loader constructor

func (*Loader) Load

func (cl *Loader) Load(file string) (*Config, error)

Load loads and parses requested config file

func (*Loader) LoadGlobalConfig

func (cl *Loader) LoadGlobalConfig() (*Config, error)

LoadGlobalConfig load global config file - ~/.taskctl/config.yaml

Jump to

Keyboard shortcuts

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