diff options
Diffstat (limited to 'vendor/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go')
-rw-r--r-- | vendor/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go index 0ee7d99ca..c13fe4af8 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go @@ -67,20 +67,33 @@ type Object interface { // ListMetaAccessor retrieves the list interface from an object type ListMetaAccessor interface { - GetListMeta() List + GetListMeta() ListInterface } -// List lets you work with list metadata from any of the versioned or +// Common lets you work with core metadata from any of the versioned or // internal API objects. Attempting to set or retrieve a field on an object that does // not support that field will be a no-op and return a default value. // TODO: move this, and TypeMeta and ListMeta, to a different package -type List interface { +type Common interface { GetResourceVersion() string SetResourceVersion(version string) GetSelfLink() string SetSelfLink(selfLink string) } +// ListInterface lets you work with list metadata from any of the versioned or +// internal API objects. Attempting to set or retrieve a field on an object that does +// not support that field will be a no-op and return a default value. +// TODO: move this, and TypeMeta and ListMeta, to a different package +type ListInterface interface { + GetResourceVersion() string + SetResourceVersion(version string) + GetSelfLink() string + SetSelfLink(selfLink string) + GetContinue() string + SetContinue(c string) +} + // Type exposes the type and APIVersion of versioned or internal API objects. // TODO: move this, and TypeMeta and ListMeta, to a different package type Type interface { @@ -94,6 +107,8 @@ func (meta *ListMeta) GetResourceVersion() string { return meta.ResourceV func (meta *ListMeta) SetResourceVersion(version string) { meta.ResourceVersion = version } func (meta *ListMeta) GetSelfLink() string { return meta.SelfLink } func (meta *ListMeta) SetSelfLink(selfLink string) { meta.SelfLink = selfLink } +func (meta *ListMeta) GetContinue() string { return meta.Continue } +func (meta *ListMeta) SetContinue(c string) { meta.Continue = c } func (obj *TypeMeta) GetObjectKind() schema.ObjectKind { return obj } @@ -107,7 +122,7 @@ func (obj *TypeMeta) GroupVersionKind() schema.GroupVersionKind { return schema.FromAPIVersionAndKind(obj.APIVersion, obj.Kind) } -func (obj *ListMeta) GetListMeta() List { return obj } +func (obj *ListMeta) GetListMeta() ListInterface { return obj } func (obj *ObjectMeta) GetObjectMeta() Object { return obj } |