metadata

package
v0.0.0-...-ef6dcbe Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 3 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAnnotations

func AddAnnotations(obj v1.Object, entries map[string]string) error

AddAnnotations copies the map into the resource's Annotations map. When the destination map is nil, then the map will be created. The unexported function addEntries is called with args passed.

func AddLabels

func AddLabels(obj v1.Object, entries map[string]string) error

AddLabels copies the map into the resource's Labels map. When the destination map is nil, then the map will be created. The unexported function addEntries is called with args passed.

func CopyAnnotationsByPrefix

func CopyAnnotationsByPrefix(source, destination v1.Object, prefix string) error

CopyAnnotationsByPrefix copies all annotations from a source object to a destination object where the key matches the specified sourcePrefix.

func CopyAnnotationsWithPrefixReplacement

func CopyAnnotationsWithPrefixReplacement(source, destination v1.Object, sourcePrefix, destinationPrefix string) error

CopyAnnotationsWithPrefixReplacement copies all annotations from a source object to a destination object where the key matches the specified sourcePrefix. The source prefix will be replaced with the destination prefix.

func CopyLabelsByPrefix

func CopyLabelsByPrefix(source, destination v1.Object, prefix string) error

CopyLabelsByPrefix copies all labels from a source object to a destination object where the key matches the specified sourcePrefix.

func CopyLabelsWithPrefixReplacement

func CopyLabelsWithPrefixReplacement(source, destination v1.Object, sourcePrefix, destinationPrefix string) error

CopyLabelsWithPrefixReplacement copies all labels from a source object to a destination object where the key matches the specified sourcePrefix. If destinationPrefix is different from sourcePrefix, the sourcePrefix will be replaced while performing the copy.

func DeleteAnnotation

func DeleteAnnotation(obj v1.Object, key string) error

DeleteAnnotation deletes the annotation specified by name from the referenced object. If the annotation doesn't exist it's a no-op.

func DeleteLabel

func DeleteLabel(obj v1.Object, key string) error

DeleteLabel deletes the label specified by name from the referenced object. If the label doesn't exist it's a no-op.

func GetAnnotationsWithPrefix

func GetAnnotationsWithPrefix(obj v1.Object, prefix string) (map[string]string, error)

GetAnnotationsWithPrefix is a method that returns a map of key/value pairs matching a prefix string. The unexported function filterByPrefix is called with args passed.

func GetLabelsWithPrefix

func GetLabelsWithPrefix(obj v1.Object, prefix string) (map[string]string, error)

GetLabelsWithPrefix is a method that returns a map of key/value pairs matching a prefix string. The unexported function filterByPrefix is called with args passed.

func HasAnnotation

func HasAnnotation(obj v1.Object, key string) bool

HasAnnotation checks whether a given annotation exists or not.

func HasAnnotationWithValue

func HasAnnotationWithValue(obj v1.Object, key, value string) bool

HasAnnotationWithValue checks if an annotation exists and has the given value.

func HasLabel

func HasLabel(obj v1.Object, key string) bool

HasLabel checks whether a given Label exists or not.

func HasLabelWithValue

func HasLabelWithValue(obj v1.Object, key, value string) bool

HasLabelWithValue checks if a label exists and has the given value.

func SetAnnotation

func SetAnnotation(obj v1.Object, key string, value string) error

SetAnnotation adds a new annotation to the referenced object or updates its value if it already exists.

func SetLabel

func SetLabel(obj v1.Object, key string, value string) error

SetLabel adds a new label to the referenced object or updates its value if it already exists.

Types

This section is empty.

Jump to

Keyboard shortcuts

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