1
// Copyright Istio Authors
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
7
// http://www.apache.org/licenses/LICENSE-2.0
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
18
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
19
"k8s.io/apimachinery/pkg/runtime"
22
// IstioKind is the generic Kubernetes API object wrapper
23
type IstioKind struct {
25
metav1.ObjectMeta `json:"metadata"`
26
Spec map[string]any `json:"spec"`
27
Status map[string]any `json:"status,omitempty"`
30
// GetSpec from a wrapper
31
func (in *IstioKind) GetSpec() map[string]any {
35
// GetStatus from a wrapper
36
func (in *IstioKind) GetStatus() map[string]any {
40
// GetObjectMeta from a wrapper
41
func (in *IstioKind) GetObjectMeta() metav1.ObjectMeta {
45
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
46
func (in *IstioKind) DeepCopyInto(out *IstioKind) {
48
out.TypeMeta = in.TypeMeta
49
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
51
out.Status = in.Status
54
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IstioKind.
55
func (in *IstioKind) DeepCopy() *IstioKind {
64
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
65
func (in *IstioKind) DeepCopyObject() runtime.Object {
66
if c := in.DeepCopy(); c != nil {
73
// IstioObject is a k8s wrapper interface for config objects
74
type IstioObject interface {
76
GetSpec() map[string]any
77
GetStatus() map[string]any
78
GetObjectMeta() metav1.ObjectMeta