summaryrefslogtreecommitdiff
path: root/vendor/k8s.io/apimachinery/pkg/runtime/interfaces.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/k8s.io/apimachinery/pkg/runtime/interfaces.go')
-rw-r--r--vendor/k8s.io/apimachinery/pkg/runtime/interfaces.go22
1 files changed, 10 insertions, 12 deletions
diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/interfaces.go b/vendor/k8s.io/apimachinery/pkg/runtime/interfaces.go
index fcb18ba11..9d00f1650 100644
--- a/vendor/k8s.io/apimachinery/pkg/runtime/interfaces.go
+++ b/vendor/k8s.io/apimachinery/pkg/runtime/interfaces.go
@@ -203,13 +203,6 @@ type ObjectCreater interface {
New(kind schema.GroupVersionKind) (out Object, err error)
}
-// ObjectCopier duplicates an object.
-type ObjectCopier interface {
- // Copy returns an exact copy of the provided Object, or an error if the
- // copy could not be completed.
- Copy(Object) (Object, error)
-}
-
// ResourceVersioner provides methods for setting and retrieving
// the resource version from an API object.
type ResourceVersioner interface {
@@ -234,18 +227,23 @@ type SelfLinker interface {
// to return a no-op ObjectKindAccessor in cases where it is not expected to be serialized.
type Object interface {
GetObjectKind() schema.ObjectKind
+ DeepCopyObject() Object
}
// Unstructured objects store values as map[string]interface{}, with only values that can be serialized
// to JSON allowed.
type Unstructured interface {
- // IsUnstructuredObject is a marker interface to allow objects that can be serialized but not introspected
- // to bypass conversion.
- IsUnstructuredObject()
- // IsList returns true if this type is a list or matches the list convention - has an array called "items".
- IsList() bool
+ Object
// UnstructuredContent returns a non-nil, mutable map of the contents of this object. Values may be
// []interface{}, map[string]interface{}, or any primitive type. Contents are typically serialized to
// and from JSON.
UnstructuredContent() map[string]interface{}
+ // SetUnstructuredContent updates the object content to match the provided map.
+ SetUnstructuredContent(map[string]interface{})
+ // IsList returns true if this type is a list or matches the list convention - has an array called "items".
+ IsList() bool
+ // EachListItem should pass a single item out of the list as an Object to the provided function. Any
+ // error should terminate the iteration. If IsList() returns false, this method should return an error
+ // instead of calling the provided function.
+ EachListItem(func(Object) error) error
}