mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-04 05:44:44 +02:00
Modernize code generation
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
This commit is contained in:
@@ -9,14 +9,16 @@ import (
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// FabricEventStream defines FabricEventStream Custom Resource Definition Object.
|
||||
// +k8s:deepcopy-gen=true
|
||||
type FabricEventStream struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
metav1.ObjectMeta `json:"metadata"`
|
||||
|
||||
Spec FabricEventStreamSpec `json:"spec"`
|
||||
}
|
||||
|
||||
// FabricEventStreamSpec defines the specification for the FabricEventStream TPR.
|
||||
// +k8s:deepcopy-gen=true
|
||||
type FabricEventStreamSpec struct {
|
||||
ApplicationId string `json:"applicationId"`
|
||||
EventStreams []EventStream `json:"eventStreams"`
|
||||
@@ -25,6 +27,7 @@ type FabricEventStreamSpec struct {
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// FabricEventStreamList defines a list of FabricEventStreams .
|
||||
// +k8s:deepcopy-gen=true
|
||||
type FabricEventStreamList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata"`
|
||||
@@ -33,6 +36,7 @@ type FabricEventStreamList struct {
|
||||
}
|
||||
|
||||
// EventStream defines the source, flow and sink of the event stream
|
||||
// +k8s:deepcopy-gen=true
|
||||
type EventStream struct {
|
||||
EventStreamFlow EventStreamFlow `json:"flow"`
|
||||
EventStreamSink EventStreamSink `json:"sink"`
|
||||
@@ -41,12 +45,14 @@ type EventStream struct {
|
||||
}
|
||||
|
||||
// EventStreamFlow defines the flow characteristics of the event stream
|
||||
// +k8s:deepcopy-gen=true
|
||||
type EventStreamFlow struct {
|
||||
Type string `json:"type"`
|
||||
PayloadColumn *string `json:"payloadColumn,omitempty"`
|
||||
}
|
||||
|
||||
// EventStreamSink defines the target of the event stream
|
||||
// +k8s:deepcopy-gen=true
|
||||
type EventStreamSink struct {
|
||||
Type string `json:"type"`
|
||||
EventType string `json:"eventType,omitempty"`
|
||||
@@ -54,12 +60,14 @@ type EventStreamSink struct {
|
||||
}
|
||||
|
||||
// EventStreamRecovery defines the target of dead letter queue
|
||||
// +k8s:deepcopy-gen=true
|
||||
type EventStreamRecovery struct {
|
||||
Type string `json:"type"`
|
||||
Sink *EventStreamSink `json:"sink"`
|
||||
}
|
||||
|
||||
// EventStreamSource defines the source of the event stream and connection for FES operator
|
||||
// +k8s:deepcopy-gen=true
|
||||
type EventStreamSource struct {
|
||||
Type string `json:"type"`
|
||||
Schema string `json:"schema,omitempty" defaults:"public"`
|
||||
@@ -69,12 +77,14 @@ type EventStreamSource struct {
|
||||
}
|
||||
|
||||
// EventStreamTable defines the name and ID column to be used for streaming
|
||||
// +k8s:deepcopy-gen=true
|
||||
type EventStreamTable struct {
|
||||
Name string `json:"name"`
|
||||
IDColumn *string `json:"idColumn,omitempty"`
|
||||
}
|
||||
|
||||
// Connection to be used for allowing the FES operator to connect to a database
|
||||
// +k8s:deepcopy-gen=true
|
||||
type Connection struct {
|
||||
Url string `json:"jdbcUrl"`
|
||||
SlotName string `json:"slotName"`
|
||||
@@ -84,6 +94,7 @@ type Connection struct {
|
||||
}
|
||||
|
||||
// DBAuth specifies the credentials to be used for connecting with the database
|
||||
// +k8s:deepcopy-gen=true
|
||||
type DBAuth struct {
|
||||
Type string `json:"type"`
|
||||
Name string `json:"name,omitempty"`
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
//go:build !ignore_autogenerated
|
||||
// +build !ignore_autogenerated
|
||||
|
||||
/*
|
||||
Copyright 2021 Compose, Zalando SE
|
||||
Copyright 2025 Compose, Zalando SE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -38,11 +39,11 @@ func (in *Connection) DeepCopyInto(out *Connection) {
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
in.DBAuth.DeepCopyInto(&out.DBAuth)
|
||||
out.DBAuth = in.DBAuth
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Connection.
|
||||
func (in *Connection) DeepCopy() *Connection {
|
||||
if in == nil {
|
||||
return nil
|
||||
@@ -58,7 +59,7 @@ func (in *DBAuth) DeepCopyInto(out *DBAuth) {
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DBAuth.
|
||||
func (in *DBAuth) DeepCopy() *DBAuth {
|
||||
if in == nil {
|
||||
return nil
|
||||
@@ -72,13 +73,13 @@ func (in *DBAuth) DeepCopy() *DBAuth {
|
||||
func (in *EventStream) DeepCopyInto(out *EventStream) {
|
||||
*out = *in
|
||||
in.EventStreamFlow.DeepCopyInto(&out.EventStreamFlow)
|
||||
in.EventStreamRecovery.DeepCopyInto(&out.EventStreamRecovery)
|
||||
in.EventStreamSink.DeepCopyInto(&out.EventStreamSink)
|
||||
in.EventStreamSource.DeepCopyInto(&out.EventStreamSource)
|
||||
in.EventStreamRecovery.DeepCopyInto(&out.EventStreamRecovery)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventStream.
|
||||
func (in *EventStream) DeepCopy() *EventStream {
|
||||
if in == nil {
|
||||
return nil
|
||||
@@ -99,7 +100,7 @@ func (in *EventStreamFlow) DeepCopyInto(out *EventStreamFlow) {
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventStreamFlow.
|
||||
func (in *EventStreamFlow) DeepCopy() *EventStreamFlow {
|
||||
if in == nil {
|
||||
return nil
|
||||
@@ -120,7 +121,7 @@ func (in *EventStreamRecovery) DeepCopyInto(out *EventStreamRecovery) {
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventStreamRecovery.
|
||||
func (in *EventStreamRecovery) DeepCopy() *EventStreamRecovery {
|
||||
if in == nil {
|
||||
return nil
|
||||
@@ -141,7 +142,7 @@ func (in *EventStreamSink) DeepCopyInto(out *EventStreamSink) {
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventStreamSink.
|
||||
func (in *EventStreamSink) DeepCopy() *EventStreamSink {
|
||||
if in == nil {
|
||||
return nil
|
||||
@@ -154,17 +155,17 @@ func (in *EventStreamSink) DeepCopy() *EventStreamSink {
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *EventStreamSource) DeepCopyInto(out *EventStreamSource) {
|
||||
*out = *in
|
||||
in.Connection.DeepCopyInto(&out.Connection)
|
||||
in.EventStreamTable.DeepCopyInto(&out.EventStreamTable)
|
||||
if in.Filter != nil {
|
||||
in, out := &in.Filter, &out.Filter
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
in.EventStreamTable.DeepCopyInto(&out.EventStreamTable)
|
||||
in.Connection.DeepCopyInto(&out.Connection)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventStreamSource.
|
||||
func (in *EventStreamSource) DeepCopy() *EventStreamSource {
|
||||
if in == nil {
|
||||
return nil
|
||||
@@ -185,7 +186,7 @@ func (in *EventStreamTable) DeepCopyInto(out *EventStreamTable) {
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventStreamTable.
|
||||
func (in *EventStreamTable) DeepCopy() *EventStreamTable {
|
||||
if in == nil {
|
||||
return nil
|
||||
@@ -195,30 +196,6 @@ func (in *EventStreamTable) DeepCopy() *EventStreamTable {
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *FabricEventStreamSpec) DeepCopyInto(out *FabricEventStreamSpec) {
|
||||
*out = *in
|
||||
if in.EventStreams != nil {
|
||||
in, out := &in.EventStreams, &out.EventStreams
|
||||
*out = make([]EventStream, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FabricEventStreamSpec.
|
||||
func (in *FabricEventStreamSpec) DeepCopy() *FabricEventStreamSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(FabricEventStreamSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *FabricEventStream) DeepCopyInto(out *FabricEventStream) {
|
||||
*out = *in
|
||||
@@ -278,3 +255,26 @@ func (in *FabricEventStreamList) DeepCopyObject() runtime.Object {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *FabricEventStreamSpec) DeepCopyInto(out *FabricEventStreamSpec) {
|
||||
*out = *in
|
||||
if in.EventStreams != nil {
|
||||
in, out := &in.EventStreams, &out.EventStreams
|
||||
*out = make([]EventStream, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FabricEventStreamSpec.
|
||||
func (in *FabricEventStreamSpec) DeepCopy() *FabricEventStreamSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(FabricEventStreamSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user