resource

package
v0.0.0-...-4aabf52 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAnnotationCSVs

func GetAnnotationCSVs(obj AnnotationGetter, key string) []string

GetAnnotationCSVs will return the value of the annotation identified by the given key. If the annotation has comma separated values, the returned list will contain all deduped values.

func GetAnnotationOptionValue

func GetAnnotationOptionValue(obj AnnotationGetter, annotation, optionKey string) *string

GetAnnotationOptionValue will return the value of an option inside the annotation defined as the given key. This function only support options that are defined as key=value and not standalone.

func HasAnnotationOption

func HasAnnotationOption(obj AnnotationGetter, key, val string) bool

HasAnnotationOption will return if the given obj has an annotation defined as the given key and has in its values, the occurrence of val.

Types

type AnnotationGetter

type AnnotationGetter interface {
	GetAnnotations() map[string]string
}

AnnotationGetter defines the operations required to inspect if a resource has annotations

Jump to

Keyboard shortcuts

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