update code generation

This commit is contained in:
Sergey Dudoladov 2019-02-26 13:30:38 +01:00
parent 52ca629c3c
commit c55915a2f7
7 changed files with 82 additions and 89 deletions

View File

@ -27,7 +27,7 @@ SOFTWARE.
package v1 package v1
import ( import (
core_v1 "k8s.io/api/core/v1" corev1 "k8s.io/api/core/v1"
runtime "k8s.io/apimachinery/pkg/runtime" runtime "k8s.io/apimachinery/pkg/runtime"
) )
@ -336,7 +336,17 @@ func (in *Patroni) DeepCopyInto(out *Patroni) {
in, out := &in.Slots, &out.Slots in, out := &in.Slots, &out.Slots
*out = make(map[string]map[string]string, len(*in)) *out = make(map[string]map[string]string, len(*in))
for key, val := range *in { for key, val := range *in {
(*out)[key] = *val.DeepCopy() var outVal map[string]string
if val == nil {
(*out)[key] = nil
} else {
in, out := &val, &outVal
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
(*out)[key] = outVal
} }
} }
return return
@ -377,39 +387,23 @@ func (in *PostgresSpec) DeepCopyInto(out *PostgresSpec) {
out.Resources = in.Resources out.Resources = in.Resources
if in.EnableMasterLoadBalancer != nil { if in.EnableMasterLoadBalancer != nil {
in, out := &in.EnableMasterLoadBalancer, &out.EnableMasterLoadBalancer in, out := &in.EnableMasterLoadBalancer, &out.EnableMasterLoadBalancer
if *in == nil { *out = new(bool)
*out = nil **out = **in
} else {
*out = new(bool)
**out = **in
}
} }
if in.EnableReplicaLoadBalancer != nil { if in.EnableReplicaLoadBalancer != nil {
in, out := &in.EnableReplicaLoadBalancer, &out.EnableReplicaLoadBalancer in, out := &in.EnableReplicaLoadBalancer, &out.EnableReplicaLoadBalancer
if *in == nil { *out = new(bool)
*out = nil **out = **in
} else {
*out = new(bool)
**out = **in
}
} }
if in.UseLoadBalancer != nil { if in.UseLoadBalancer != nil {
in, out := &in.UseLoadBalancer, &out.UseLoadBalancer in, out := &in.UseLoadBalancer, &out.UseLoadBalancer
if *in == nil { *out = new(bool)
*out = nil **out = **in
} else {
*out = new(bool)
**out = **in
}
} }
if in.ReplicaLoadBalancer != nil { if in.ReplicaLoadBalancer != nil {
in, out := &in.ReplicaLoadBalancer, &out.ReplicaLoadBalancer in, out := &in.ReplicaLoadBalancer, &out.ReplicaLoadBalancer
if *in == nil { *out = new(bool)
*out = nil **out = **in
} else {
*out = new(bool)
**out = **in
}
} }
if in.AllowedSourceRanges != nil { if in.AllowedSourceRanges != nil {
in, out := &in.AllowedSourceRanges, &out.AllowedSourceRanges in, out := &in.AllowedSourceRanges, &out.AllowedSourceRanges
@ -420,12 +414,15 @@ func (in *PostgresSpec) DeepCopyInto(out *PostgresSpec) {
in, out := &in.Users, &out.Users in, out := &in.Users, &out.Users
*out = make(map[string]UserFlags, len(*in)) *out = make(map[string]UserFlags, len(*in))
for key, val := range *in { for key, val := range *in {
var outVal []string
if val == nil { if val == nil {
(*out)[key] = nil (*out)[key] = nil
} else { } else {
(*out)[key] = make([]string, len(val)) in, out := &val, &outVal
copy((*out)[key], val) *out = make(UserFlags, len(*in))
copy(*out, *in)
} }
(*out)[key] = outVal
} }
} }
if in.MaintenanceWindows != nil { if in.MaintenanceWindows != nil {
@ -445,7 +442,7 @@ func (in *PostgresSpec) DeepCopyInto(out *PostgresSpec) {
} }
if in.Tolerations != nil { if in.Tolerations != nil {
in, out := &in.Tolerations, &out.Tolerations in, out := &in.Tolerations, &out.Tolerations
*out = make([]core_v1.Toleration, len(*in)) *out = make([]corev1.Toleration, len(*in))
for i := range *in { for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i]) (*in)[i].DeepCopyInto(&(*out)[i])
} }
@ -459,19 +456,15 @@ func (in *PostgresSpec) DeepCopyInto(out *PostgresSpec) {
} }
if in.InitContainers != nil { if in.InitContainers != nil {
in, out := &in.InitContainers, &out.InitContainers in, out := &in.InitContainers, &out.InitContainers
*out = make([]core_v1.Container, len(*in)) *out = make([]corev1.Container, len(*in))
for i := range *in { for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i]) (*in)[i].DeepCopyInto(&(*out)[i])
} }
} }
if in.ShmVolume != nil { if in.ShmVolume != nil {
in, out := &in.ShmVolume, &out.ShmVolume in, out := &in.ShmVolume, &out.ShmVolume
if *in == nil { *out = new(bool)
*out = nil **out = **in
} else {
*out = new(bool)
**out = **in
}
} }
return return
} }
@ -641,12 +634,12 @@ func (in *Sidecar) DeepCopyInto(out *Sidecar) {
out.Resources = in.Resources out.Resources = in.Resources
if in.Ports != nil { if in.Ports != nil {
in, out := &in.Ports, &out.Ports in, out := &in.Ports, &out.Ports
*out = make([]core_v1.ContainerPort, len(*in)) *out = make([]corev1.ContainerPort, len(*in))
copy(*out, *in) copy(*out, *in)
} }
if in.Env != nil { if in.Env != nil {
in, out := &in.Env, &out.Env in, out := &in.Env, &out.Env
*out = make([]core_v1.EnvVar, len(*in)) *out = make([]corev1.EnvVar, len(*in))
for i := range *in { for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i]) (*in)[i].DeepCopyInto(&(*out)[i])
} }

View File

@ -25,7 +25,7 @@ SOFTWARE.
package fake package fake
import ( import (
acid_zalan_do_v1 "github.com/zalando/postgres-operator/pkg/apis/acid.zalan.do/v1" acidzalandov1 "github.com/zalando/postgres-operator/pkg/apis/acid.zalan.do/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
schema "k8s.io/apimachinery/pkg/runtime/schema" schema "k8s.io/apimachinery/pkg/runtime/schema"
testing "k8s.io/client-go/testing" testing "k8s.io/client-go/testing"
@ -42,12 +42,12 @@ var operatorconfigurationsResource = schema.GroupVersionResource{Group: "acid.za
var operatorconfigurationsKind = schema.GroupVersionKind{Group: "acid.zalan.do", Version: "v1", Kind: "OperatorConfiguration"} var operatorconfigurationsKind = schema.GroupVersionKind{Group: "acid.zalan.do", Version: "v1", Kind: "OperatorConfiguration"}
// Get takes name of the operatorConfiguration, and returns the corresponding operatorConfiguration object, and an error if there is any. // Get takes name of the operatorConfiguration, and returns the corresponding operatorConfiguration object, and an error if there is any.
func (c *FakeOperatorConfigurations) Get(name string, options v1.GetOptions) (result *acid_zalan_do_v1.OperatorConfiguration, err error) { func (c *FakeOperatorConfigurations) Get(name string, options v1.GetOptions) (result *acidzalandov1.OperatorConfiguration, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewGetAction(operatorconfigurationsResource, c.ns, name), &acid_zalan_do_v1.OperatorConfiguration{}) Invokes(testing.NewGetAction(operatorconfigurationsResource, c.ns, name), &acidzalandov1.OperatorConfiguration{})
if obj == nil { if obj == nil {
return nil, err return nil, err
} }
return obj.(*acid_zalan_do_v1.OperatorConfiguration), err return obj.(*acidzalandov1.OperatorConfiguration), err
} }

View File

@ -25,7 +25,7 @@ SOFTWARE.
package fake package fake
import ( import (
acid_zalan_do_v1 "github.com/zalando/postgres-operator/pkg/apis/acid.zalan.do/v1" acidzalandov1 "github.com/zalando/postgres-operator/pkg/apis/acid.zalan.do/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels" labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema" schema "k8s.io/apimachinery/pkg/runtime/schema"
@ -45,20 +45,20 @@ var postgresqlsResource = schema.GroupVersionResource{Group: "acid.zalan.do", Ve
var postgresqlsKind = schema.GroupVersionKind{Group: "acid.zalan.do", Version: "v1", Kind: "Postgresql"} var postgresqlsKind = schema.GroupVersionKind{Group: "acid.zalan.do", Version: "v1", Kind: "Postgresql"}
// Get takes name of the postgresql, and returns the corresponding postgresql object, and an error if there is any. // Get takes name of the postgresql, and returns the corresponding postgresql object, and an error if there is any.
func (c *FakePostgresqls) Get(name string, options v1.GetOptions) (result *acid_zalan_do_v1.Postgresql, err error) { func (c *FakePostgresqls) Get(name string, options v1.GetOptions) (result *acidzalandov1.Postgresql, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewGetAction(postgresqlsResource, c.ns, name), &acid_zalan_do_v1.Postgresql{}) Invokes(testing.NewGetAction(postgresqlsResource, c.ns, name), &acidzalandov1.Postgresql{})
if obj == nil { if obj == nil {
return nil, err return nil, err
} }
return obj.(*acid_zalan_do_v1.Postgresql), err return obj.(*acidzalandov1.Postgresql), err
} }
// List takes label and field selectors, and returns the list of Postgresqls that match those selectors. // List takes label and field selectors, and returns the list of Postgresqls that match those selectors.
func (c *FakePostgresqls) List(opts v1.ListOptions) (result *acid_zalan_do_v1.PostgresqlList, err error) { func (c *FakePostgresqls) List(opts v1.ListOptions) (result *acidzalandov1.PostgresqlList, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewListAction(postgresqlsResource, postgresqlsKind, c.ns, opts), &acid_zalan_do_v1.PostgresqlList{}) Invokes(testing.NewListAction(postgresqlsResource, postgresqlsKind, c.ns, opts), &acidzalandov1.PostgresqlList{})
if obj == nil { if obj == nil {
return nil, err return nil, err
@ -68,8 +68,8 @@ func (c *FakePostgresqls) List(opts v1.ListOptions) (result *acid_zalan_do_v1.Po
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
list := &acid_zalan_do_v1.PostgresqlList{ListMeta: obj.(*acid_zalan_do_v1.PostgresqlList).ListMeta} list := &acidzalandov1.PostgresqlList{ListMeta: obj.(*acidzalandov1.PostgresqlList).ListMeta}
for _, item := range obj.(*acid_zalan_do_v1.PostgresqlList).Items { for _, item := range obj.(*acidzalandov1.PostgresqlList).Items {
if label.Matches(labels.Set(item.Labels)) { if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item) list.Items = append(list.Items, item)
} }
@ -85,43 +85,43 @@ func (c *FakePostgresqls) Watch(opts v1.ListOptions) (watch.Interface, error) {
} }
// Create takes the representation of a postgresql and creates it. Returns the server's representation of the postgresql, and an error, if there is any. // Create takes the representation of a postgresql and creates it. Returns the server's representation of the postgresql, and an error, if there is any.
func (c *FakePostgresqls) Create(postgresql *acid_zalan_do_v1.Postgresql) (result *acid_zalan_do_v1.Postgresql, err error) { func (c *FakePostgresqls) Create(postgresql *acidzalandov1.Postgresql) (result *acidzalandov1.Postgresql, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewCreateAction(postgresqlsResource, c.ns, postgresql), &acid_zalan_do_v1.Postgresql{}) Invokes(testing.NewCreateAction(postgresqlsResource, c.ns, postgresql), &acidzalandov1.Postgresql{})
if obj == nil { if obj == nil {
return nil, err return nil, err
} }
return obj.(*acid_zalan_do_v1.Postgresql), err return obj.(*acidzalandov1.Postgresql), err
} }
// Update takes the representation of a postgresql and updates it. Returns the server's representation of the postgresql, and an error, if there is any. // Update takes the representation of a postgresql and updates it. Returns the server's representation of the postgresql, and an error, if there is any.
func (c *FakePostgresqls) Update(postgresql *acid_zalan_do_v1.Postgresql) (result *acid_zalan_do_v1.Postgresql, err error) { func (c *FakePostgresqls) Update(postgresql *acidzalandov1.Postgresql) (result *acidzalandov1.Postgresql, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewUpdateAction(postgresqlsResource, c.ns, postgresql), &acid_zalan_do_v1.Postgresql{}) Invokes(testing.NewUpdateAction(postgresqlsResource, c.ns, postgresql), &acidzalandov1.Postgresql{})
if obj == nil { if obj == nil {
return nil, err return nil, err
} }
return obj.(*acid_zalan_do_v1.Postgresql), err return obj.(*acidzalandov1.Postgresql), err
} }
// UpdateStatus was generated because the type contains a Status member. // UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakePostgresqls) UpdateStatus(postgresql *acid_zalan_do_v1.Postgresql) (*acid_zalan_do_v1.Postgresql, error) { func (c *FakePostgresqls) UpdateStatus(postgresql *acidzalandov1.Postgresql) (*acidzalandov1.Postgresql, error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(postgresqlsResource, "status", c.ns, postgresql), &acid_zalan_do_v1.Postgresql{}) Invokes(testing.NewUpdateSubresourceAction(postgresqlsResource, "status", c.ns, postgresql), &acidzalandov1.Postgresql{})
if obj == nil { if obj == nil {
return nil, err return nil, err
} }
return obj.(*acid_zalan_do_v1.Postgresql), err return obj.(*acidzalandov1.Postgresql), err
} }
// Delete takes name of the postgresql and deletes it. Returns an error if one occurs. // Delete takes name of the postgresql and deletes it. Returns an error if one occurs.
func (c *FakePostgresqls) Delete(name string, options *v1.DeleteOptions) error { func (c *FakePostgresqls) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(testing.NewDeleteAction(postgresqlsResource, c.ns, name), &acid_zalan_do_v1.Postgresql{}) Invokes(testing.NewDeleteAction(postgresqlsResource, c.ns, name), &acidzalandov1.Postgresql{})
return err return err
} }
@ -130,17 +130,17 @@ func (c *FakePostgresqls) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakePostgresqls) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *FakePostgresqls) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(postgresqlsResource, c.ns, listOptions) action := testing.NewDeleteCollectionAction(postgresqlsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &acid_zalan_do_v1.PostgresqlList{}) _, err := c.Fake.Invokes(action, &acidzalandov1.PostgresqlList{})
return err return err
} }
// Patch applies the patch and returns the patched postgresql. // Patch applies the patch and returns the patched postgresql.
func (c *FakePostgresqls) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *acid_zalan_do_v1.Postgresql, err error) { func (c *FakePostgresqls) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *acidzalandov1.Postgresql, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(postgresqlsResource, c.ns, name, data, subresources...), &acid_zalan_do_v1.Postgresql{}) Invokes(testing.NewPatchSubresourceAction(postgresqlsResource, c.ns, name, data, subresources...), &acidzalandov1.Postgresql{})
if obj == nil { if obj == nil {
return nil, err return nil, err
} }
return obj.(*acid_zalan_do_v1.Postgresql), err return obj.(*acidzalandov1.Postgresql), err
} }

View File

@ -25,7 +25,7 @@ SOFTWARE.
package v1 package v1
import ( import (
acid_zalan_do_v1 "github.com/zalando/postgres-operator/pkg/apis/acid.zalan.do/v1" acidzalandov1 "github.com/zalando/postgres-operator/pkg/apis/acid.zalan.do/v1"
scheme "github.com/zalando/postgres-operator/pkg/generated/clientset/versioned/scheme" scheme "github.com/zalando/postgres-operator/pkg/generated/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
rest "k8s.io/client-go/rest" rest "k8s.io/client-go/rest"
@ -39,7 +39,7 @@ type OperatorConfigurationsGetter interface {
// OperatorConfigurationInterface has methods to work with OperatorConfiguration resources. // OperatorConfigurationInterface has methods to work with OperatorConfiguration resources.
type OperatorConfigurationInterface interface { type OperatorConfigurationInterface interface {
Get(name string, options v1.GetOptions) (*acid_zalan_do_v1.OperatorConfiguration, error) Get(name string, options v1.GetOptions) (*acidzalandov1.OperatorConfiguration, error)
OperatorConfigurationExpansion OperatorConfigurationExpansion
} }
@ -58,8 +58,8 @@ func newOperatorConfigurations(c *AcidV1Client, namespace string) *operatorConfi
} }
// Get takes name of the operatorConfiguration, and returns the corresponding operatorConfiguration object, and an error if there is any. // Get takes name of the operatorConfiguration, and returns the corresponding operatorConfiguration object, and an error if there is any.
func (c *operatorConfigurations) Get(name string, options v1.GetOptions) (result *acid_zalan_do_v1.OperatorConfiguration, err error) { func (c *operatorConfigurations) Get(name string, options v1.GetOptions) (result *acidzalandov1.OperatorConfiguration, err error) {
result = &acid_zalan_do_v1.OperatorConfiguration{} result = &acidzalandov1.OperatorConfiguration{}
err = c.client.Get(). err = c.client.Get().
Namespace(c.ns). Namespace(c.ns).
Resource("operatorconfigurations"). Resource("operatorconfigurations").

View File

@ -27,7 +27,7 @@ package v1
import ( import (
v1 "github.com/zalando/postgres-operator/pkg/apis/acid.zalan.do/v1" v1 "github.com/zalando/postgres-operator/pkg/apis/acid.zalan.do/v1"
scheme "github.com/zalando/postgres-operator/pkg/generated/clientset/versioned/scheme" scheme "github.com/zalando/postgres-operator/pkg/generated/clientset/versioned/scheme"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types" types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch" watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest" rest "k8s.io/client-go/rest"
@ -44,11 +44,11 @@ type PostgresqlInterface interface {
Create(*v1.Postgresql) (*v1.Postgresql, error) Create(*v1.Postgresql) (*v1.Postgresql, error)
Update(*v1.Postgresql) (*v1.Postgresql, error) Update(*v1.Postgresql) (*v1.Postgresql, error)
UpdateStatus(*v1.Postgresql) (*v1.Postgresql, error) UpdateStatus(*v1.Postgresql) (*v1.Postgresql, error)
Delete(name string, options *meta_v1.DeleteOptions) error Delete(name string, options *metav1.DeleteOptions) error
DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(name string, options meta_v1.GetOptions) (*v1.Postgresql, error) Get(name string, options metav1.GetOptions) (*v1.Postgresql, error)
List(opts meta_v1.ListOptions) (*v1.PostgresqlList, error) List(opts metav1.ListOptions) (*v1.PostgresqlList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error) Watch(opts metav1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Postgresql, err error) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Postgresql, err error)
PostgresqlExpansion PostgresqlExpansion
} }
@ -68,7 +68,7 @@ func newPostgresqls(c *AcidV1Client, namespace string) *postgresqls {
} }
// Get takes name of the postgresql, and returns the corresponding postgresql object, and an error if there is any. // Get takes name of the postgresql, and returns the corresponding postgresql object, and an error if there is any.
func (c *postgresqls) Get(name string, options meta_v1.GetOptions) (result *v1.Postgresql, err error) { func (c *postgresqls) Get(name string, options metav1.GetOptions) (result *v1.Postgresql, err error) {
result = &v1.Postgresql{} result = &v1.Postgresql{}
err = c.client.Get(). err = c.client.Get().
Namespace(c.ns). Namespace(c.ns).
@ -81,7 +81,7 @@ func (c *postgresqls) Get(name string, options meta_v1.GetOptions) (result *v1.P
} }
// List takes label and field selectors, and returns the list of Postgresqls that match those selectors. // List takes label and field selectors, and returns the list of Postgresqls that match those selectors.
func (c *postgresqls) List(opts meta_v1.ListOptions) (result *v1.PostgresqlList, err error) { func (c *postgresqls) List(opts metav1.ListOptions) (result *v1.PostgresqlList, err error) {
result = &v1.PostgresqlList{} result = &v1.PostgresqlList{}
err = c.client.Get(). err = c.client.Get().
Namespace(c.ns). Namespace(c.ns).
@ -93,7 +93,7 @@ func (c *postgresqls) List(opts meta_v1.ListOptions) (result *v1.PostgresqlList,
} }
// Watch returns a watch.Interface that watches the requested postgresqls. // Watch returns a watch.Interface that watches the requested postgresqls.
func (c *postgresqls) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { func (c *postgresqls) Watch(opts metav1.ListOptions) (watch.Interface, error) {
opts.Watch = true opts.Watch = true
return c.client.Get(). return c.client.Get().
Namespace(c.ns). Namespace(c.ns).
@ -144,7 +144,7 @@ func (c *postgresqls) UpdateStatus(postgresql *v1.Postgresql) (result *v1.Postgr
} }
// Delete takes name of the postgresql and deletes it. Returns an error if one occurs. // Delete takes name of the postgresql and deletes it. Returns an error if one occurs.
func (c *postgresqls) Delete(name string, options *meta_v1.DeleteOptions) error { func (c *postgresqls) Delete(name string, options *metav1.DeleteOptions) error {
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("postgresqls"). Resource("postgresqls").
@ -155,7 +155,7 @@ func (c *postgresqls) Delete(name string, options *meta_v1.DeleteOptions) error
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *postgresqls) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { func (c *postgresqls) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("postgresqls"). Resource("postgresqls").

View File

@ -27,11 +27,11 @@ package v1
import ( import (
time "time" time "time"
acid_zalan_do_v1 "github.com/zalando/postgres-operator/pkg/apis/acid.zalan.do/v1" acidzalandov1 "github.com/zalando/postgres-operator/pkg/apis/acid.zalan.do/v1"
versioned "github.com/zalando/postgres-operator/pkg/generated/clientset/versioned" versioned "github.com/zalando/postgres-operator/pkg/generated/clientset/versioned"
internalinterfaces "github.com/zalando/postgres-operator/pkg/generated/informers/externalversions/internalinterfaces" internalinterfaces "github.com/zalando/postgres-operator/pkg/generated/informers/externalversions/internalinterfaces"
v1 "github.com/zalando/postgres-operator/pkg/generated/listers/acid.zalan.do/v1" v1 "github.com/zalando/postgres-operator/pkg/generated/listers/acid.zalan.do/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime" runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch" watch "k8s.io/apimachinery/pkg/watch"
cache "k8s.io/client-go/tools/cache" cache "k8s.io/client-go/tools/cache"
@ -63,20 +63,20 @@ func NewPostgresqlInformer(client versioned.Interface, namespace string, resyncP
func NewFilteredPostgresqlInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { func NewFilteredPostgresqlInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer( return cache.NewSharedIndexInformer(
&cache.ListWatch{ &cache.ListWatch{
ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil { if tweakListOptions != nil {
tweakListOptions(&options) tweakListOptions(&options)
} }
return client.AcidV1().Postgresqls(namespace).List(options) return client.AcidV1().Postgresqls(namespace).List(options)
}, },
WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil { if tweakListOptions != nil {
tweakListOptions(&options) tweakListOptions(&options)
} }
return client.AcidV1().Postgresqls(namespace).Watch(options) return client.AcidV1().Postgresqls(namespace).Watch(options)
}, },
}, },
&acid_zalan_do_v1.Postgresql{}, &acidzalandov1.Postgresql{},
resyncPeriod, resyncPeriod,
indexers, indexers,
) )
@ -87,7 +87,7 @@ func (f *postgresqlInformer) defaultInformer(client versioned.Interface, resyncP
} }
func (f *postgresqlInformer) Informer() cache.SharedIndexInformer { func (f *postgresqlInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&acid_zalan_do_v1.Postgresql{}, f.defaultInformer) return f.factory.InformerFor(&acidzalandov1.Postgresql{}, f.defaultInformer)
} }
func (f *postgresqlInformer) Lister() v1.PostgresqlLister { func (f *postgresqlInformer) Lister() v1.PostgresqlLister {

View File

@ -30,7 +30,7 @@ import (
time "time" time "time"
versioned "github.com/zalando/postgres-operator/pkg/generated/clientset/versioned" versioned "github.com/zalando/postgres-operator/pkg/generated/clientset/versioned"
acid_zalan_do "github.com/zalando/postgres-operator/pkg/generated/informers/externalversions/acid.zalan.do" acidzalando "github.com/zalando/postgres-operator/pkg/generated/informers/externalversions/acid.zalan.do"
internalinterfaces "github.com/zalando/postgres-operator/pkg/generated/informers/externalversions/internalinterfaces" internalinterfaces "github.com/zalando/postgres-operator/pkg/generated/informers/externalversions/internalinterfaces"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime" runtime "k8s.io/apimachinery/pkg/runtime"
@ -178,9 +178,9 @@ type SharedInformerFactory interface {
ForResource(resource schema.GroupVersionResource) (GenericInformer, error) ForResource(resource schema.GroupVersionResource) (GenericInformer, error)
WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool
Acid() acid_zalan_do.Interface Acid() acidzalando.Interface
} }
func (f *sharedInformerFactory) Acid() acid_zalan_do.Interface { func (f *sharedInformerFactory) Acid() acidzalando.Interface {
return acid_zalan_do.New(f, f.namespace, f.tweakListOptions) return acidzalando.New(f, f.namespace, f.tweakListOptions)
} }