metadata

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAnnotation

func AddAnnotation(obj metav1.Object, key, value string)

func AddLabel

func AddLabel(obj metav1.Object, key, value string)

func CopyAnnotation

func CopyAnnotation(fromObj, toObj metav1.Object, key string) bool

CopyAnnotation copies an annotation with key `key` from `fromObj` into `toObj` Returns `true` if the annotation was found and copied, `false` otherwise

func CopyAnnotationsPredicate

func CopyAnnotationsPredicate(fromObj, toObj metav1.Object, predicate AnnotationPredicate) bool

CopyAnnotationsPredicate copies any annotation from fromObj into toObj annotations that fullfils the given predicate. Returns true if at least one annotation was copied

func GetAnnotation

func GetAnnotation(obj metav1.Object, key string) string

func HasAnnotation

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

func HasAnnotationsContaining

func HasAnnotationsContaining(obj metav1.Object, key string) (bool, map[string]string)

func HasLabel

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

func HasLabelsContaining

func HasLabelsContaining(obj metav1.Object, key string) (bool, map[string]string)

func RemoveAnnotation

func RemoveAnnotation(obj metav1.Object, key string)

func RemoveLabel

func RemoveLabel(obj metav1.Object, key string)

Types

type AnnotationPredicate

type AnnotationPredicate func(key, value string) bool

func KeyPredicate

func KeyPredicate(predicate func(key string) bool) AnnotationPredicate

Jump to

Keyboard shortcuts

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