deepcopy: add interface deepcopy funcs

- add DeepCopyObject() to runtime.Object interface
- add DeepCopyObject() via deepcopy-gen
- add DeepCopyObject() manually
- add DeepCopySelector() to selector interfaces
- add custom DeepCopy func for TableRow.Cells
This commit is contained in:
Dr. Stefan Schimanski
2017-07-06 10:59:05 +02:00
parent 774560085e
commit 39d95b9b06
135 changed files with 1063 additions and 12 deletions

View File

@@ -23,6 +23,9 @@ import (
// MetadataOnlyObject allows decoding only the apiVersion, kind, and metadata fields of
// JSON data.
// TODO: enable meta-only decoding for protobuf.
//
// +k8s:deepcopy-gen=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type MetadataOnlyObject struct {
metav1.TypeMeta `json:",inline"`
// +optional
@@ -32,6 +35,9 @@ type MetadataOnlyObject struct {
// MetadataOnlyObjectList allows decoding from JSON data only the typemeta and metadata of
// a list, and those of the enclosing objects.
// TODO: enable meta-only decoding for protobuf.
//
// +k8s:deepcopy-gen=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type MetadataOnlyObjectList struct {
metav1.TypeMeta `json:",inline"`
// +optional