Documentation ¶
Index ¶
- func CreatePathAnnotationValue(dir string, m yaml.ResourceMeta) string
- func DefaultPathAndIndexAnnotation(dir string, nodes []*yaml.RNode) error
- func DefaultPathAnnotation(dir string, nodes []*yaml.RNode) error
- func ErrorIfMissingAnnotation(nodes []*yaml.RNode, keys ...AnnotationKey) error
- func GetFileAnnotations(rn *yaml.RNode) (string, string, error)
- func Map(nodes []*yaml.RNode, fn func(*yaml.RNode) (*yaml.RNode, error)) ([]*yaml.RNode, error)
- func MapMeta(nodes []*yaml.RNode, ...) ([]*yaml.RNode, error)
- func SortNodes(nodes []*yaml.RNode) error
- type AnnotationKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreatePathAnnotationValue ¶ added in v0.0.6
func CreatePathAnnotationValue(dir string, m yaml.ResourceMeta) string
CreatePathAnnotationValue creates a default path annotation value for a Resource. The path prefix will be dir.
func DefaultPathAndIndexAnnotation ¶ added in v0.0.6
DefaultPathAndIndexAnnotation sets a default path or index value on any nodes missing the annotation
func DefaultPathAnnotation ¶ added in v0.0.6
DefaultPathAnnotation sets a default path annotation on any Reources missing it.
func ErrorIfMissingAnnotation ¶
func ErrorIfMissingAnnotation(nodes []*yaml.RNode, keys ...AnnotationKey) error
ErrorIfMissingAnnotation validates the provided annotations are present on the given resources
Types ¶
type AnnotationKey ¶
type AnnotationKey = string
const ( // IndexAnnotation records the index of a specific resource in a file or input stream. IndexAnnotation AnnotationKey = "config.kubernetes.io/index" // PathAnnotation records the path to the file the Resource was read from PathAnnotation AnnotationKey = "config.kubernetes.io/path" )
Click to show internal directories.
Click to hide internal directories.