Documentation
¶
Index ¶
- type Spec
- type Yaml
- func (y *Yaml) Changelog() string
- func (y *Yaml) Condition(source string) (bool, error)
- func (y *Yaml) ConditionFromSCM(source string, scm scm.ScmHandler) (bool, error)
- func (y *Yaml) Read() error
- func (y *Yaml) Source(workingDir string) (string, error)
- func (y *Yaml) Target(source string, dryRun bool) (bool, error)
- func (y *Yaml) TargetFromSCM(source string, scm scm.ScmHandler, dryRun bool) (bool, []string, string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Spec ¶
type Spec struct { // [source,condition,target] File contains the file path to take in account File string `yaml:",omitempty"` // [source,condition,target] Files contains the file path(s) to take in account. For 'source': limited to one item Files []string `yaml:",omitempty"` // [source,condition,target] Key is the YAML key to retrieve Key string `yaml:",omitempty"` // [source,condition,target] Value is the YAML value to set. Default value set to source output for condition and target Value string `yaml:",omitempty"` // [condition] allow checking for only the existence of a key (not its value) KeyOnly bool `yaml:",omitempty"` // [target] Indent defines the yaml indentation for file updated by target of kind yaml. Default to 2 Indent int `yaml:",omitempty"` }
Spec defines a specification for a "yaml" resource parsed from an updatecli manifest file
type Yaml ¶
type Yaml struct {
// contains filtered or unexported fields
}
Yaml defines a resource of kind "yaml"
func New ¶
New returns a reference to a newly initialized Yaml object from a Spec or an error if the provided YamlSpec triggers a validation error.
func (*Yaml) Changelog ¶
Changelog returns the changelog for this resource, or an empty string if not supported
func (*Yaml) ConditionFromSCM ¶
ConditionFromSCM checks if a key exists in a yaml file
func (*Yaml) Read ¶
Read puts the content of the file(s) as value of the y.files map if the file(s) exist(s) or log the non existence of the file
Click to show internal directories.
Click to hide internal directories.