yaml

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Yaml

type Yaml struct {
	Spec YamlSpec

	CurrentContent string
	// contains filtered or unexported fields
}

Yaml defines a resource of type "yaml"

func New added in v0.14.1

func New(spec YamlSpec) (*Yaml, error)

New returns a reference to a newly initialized Yaml object from a YamlSpec or an error if the provided YamlSpec triggers a validation error.

func (*Yaml) Condition

func (y *Yaml) Condition(source string) (bool, error)

Condition checks if a key exists in a yaml file

func (*Yaml) ConditionFromSCM

func (y *Yaml) ConditionFromSCM(source string, scm scm.Scm) (bool, error)

ConditionFromSCM checks if a key exists in a yaml file

func (*Yaml) Read added in v0.14.1

func (y *Yaml) Read() error

Read defines CurrentContent to the content of the file which path is specified in Spec.File

func (*Yaml) Source

func (y *Yaml) Source(workingDir string) (string, error)

Source return the latest version

func (*Yaml) Target

func (y *Yaml) Target(source string, dryRun bool) (bool, error)

Target updates a scm repository based on the modified yaml file.

func (*Yaml) TargetFromSCM

func (y *Yaml) TargetFromSCM(source string, scm scm.Scm, dryRun bool) (bool, []string, string, error)

TargetFromSCM updates a scm repository based on the modified yaml file.

type YamlSpec added in v0.14.1

type YamlSpec struct {
	File string
	Key  string
	// Deprecated: use File instead
	Path  string
	Value string
}

Yaml defines a specification for a "yaml" resource parsed from an updatecli manifest file

Jump to

Keyboard shortcuts

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