Documentation
¶
Index ¶
- Constants
- Variables
- func Merge(t1, t2 *Taskfile, includedTaskfile *IncludedTaskfile, namespaces ...string) error
- type Call
- type Cmd
- type Dep
- type IncludedTaskfile
- type IncludedTaskfiles
- func (tfs *IncludedTaskfiles) Len() int
- func (tfs *IncludedTaskfiles) Merge(other *IncludedTaskfiles)
- func (tfs *IncludedTaskfiles) Range(yield func(key string, includedTaskfile IncludedTaskfile) error) error
- func (tfs *IncludedTaskfiles) Set(key string, includedTaskfile IncludedTaskfile)
- func (tfs *IncludedTaskfiles) UnmarshalYAML(node *yaml.Node) error
- type Output
- type OutputGroup
- type Precondition
- type Task
- type Taskfile
- type Tasks
- type Var
- type Vars
- func (vs *Vars) DeepCopy() *Vars
- func (vs *Vars) Len() int
- func (vs *Vars) Merge(other *Vars)
- func (vs *Vars) Range(yield func(key string, value Var) error) error
- func (vs *Vars) Set(key string, value Var)
- func (vs *Vars) ToCacheMap() (m map[string]interface{})
- func (vs *Vars) UnmarshalYAML(node *yaml.Node) error
Constants ¶
const NamespaceSeparator = ":"
NamespaceSeparator contains the character that separates namescapes
Variables ¶
var ( // ErrCantUnmarshalPrecondition is returned for invalid precond YAML. ErrCantUnmarshalPrecondition = errors.New("task: Can't unmarshal precondition value") )
Functions ¶
Types ¶
type Cmd ¶
Cmd is a task command
func (*Cmd) UnmarshalYAML ¶
UnmarshalYAML implements yaml.Unmarshaler interface
type Dep ¶
Dep is a task dependency
func (*Dep) UnmarshalYAML ¶
UnmarshalYAML implements yaml.Unmarshaler interface
type IncludedTaskfile ¶
type IncludedTaskfile struct {
Taskfile string
Dir string
Optional bool
Internal bool
Aliases []string
AdvancedImport bool
Vars *Vars
BaseDir string // The directory from which the including taskfile was loaded; used to resolve relative paths
}
IncludedTaskfile represents information about included taskfiles
func (*IncludedTaskfile) DeepCopy ¶ added in v3.17.0
func (it *IncludedTaskfile) DeepCopy() *IncludedTaskfile
DeepCopy creates a new instance of IncludedTaskfile and copies data by value from the source struct.
func (*IncludedTaskfile) FullDirPath ¶ added in v3.14.1
func (it *IncludedTaskfile) FullDirPath() (string, error)
FullDirPath returns the fully qualified path to the included taskfile's working directory
func (*IncludedTaskfile) FullTaskfilePath ¶ added in v3.14.1
func (it *IncludedTaskfile) FullTaskfilePath() (string, error)
FullTaskfilePath returns the fully qualified path to the included taskfile
func (*IncludedTaskfile) UnmarshalYAML ¶
func (it *IncludedTaskfile) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements yaml.Unmarshaler interface
type IncludedTaskfiles ¶
type IncludedTaskfiles struct {
Keys []string
Mapping map[string]IncludedTaskfile
}
IncludedTaskfiles represents information about included tasksfiles
func (*IncludedTaskfiles) Len ¶ added in v3.1.0
func (tfs *IncludedTaskfiles) Len() int
Len returns the length of the map
func (*IncludedTaskfiles) Merge ¶ added in v3.1.0
func (tfs *IncludedTaskfiles) Merge(other *IncludedTaskfiles)
Merge merges the given IncludedTaskfiles into the caller one
func (*IncludedTaskfiles) Range ¶ added in v3.1.0
func (tfs *IncludedTaskfiles) Range(yield func(key string, includedTaskfile IncludedTaskfile) error) error
Range allows you to loop into the included taskfiles in its right order
func (*IncludedTaskfiles) Set ¶ added in v3.1.0
func (tfs *IncludedTaskfiles) Set(key string, includedTaskfile IncludedTaskfile)
Set sets a value to a given key
func (*IncludedTaskfiles) UnmarshalYAML ¶ added in v3.1.0
func (tfs *IncludedTaskfiles) UnmarshalYAML(node *yaml.Node) error
UnmarshalYAML implements the yaml.Unmarshaler interface.
type Output ¶ added in v3.11.0
type Output struct {
// Name of the Output.
Name string `yaml:"-"`
// Group specific style
Group OutputGroup
}
Output of the Task output
func (*Output) IsSet ¶ added in v3.11.0
IsSet returns true if and only if a custom output style is set.
func (*Output) UnmarshalYAML ¶ added in v3.11.0
UnmarshalYAML implements yaml.Unmarshaler It accepts a scalar node representing the Output.Name or a mapping node representing the OutputGroup.
type OutputGroup ¶ added in v3.11.0
type OutputGroup struct {
Begin, End string
}
OutputGroup is the style options specific to the Group style.
func (*OutputGroup) IsSet ¶ added in v3.11.0
func (g *OutputGroup) IsSet() bool
IsSet returns true if and only if a custom output style is set.
type Precondition ¶
Precondition represents a precondition necessary for a task to run
func (*Precondition) UnmarshalYAML ¶
func (p *Precondition) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements yaml.Unmarshaler interface.
type Task ¶
type Task struct {
Task string
Cmds []*Cmd
Deps []*Dep
Label string
Desc string
Summary string
Aliases []string
Sources []string
Generates []string
Status []string
Preconditions []*Precondition
Dir string
Vars *Vars
Env *Vars
Silent bool
Interactive bool
Internal bool
Method string
Prefix string
IgnoreError bool
Run string
IncludeVars *Vars
IncludedTaskfileVars *Vars
IncludedTaskfile *IncludedTaskfile
}
Task represents a task
func (*Task) DeepCopy ¶ added in v3.17.0
DeepCopy creates a new instance of Task and copies data by value from the source struct.
func (*Task) UnmarshalYAML ¶
type Taskfile ¶
type Taskfile struct {
Version string
Expansions int
Output Output
Method string
Includes *IncludedTaskfiles
Vars *Vars
Env *Vars
Tasks Tasks
Silent bool
Dotenv []string
Run string
Interval string
}
Taskfile represents a Taskfile.yml
func (*Taskfile) ParsedVersion ¶
ParsedVersion returns the version as a float64
func (*Taskfile) UnmarshalYAML ¶
UnmarshalYAML implements yaml.Unmarshaler interface
type Var ¶
Var represents either a static or dynamic variable.
func (*Var) UnmarshalYAML ¶
UnmarshalYAML implements yaml.Unmarshaler interface.
type Vars ¶
Vars is a string[string] variables map.
func (*Vars) DeepCopy ¶ added in v3.17.0
DeepCopy creates a new instance of Vars and copies data by value from the source struct.
func (*Vars) ToCacheMap ¶
ToCacheMap converts Vars to a map containing only the static variables
func (*Vars) UnmarshalYAML ¶
UnmarshalYAML implements the yaml.Unmarshaler interface.