Add Labels and Annotations to MetadataAccessor

This commit is contained in:
Vojtech Vitek (V-Teq)
2014-11-28 21:06:07 +01:00
parent 508724b1f8
commit 28f5d51a5f
3 changed files with 153 additions and 25 deletions

View File

@@ -46,6 +46,10 @@ type Interface interface {
SetResourceVersion(version string)
SelfLink() string
SetSelfLink(selfLink string)
Labels() map[string]string
SetLabels(labels map[string]string)
Annotations() map[string]string
SetAnnotations(annotations map[string]string)
}
// MetadataAccessor lets you work with object and list metadata from any of the versioned or
@@ -73,6 +77,12 @@ type MetadataAccessor interface {
SelfLink(obj runtime.Object) (string, error)
SetSelfLink(obj runtime.Object, selfLink string) error
Labels(obj runtime.Object) (map[string]string, error)
SetLabels(obj runtime.Object, labels map[string]string) error
Annotations(obj runtime.Object) (map[string]string, error)
SetAnnotations(obj runtime.Object, annotations map[string]string) error
runtime.ResourceVersioner
}