From debf967bf98420e75fb2806fa735020cbf02c478 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20D=C3=B6ll?= Date: Thu, 7 Mar 2024 21:16:54 +0000 Subject: [PATCH] wip: embed objects --- api/api.yml | 3 +- pkg/apis/flow/v1alpha1/bridge_types.go | 46 +++-------------- .../flow/v1alpha1/zz_generated.deepcopy.go | 17 +++++++ pkg/apis/models.gen.go | 50 +++++++++---------- 4 files changed, 51 insertions(+), 65 deletions(-) diff --git a/api/api.yml b/api/api.yml index 1fc5b911..b87b8f73 100644 --- a/api/api.yml +++ b/api/api.yml @@ -12,7 +12,8 @@ info: url: 'https://www.apache.org/licenses/LICENSE-2.0.html' servers: - - url: /v1 + - url: http://localhost:8080/api/v1 + description: Development server tags: - name: System diff --git a/pkg/apis/flow/v1alpha1/bridge_types.go b/pkg/apis/flow/v1alpha1/bridge_types.go index bc78823f..e4df81d3 100644 --- a/pkg/apis/flow/v1alpha1/bridge_types.go +++ b/pkg/apis/flow/v1alpha1/bridge_types.go @@ -2,6 +2,7 @@ package v1alpha1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" "github.com/zeiss/typhoon/pkg/apis/common/v1alpha1" ) @@ -30,46 +31,13 @@ type BridgeSpec struct { } // Component holds a component of a bridge. -// +k8s:deepcopy-gen=false type Component struct { - Object isBridgeObject_BridgeObject `json:"object"` -} - -// GetObject return the object of the component. -func (c *Component) GetObject() isBridgeObject_BridgeObject { - if c != nil { - return c.Object - } - - return nil -} - -// GetTransformation returns the transformation of the component. -func (c *Component) GetTransformation() *BridgeObject_Transformation { - if x, ok := c.GetObject().(*BridgeObject_Transformation); ok { - return x - } - - return nil -} - -// DeepCopy is a helper function for deepcopy-gen. -func (in *Component) DeepCopy() *Component { - if in == nil { - return nil - } - out := new(Component) - in.DeepCopyInto(out) - - return out -} - -// DeepCopyInto is a helper function for deepcopy-gen. -func (in *Component) DeepCopyInto(out *Component) { - *out = *in - if in.GetTransformation() != nil { - in.GetTransformation().DeepCopyInto(out.GetTransformation()) - } + // Object is the component object. + // +optional + // +nullable + // +kubebuilder:pruning:PreserveUnknownFields + // x-kubernetes-embedded-resource: false + Object runtime.RawExtension `json:"object,omitempty"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object diff --git a/pkg/apis/flow/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/flow/v1alpha1/zz_generated.deepcopy.go index e8ec8885..63132c2b 100644 --- a/pkg/apis/flow/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/flow/v1alpha1/zz_generated.deepcopy.go @@ -113,6 +113,23 @@ func (in *BridgeSpec) DeepCopy() *BridgeSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Component) DeepCopyInto(out *Component) { + *out = *in + in.Object.DeepCopyInto(&out.Object) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Component. +func (in *Component) DeepCopy() *Component { + if in == nil { + return nil + } + out := new(Component) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Correlation) DeepCopyInto(out *Correlation) { *out = *in diff --git a/pkg/apis/models.gen.go b/pkg/apis/models.gen.go index 7db4513c..eef9a412 100644 --- a/pkg/apis/models.gen.go +++ b/pkg/apis/models.gen.go @@ -100,31 +100,31 @@ type CreateTeamJSONRequestBody = Team // Base64 encoded, gzipped, json marshaled Swagger object var swaggerSpec = []string{ - "H4sIAAAAAAAC/+xYbW/bNhD+KwS7DxsgW3KKAYP2KW2zwl3RBnXQAXONgpbOMhuJVMlTEiHwfx9Iitar", - "kwJr1w3YF8MidW/P3cM76p4msiilAIGaxve0ZIoVgKDsU84LjpdmyTyloBPFS+RS0Jhe7YGIqtiC0kTu", - "CEcoNEFJFGClxJwGlJvXPlegahpQwQqgsdNIA6qTPRTMad2xKkcan0UBLdgdL6qCxj+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aTCfz74NeN9gjsCK8N7992I8Y0tgs2eliiOwrt35lhcfgTmCF/tXTSA2b7lci", + "900vSEMOrKokAa13VT7A+xWgqUUTFtnWZPmSHkHVU2AeOd3gOUBsyrf2lbB7uT0Ej77euagb1Ep7Dp/u", + "IX8JVZbn73YnY/D4Dm+aJoh+K+rcGr9qPHYZG07D4xa1eTCr+ZFevRHCxtOdANZ2BIxdejcG1Anqud2W", + "b9bFzSGgpdTortPi2gbW8Od5vUzHVdKSrv/5paFQbGBxPs+3Mq2fhDx1pdtX0/mM8DUl4D9C1KeA732n", + "CDvaD6MKWnx3Xjrz6YCUbtXwUsCtTcc4G4alnbFzkqcfjtPmdztwvAn/UeYYg+9zphEllVJmTGr89f3p", + "/HLZO9ZB3YCirtAfS7T2w/HaTambQdF3R9b1xtC0RwO7cpyq144J1v5UW30JN5DLsjAxuLd6o1ochrlM", + "WL6XGuNn0bMoZCUPbxb20Gqim+jUGghT0O3Uvudta9KMcfO28xzv0Q+rsuQluGdolyrNRTahran4R3Qp", + "nmWgeuogtV8cQaRu9rUfICf0N6Lm4PozAAD//3yWDneOFQAA", } // GetSwagger returns the content of the embedded swagger specification file