conf

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	rs.BaseField

	// Global options only have limited rendering suffix support
	Global GlobalConfig `yaml:"global"`

	// Include other files using path relative to this config
	// no rendering suffix for this field
	Include []string `yaml:"include"`

	// Shells for command execution
	//
	// this option is host specific and do not support
	// renderers like `http`
	Shells []*tools.BaseToolWithInit `yaml:"shells"`

	Renderers map[string]dukkha.Renderer `yaml:"renderers"`

	// Language or tool specific tools
	Tools Tools `yaml:"tools"`

	Tasks map[string][]dukkha.Task `rs:"other"`
}

func NewConfig

func NewConfig() *Config

func (*Config) Merge

func (c *Config) Merge(a *Config) error

func (*Config) Resolve

func (c *Config) Resolve(appCtx dukkha.ConfigResolvingContext, needTasks bool) error

Resolve resolves all top level dukkha config to gain an overview of all tools and tasks nolint:gocyclo

type GlobalConfig

type GlobalConfig struct {
	rs.BaseField

	// CacheDir to store script file and temporary task execution data
	CacheDir string `yaml:"cache_dir"`

	DefaultGitBranch string `yaml:"default_git_branch"`

	// Env
	Env dukkha.Env `yaml:"env"`

	Values dukkha.ArbitraryValues `yaml:"values"`
}

func (*GlobalConfig) Merge

func (g *GlobalConfig) Merge(a *GlobalConfig) error

func (*GlobalConfig) ResolveAllButValues

func (g *GlobalConfig) ResolveAllButValues(rc dukkha.ConfigResolvingContext) error

type Tools added in v0.2.0

type Tools struct {
	rs.BaseField

	Data map[string][]dukkha.Tool `rs:"other"`
}

func (*Tools) Merge added in v0.2.0

func (m *Tools) Merge(a *Tools) error

Jump to

Keyboard shortcuts

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