Documentation
¶
Index ¶
- type Annotation
- func (a Annotation) Add(key, value string) Annotation
- func (a Annotation) CheckKeysNonEmpty(keys ...string) error
- func (a Annotation) Copy() Annotation
- func (a Annotation) Has(key, expectedValue string) bool
- func (a Annotation) HasAll(expected map[string]string) bool
- func (a Annotation) HasAny(expected map[string]string) bool
- func (a Annotation) Merge(as Annotation) Annotation
- func (a Annotation) Remove(key string) Annotation
- func (a Annotation) ToMap() map[string]string
- type ID
- type Kind
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Annotation ¶
Annotation extends k8s annotation map.
func (Annotation) Add ¶
func (a Annotation) Add(key, value string) Annotation
Add inserts a new key value pair.
func (Annotation) CheckKeysNonEmpty ¶
func (a Annotation) CheckKeysNonEmpty(keys ...string) error
CheckKeysNonEmpty checks if the provided keys are all set to non empty value.
func (Annotation) Copy ¶
func (a Annotation) Copy() Annotation
Copy returns a copy of current annotation.
func (Annotation) Has ¶
func (a Annotation) Has(key, expectedValue string) bool
Has checks if the provided key value pair exists in this annotation or not.
func (Annotation) HasAll ¶
func (a Annotation) HasAll(expected map[string]string) bool
HasAll checks if all the provided key value pairs exist in this annotation or not.
func (Annotation) HasAny ¶
func (a Annotation) HasAny(expected map[string]string) bool
HasAny checks if any provided key value pairs exists in this annotation or not.
func (Annotation) Merge ¶
func (a Annotation) Merge(as Annotation) Annotation
Merge merges an annotation with current one.
func (Annotation) Remove ¶
func (a Annotation) Remove(key string) Annotation
Remove deletes the key and its value from the annotation.
func (Annotation) ToMap ¶
func (a Annotation) ToMap() map[string]string
ToMap returns the map format of the annotation.
type ID ¶
ID reifies annotatable GlobalEntities into an internal representation using annotations.Kind.
func ConvertTagToID ¶
ConvertTagToID converts the names.Tag into an ID for different names.Kinds of entities, registering them as annotations.Kinds of entities.