forked from openshift/origin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.go
39 lines (31 loc) · 1.19 KB
/
types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package testing
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
)
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type TestConfig struct {
metav1.TypeMeta `json:",inline"`
Item1 string `json:"item1"`
Item2 []string `json:"item2"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type TestConfigV1 struct {
metav1.TypeMeta `json:",inline"`
Item1 string `json:"item1"`
Item2 []string `json:"item2"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type OtherTestConfig2 struct {
metav1.TypeMeta
Thing string `json:"thing"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type OtherTestConfig2V2 struct {
metav1.TypeMeta
Thing string `json:"thing"`
}
func (obj *TestConfig) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta }
func (obj *TestConfigV1) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta }
func (obj *OtherTestConfig2) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta }
func (obj *OtherTestConfig2V2) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta }