|
1 | | -/* |
2 | | -Copyright 2019, Oath Inc. |
3 | | -
|
4 | | -Licensed under the Apache License, Version 2.0 (the "License"); |
5 | | -you may not use this file except in compliance with the License. |
6 | | -You may obtain a copy of the License at |
7 | | -
|
8 | | - http://www.apache.org/licenses/LICENSE-2.0 |
9 | | -
|
10 | | -Unless required by applicable law or agreed to in writing, software |
11 | | -distributed under the License is distributed on an "AS IS" BASIS, |
12 | | -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 | | -See the License for the specific language governing permissions and |
14 | | -limitations under the License. |
15 | | -*/ |
16 | | -package v1 |
17 | | - |
18 | | -import ( |
19 | | - "github.com/AthenZ/athenz/clients/go/zms" |
20 | | - "github.com/mohae/deepcopy" |
21 | | - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" |
22 | | -) |
23 | | - |
24 | | -// +genclient |
25 | | -// +genclient:noStatus |
26 | | -// +genclient:nonNamespaced |
27 | | -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object |
28 | | - |
29 | | -// AthenzDomain is a top-level type |
30 | | -type AthenzDomain struct { |
31 | | - metav1.TypeMeta `json:",inline"` |
32 | | - // +optional |
33 | | - metav1.ObjectMeta `json:"metadata,omitempty"` |
34 | | - |
35 | | - // +optional |
36 | | - Status AthenzDomainStatus `json:"status,omitempty"` |
37 | | - |
38 | | - // Athenz Domain Spec |
39 | | - Spec AthenzDomainSpec `json:"spec,omitempty"` |
40 | | -} |
41 | | - |
42 | | -// AthenzDomainSpec contains the SignedDomain object https://github.com/AthenZ/athenz/clients/go/zms |
43 | | -type AthenzDomainSpec struct { |
44 | | - zms.SignedDomain `json:",inline"` |
45 | | -} |
46 | | - |
47 | | -// DeepCopy copies the object and returns a clone |
48 | | -func (in *AthenzDomainSpec) DeepCopy() *AthenzDomainSpec { |
49 | | - if in == nil { |
50 | | - return nil |
51 | | - } |
52 | | - outRaw := deepcopy.Copy(in) |
53 | | - out, ok := outRaw.(*AthenzDomainSpec) |
54 | | - if !ok { |
55 | | - return nil |
56 | | - } |
57 | | - return out |
58 | | -} |
59 | | - |
60 | | -// AthenzDomainStatus stores status information about the current resource |
61 | | -type AthenzDomainStatus struct { |
62 | | - Message string `json:"message,omitempty"` |
63 | | -} |
64 | | - |
65 | | -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object |
66 | | - |
67 | | -// AthenzDomainList is a list of AthenzDomain items |
68 | | -type AthenzDomainList struct { |
69 | | - metav1.TypeMeta `json:",inline"` |
70 | | - // +optional |
71 | | - metav1.ListMeta `json:"metadata,omitempty"` |
72 | | - |
73 | | - Items []AthenzDomain `json:"items"` |
74 | | -} |
| 1 | +/* |
| 2 | +Copyright 2019, Oath Inc. |
| 3 | +
|
| 4 | +Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | +you may not use this file except in compliance with the License. |
| 6 | +You may obtain a copy of the License at |
| 7 | +
|
| 8 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | +
|
| 10 | +Unless required by applicable law or agreed to in writing, software |
| 11 | +distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | +See the License for the specific language governing permissions and |
| 14 | +limitations under the License. |
| 15 | +*/ |
| 16 | +package v1 |
| 17 | + |
| 18 | +import ( |
| 19 | + "github.com/mohae/deepcopy" |
| 20 | + "github.com/AthenZ/athenz/clients/go/zms" |
| 21 | + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" |
| 22 | +) |
| 23 | + |
| 24 | +// +genclient |
| 25 | +// +genclient:noStatus |
| 26 | +// +genclient:nonNamespaced |
| 27 | +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object |
| 28 | + |
| 29 | +// AthenzDomain is a top-level type |
| 30 | +type AthenzDomain struct { |
| 31 | + metav1.TypeMeta `json:",inline"` |
| 32 | + // +optional |
| 33 | + metav1.ObjectMeta `json:"metadata,omitempty"` |
| 34 | + |
| 35 | + // +optional |
| 36 | + Status AthenzDomainStatus `json:"status,omitempty"` |
| 37 | + |
| 38 | + // Athenz Domain Spec |
| 39 | + Spec AthenzDomainSpec `json:"spec,omitempty"` |
| 40 | +} |
| 41 | + |
| 42 | +// AthenzDomainSpec contains the SignedDomain object https://github.com/AthenZ/athenz/clients/go/zms |
| 43 | +type AthenzDomainSpec struct { |
| 44 | + zms.SignedDomain `json:",inline"` |
| 45 | +} |
| 46 | + |
| 47 | +// DeepCopy copies the object and returns a clone |
| 48 | +func (in *AthenzDomainSpec) DeepCopy() *AthenzDomainSpec { |
| 49 | + if in == nil { |
| 50 | + return nil |
| 51 | + } |
| 52 | + outRaw := deepcopy.Copy(in) |
| 53 | + out, ok := outRaw.(*AthenzDomainSpec) |
| 54 | + if !ok { |
| 55 | + return nil |
| 56 | + } |
| 57 | + return out |
| 58 | +} |
| 59 | + |
| 60 | +// AthenzDomainStatus stores status information about the current resource |
| 61 | +type AthenzDomainStatus struct { |
| 62 | + Message string `json:"message,omitempty"` |
| 63 | +} |
| 64 | + |
| 65 | +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object |
| 66 | + |
| 67 | +// AthenzDomainList is a list of AthenzDomain items |
| 68 | +type AthenzDomainList struct { |
| 69 | + metav1.TypeMeta `json:",inline"` |
| 70 | + // +optional |
| 71 | + metav1.ListMeta `json:"metadata,omitempty"` |
| 72 | + |
| 73 | + Items []AthenzDomain `json:"items"` |
| 74 | +} |
0 commit comments