yaml

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EncryptedTag = "!encrypted"
	DecryptedTag = "!secret"
)

Variables

This section is empty.

Functions

func DecryptNode added in v0.3.0

func DecryptNode(node *yaml.Node, decryptionMapping *map[string]string, tag bool) error

Turn a yaml Node tagged !encrypted into a yaml Node tagged !secret, by looking up its values in a give mapping of ciphertexts to plaintexts.

func EncryptNode added in v0.3.0

func EncryptNode(node *yaml.Node, encryptionMapping *map[string]string) error

Turn a yaml Node tagged !secret into a yaml Node tagged !encrypted, looking up its values in a given mapping of plaintexts to ciphertexts.

func GetTaggedChildren added in v0.3.0

func GetTaggedChildren(node *yaml.Node, tag string) <-chan *yaml.Node

A Channel-based iterator that yields all descendents of a yaml Node that match a given tag.

func GetTaggedChildrenValues added in v0.3.0

func GetTaggedChildrenValues(node *yaml.Node, tag string) (out []string, err error)

Get a list of decoded string values from all descendents of a yaml Node that match a given tag.

func GetValue added in v0.3.0

func GetValue(node *yaml.Node) (value string, err error)

Get the decoded value of an !encrypted or !secret Node, as a String. !encrypted Nodes are base64-decoded.

func ReadFile added in v0.3.0

func ReadFile(path string) (node yaml.Node, err error)

Read a yaml file, and return its root yaml Node.

func SaveFile

func SaveFile(path string, node yaml.Node) error

Save a yaml Node to a file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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