Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Append ¶
type Append struct { // Pos is the YAML file location where this object started. Pos model.ConfigPos `yaml:"-"` Paths []model.String `yaml:"paths"` With model.String `yaml:"with"` SkipEnsureNewline model.Bool `yaml:"skip_ensure_newline"` }
Append is an action that appends some output to the end of the file.
func (*Append) UnmarshalYAML ¶
UnmarshalYAML implements yaml.Unmarshaler.
type ForEach ¶
type ForEach struct { // Pos is the YAML file location where this object started. Pos model.ConfigPos `yaml:"-"` Iterator *ForEachIterator `yaml:"iterator"` Steps []*Step `yaml:"steps"` }
func (*ForEach) UnmarshalYAML ¶
UnmarshalYAML implements yaml.Unmarshaler.
type ForEachIterator ¶
type ForEachIterator struct { // Pos is the YAML file location where this object started. Pos model.ConfigPos `yaml:"-"` // The name by which the range value is accessed. Key model.String `yaml:"key"` // Values is a list to range over, e.g. ["dev", "prod"] Values []model.String `yaml:"values"` // ValuesFrom is a CEL expression returning a list of strings to range over. ValuesFrom *model.String `yaml:"values_from"` }
func (*ForEachIterator) UnmarshalYAML ¶
func (f *ForEachIterator) UnmarshalYAML(n *yaml.Node) error
UnmarshalYAML implements yaml.Unmarshaler.
func (*ForEachIterator) Validate ¶
func (f *ForEachIterator) Validate() error
type GoTemplate ¶
type GoTemplate struct { // Pos is the YAML file location where this object started. Pos model.ConfigPos `yaml:"-"` Paths []model.String `yaml:"paths"` }
GoTemplate is an action that executes one more files as a Go template, replacing each one with its template output.
func (*GoTemplate) UnmarshalYAML ¶
func (g *GoTemplate) UnmarshalYAML(n *yaml.Node) error
UnmarshalYAML implements yaml.Unmarshaler.
type Include ¶
type Include struct { // Pos is the YAML file location where this object started. Pos model.ConfigPos `yaml:"-"` Paths []*IncludePath `yaml:"paths"` }
Include is an action that places files into the output directory.
func (*Include) UnmarshalYAML ¶
UnmarshalYAML implements yaml.Unmarshaler.
type IncludePath ¶
type IncludePath struct { Pos model.ConfigPos `yaml:"-"` As []model.String `yaml:"as"` From model.String `yaml:"from"` OnConflict model.String `yaml:"on_conflict"` Paths []model.String `yaml:"paths"` Skip []model.String `yaml:"skip"` }
IncludePath represents an object for controlling the behavior of included files.
func (*IncludePath) UnmarshalYAML ¶
func (i *IncludePath) UnmarshalYAML(n *yaml.Node) error
UnmarshalYAML implements yaml.Unmarshaler.
func (*IncludePath) Validate ¶
func (i *IncludePath) Validate() error
Validate implements Validator.
type Input ¶
type Input struct { // Pos is the YAML file location where this object started. Pos model.ConfigPos `yaml:"-"` Name model.String `yaml:"name"` Desc model.String `yaml:"desc"` Default *model.String `yaml:"default,omitempty"` Rules []*Rule `yaml:"rules"` }
Input represents one of the parsed "input" fields from the spec.yaml file.
func (*Input) UnmarshalYAML ¶
UnmarshalYAML implements yaml.Unmarshaler.
type Print ¶
type Print struct { // Pos is the YAML file location where this object started. Pos model.ConfigPos `yaml:"-"` Message model.String `yaml:"message"` }
Print is an action that prints a message to standard output.
func (*Print) UnmarshalYAML ¶
UnmarshalYAML implements yaml.Unmarshaler.
type RegexNameLookup ¶
type RegexNameLookup struct { // Pos is the YAML file location where this object started. Pos model.ConfigPos `yaml:"-"` Paths []model.String `yaml:"paths"` Replacements []*RegexNameLookupEntry `yaml:"replacements"` }
RegexNameLookup is an action that replaces named regex capturing groups with the template variable of the same name.
func (*RegexNameLookup) UnmarshalYAML ¶
func (r *RegexNameLookup) UnmarshalYAML(n *yaml.Node) error
UnmarshalYAML implements yaml.Unmarshaler.
func (*RegexNameLookup) Validate ¶
func (r *RegexNameLookup) Validate() error
Validate implements Validator.
type RegexNameLookupEntry ¶
type RegexNameLookupEntry struct { Pos model.ConfigPos `yaml:"-"` Regex model.String `yaml:"regex"` }
RegexNameLookupEntry is one of potentially many regex replacements to be applied.
func (*RegexNameLookupEntry) UnmarshalYAML ¶
func (r *RegexNameLookupEntry) UnmarshalYAML(n *yaml.Node) error
UnmarshalYAML implements yaml.Unmarshaler.
func (*RegexNameLookupEntry) Validate ¶
func (r *RegexNameLookupEntry) Validate() error
Validate implements Validator.
type RegexReplace ¶
type RegexReplace struct { // Pos is the YAML file location where this object started. Pos model.ConfigPos `yaml:"-"` Paths []model.String `yaml:"paths"` Replacements []*RegexReplaceEntry `yaml:"replacements"` }
RegexReplace is an action that replaces a regex match (or a subgroup of it) with a template expression.
func (*RegexReplace) UnmarshalYAML ¶
func (r *RegexReplace) UnmarshalYAML(n *yaml.Node) error
UnmarshalYAML implements yaml.Unmarshaler.
func (*RegexReplace) Validate ¶
func (r *RegexReplace) Validate() error
Validate implements Validator.
type RegexReplaceEntry ¶
type RegexReplaceEntry struct { Pos model.ConfigPos `yaml:"-"` Regex model.String `yaml:"regex"` SubgroupToReplace model.String `yaml:"subgroup_to_replace"` With model.String `yaml:"with"` }
RegexReplaceEntry is one of potentially many regex replacements to be applied.
func (*RegexReplaceEntry) UnmarshalYAML ¶
func (r *RegexReplaceEntry) UnmarshalYAML(n *yaml.Node) error
UnmarshalYAML implements yaml.Unmarshaler.
func (*RegexReplaceEntry) Validate ¶
func (r *RegexReplaceEntry) Validate() error
Validate implements Validator.
type Rule ¶
type Rule struct { Pos model.ConfigPos `yaml:"-"` Rule model.String `yaml:"rule"` Message model.String `yaml:"message"` // optional }
Rule represents a validation rule.
func (*Rule) UnmarshalYAML ¶
UnmarshalYAML implements yaml.Unmarshaler.
type Spec ¶
type Spec struct { // Pos is the YAML file location where this object started. Pos model.ConfigPos `yaml:"-"` Desc model.String `yaml:"desc"` Inputs []*Input `yaml:"inputs"` Rules []*Rule `yaml:"rules"` Steps []*Step `yaml:"steps"` // Optional ignore section, adopting gitignore-like path matching. // Please be ware that there are some patterns that are always ignored such // as: '.DS_Store, '.bin', '.ssh'. Ignore []model.String `yaml:"ignore"` // Features configures which features to use depending on spec API version. Features features.Features `yaml:"-"` }
Spec represents a parsed spec.yaml file describing a template.
func (*Spec) UnmarshalYAML ¶
UnmarshalYAML implements yaml.Unmarshaler.
type Step ¶
type Step struct { // Pos is the YAML file location where this object started. Pos model.ConfigPos `yaml:"-"` Desc model.String `yaml:"desc"` If model.String `yaml:"if"` Action model.String `yaml:"action"` // Each action type has a field below. Only one of these will be set. Append *Append `yaml:"-"` ForEach *ForEach `yaml:"-"` GoTemplate *GoTemplate `yaml:"-"` Include *Include `yaml:"-"` Print *Print `yaml:"-"` RegexNameLookup *RegexNameLookup `yaml:"-"` RegexReplace *RegexReplace `yaml:"-"` StringReplace *StringReplace `yaml:"-"` }
Step represents one of the work steps involved in rendering a template.
func (*Step) UnmarshalYAML ¶
UnmarshalYAML implements yaml.Unmarshaler.
type StringReplace ¶
type StringReplace struct { // Pos is the YAML file location where this object started. Pos model.ConfigPos `yaml:"-"` Paths []model.String `yaml:"paths"` Replacements []*StringReplacement `yaml:"replacements"` }
StringReplace is an action that replaces a string with a template expression.
func (*StringReplace) UnmarshalYAML ¶
func (s *StringReplace) UnmarshalYAML(n *yaml.Node) error
UnmarshalYAML implements yaml.Unmarshaler.
func (*StringReplace) Validate ¶
func (s *StringReplace) Validate() error
Validate implements Validator.
type StringReplacement ¶
type StringReplacement struct { Pos model.ConfigPos `yaml:"-"` ToReplace model.String `yaml:"to_replace"` With model.String `yaml:"with"` }
func (*StringReplacement) UnmarshalYAML ¶
func (s *StringReplacement) UnmarshalYAML(n *yaml.Node) error
UnmarshalYAML implements yaml.Unmarshaler.
func (*StringReplacement) Validate ¶
func (s *StringReplacement) Validate() error