kubernetes/vendor/sigs.k8s.io/kustomize/kyaml/yaml/fns.go

// Append creates an ElementAppender
func Append(elements ...*yaml.Node) ElementAppender {}

type ElementAppender

func (a ElementAppender) Filter(rn *RNode) (*RNode, error) {}

type ElementSetter

// isMappingNode returns whether node is a mapping node
func (e ElementSetter) isMappingNode(node *RNode) bool {}

// isMappingSetter returns is this setter intended to set a mapping node
func (e ElementSetter) isMappingSetter() bool {}

func (e ElementSetter) Filter(rn *RNode) (*RNode, error) {}

// GetElementByIndex will return a Filter which can be applied to a sequence
// node to get the element specified by the index
func GetElementByIndex(index int) ElementIndexer {}

type ElementIndexer

// Filter implements Filter
func (i ElementIndexer) Filter(rn *RNode) (*RNode, error) {}

// Clear returns a FieldClearer
func Clear(name string) FieldClearer {}

type FieldClearer

func (c FieldClearer) Filter(rn *RNode) (*RNode, error) {}

func MatchElement(field, value string) ElementMatcher {}

func MatchElementList(keys []string, values []string) ElementMatcher {}

func GetElementByKey(key string) ElementMatcher {}

type ElementMatcher

func (e ElementMatcher) Filter(rn *RNode) (*RNode, error) {}

func Get(name string) FieldMatcher {}

func MatchField(name, value string) FieldMatcher {}

func Match(value string) FieldMatcher {}

type FieldMatcher

func (f FieldMatcher) Filter(rn *RNode) (*RNode, error) {}

// Lookup returns a PathGetter to lookup a field by its path.
func Lookup(path ...string) PathGetter {}

// LookupCreate returns a PathGetter to lookup a field by its path and create it if it doesn't already
// exist.
func LookupCreate(kind yaml.Kind, path ...string) PathGetter {}

var ConventionalContainerPaths

// LookupFirstMatch returns a Filter for locating a value that may exist at one of several possible paths.
// For example, it can be used with ConventionalContainerPaths to find the containers field in a standard workload resource.
// If more than one of the paths exists in the resource, the first will be returned. If none exist,
// nil will be returned. If an error is encountered during lookup, it will be returned.
func LookupFirstMatch(paths [][]string) Filter {}

type PathGetter

func (l PathGetter) Filter(rn *RNode) (*RNode, error) {}

func (l PathGetter) getFilter(part, nextPart string, fieldPath *[]string) (Filter, error) {}

func (l PathGetter) elemFilter(part string) (Filter, error) {}

func (l PathGetter) fieldFilter(
	name string, kind yaml.Kind) (Filter, error) {}

func getPathPartKind(nextPart string, defaultKind yaml.Kind) yaml.Kind {}

func SetField(name string, value *RNode) FieldSetter {}

func Set(value *RNode) FieldSetter {}

type MapEntrySetter

func (s MapEntrySetter) Filter(rn *RNode) (*RNode, error) {}

type FieldSetter

func (s FieldSetter) Filter(rn *RNode) (*RNode, error) {}

// Tee calls the provided Filters, and returns its argument rather than the result
// of the filters.
// May be used to fork sub-filters from a call.
// e.g. locate field, set value; locate another field, set another value
func Tee(filters ...Filter) Filter {}

type TeePiper

func (t TeePiper) Filter(rn *RNode) (*RNode, error) {}

// IsCreate returns true if kind is specified
func IsCreate(kind yaml.Kind) bool {}

// IsMissingOrError returns true if rn is NOT found or err is non-nil
func IsMissingOrError(rn *RNode, err error) bool {}

// IsFoundOrError returns true if rn is found or err is non-nil
func IsFoundOrError(rn *RNode, err error) bool {}

func ErrorIfAnyInvalidAndNonNull(kind yaml.Kind, rn ...*RNode) error {}

type InvalidNodeKindError

func (e *InvalidNodeKindError) Error() string {}

func (e *InvalidNodeKindError) ActualNodeKind() Kind {}

func ErrorIfInvalid(rn *RNode, kind yaml.Kind) error {}

// IsListIndex returns true if p is an index into a Val.
// e.g. [fieldName=fieldValue]
// e.g. [=primitiveValue]
func IsListIndex(p string) bool {}

// IsIdxNumber returns true if p is an index number.
// e.g. 1
func IsIdxNumber(p string) bool {}

// IsWildcard returns true if p is matching every elements.
// e.g. "*"
func IsWildcard(p string) bool {}

// SplitIndexNameValue splits a lookup part Val index into the field name
// and field value to match.
// e.g. splits [name=nginx] into (name, nginx)
// e.g. splits [=-jar] into ("", -jar)
func SplitIndexNameValue(p string) (string, string, error) {}