Documentation ¶
Index ¶
- func GetAPIVersion(node *yaml.RNode, path string) string
- func GetKind(node *yaml.RNode, path string) string
- func GetName(node *yaml.RNode, path string) string
- func GetNamespace(node *yaml.RNode, path string) string
- func GetStringField(node *yaml.RNode, path string, fields ...string) string
- func IsClusterKind(kind string) bool
- func JSONPath(fields ...string) string
- func ModifyFiles(dir string, modifyFn func(node *yaml.RNode, path string) (bool, error), ...) error
- func SetStringValue(node *yaml.RNode, path string, value string, fields ...string) error
- func TrimSpaceAndQuotes(answer string) string
- type APIVersionKindsFilter
- type Filter
- type KindFilter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAPIVersion ¶ added in v0.0.5
GetAPIVersion finds the API Version of the node at the given path
func GetNamespace ¶ added in v0.0.57
GetNamespace returns the namespace from the metadata
func GetStringField ¶ added in v0.0.5
/ GetStringField returns the given field from the node or returns a blank string if the field cannot be found
func IsClusterKind ¶ added in v0.0.4
IsClusterKind returns true if the kind is a cluster kind
func ModifyFiles ¶
func ModifyFiles(dir string, modifyFn func(node *yaml.RNode, path string) (bool, error), filter Filter) error
ModifyFiles recursively walks the given directory and modifies any suitable file
func SetStringValue ¶ added in v0.0.10
SetStringValue sets the string value at the given path
func TrimSpaceAndQuotes ¶ added in v0.0.26
TrimSpaceAndQuotes trims any whitespace and quotes around a value
Types ¶
type APIVersionKindsFilter ¶ added in v0.0.5
type APIVersionKindsFilter struct { Kinds []KindFilter KindsIgnore []KindFilter }
APIVersionKindsFilter a filter of kinds and/or API versions
type Filter ¶ added in v0.0.4
Filter for filtering
func (*Filter) Parse ¶ added in v0.0.5
func (f *Filter) Parse() APIVersionKindsFilter
Parse parses the filter strings
type KindFilter ¶ added in v0.0.5
KindFilter a filter on a kind and an optional APIVersion
func ParseKindFilter ¶ added in v0.0.5
func ParseKindFilter(text string) KindFilter
ParseKindFilter parses a kind filter