mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-21 11:05:16 +02:00
fix comparison of event stream array (#1817)
* fix comparison of event stream array * turn optional stream fields to pointers
This commit is contained in:
@@ -239,12 +239,12 @@ type Stream struct {
|
||||
ApplicationId string `json:"applicationId"`
|
||||
Database string `json:"database"`
|
||||
Tables map[string]StreamTable `json:"tables"`
|
||||
Filter map[string]string `json:"filter,omitempty"`
|
||||
BatchSize uint32 `json:"batchSize,omitempty"`
|
||||
Filter map[string]*string `json:"filter,omitempty"`
|
||||
BatchSize *uint32 `json:"batchSize,omitempty"`
|
||||
}
|
||||
|
||||
type StreamTable struct {
|
||||
EventType string `json:"eventType"`
|
||||
IdColumn string `json:"idColumn,omitempty" defaults:"id"`
|
||||
PayloadColumn string `json:"payloadColumn,omitempty" defaults:"payload"`
|
||||
EventType string `json:"eventType"`
|
||||
IdColumn *string `json:"idColumn,omitempty"`
|
||||
PayloadColumn *string `json:"payloadColumn,omitempty"`
|
||||
}
|
||||
|
||||
@@ -1181,16 +1181,29 @@ func (in *Stream) DeepCopyInto(out *Stream) {
|
||||
in, out := &in.Tables, &out.Tables
|
||||
*out = make(map[string]StreamTable, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val
|
||||
(*out)[key] = *val.DeepCopy()
|
||||
}
|
||||
}
|
||||
if in.Filter != nil {
|
||||
in, out := &in.Filter, &out.Filter
|
||||
*out = make(map[string]string, len(*in))
|
||||
*out = make(map[string]*string, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val
|
||||
var outVal *string
|
||||
if val == nil {
|
||||
(*out)[key] = nil
|
||||
} else {
|
||||
in, out := &val, &outVal
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
(*out)[key] = outVal
|
||||
}
|
||||
}
|
||||
if in.BatchSize != nil {
|
||||
in, out := &in.BatchSize, &out.BatchSize
|
||||
*out = new(uint32)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@@ -1207,6 +1220,16 @@ func (in *Stream) DeepCopy() *Stream {
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *StreamTable) DeepCopyInto(out *StreamTable) {
|
||||
*out = *in
|
||||
if in.IdColumn != nil {
|
||||
in, out := &in.IdColumn, &out.IdColumn
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
if in.PayloadColumn != nil {
|
||||
in, out := &in.PayloadColumn, &out.PayloadColumn
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user