From 5831ed26fede75dbd6b8dd8efc9ae09040b3797d Mon Sep 17 00:00:00 2001 From: Knative Automation Date: Wed, 4 Oct 2023 13:40:58 +0000 Subject: [PATCH] upgrade to latest dependencies bumping knative.dev/eventing d1c3f15...ce67d85: > ce67d85 [main] Upgrade to latest dependencies (# 7329) Signed-off-by: Knative Automation --- go.mod | 2 +- go.sum | 4 +- .../typed/eventing/v1/fake/fake_broker.go | 57 +++++++++---------- .../typed/eventing/v1/fake/fake_trigger.go | 57 +++++++++---------- .../eventing/v1beta1/fake/fake_eventtype.go | 5 +- .../eventing/v1beta2/fake/fake_eventtype.go | 5 +- .../typed/flows/v1/fake/fake_parallel.go | 57 +++++++++---------- .../typed/flows/v1/fake/fake_sequence.go | 57 +++++++++---------- .../typed/messaging/v1/fake/fake_channel.go | 57 +++++++++---------- .../messaging/v1/fake/fake_inmemorychannel.go | 57 +++++++++---------- .../messaging/v1/fake/fake_subscription.go | 57 +++++++++---------- .../sources/v1/fake/fake_apiserversource.go | 57 +++++++++---------- .../sources/v1/fake/fake_containersource.go | 57 +++++++++---------- .../typed/sources/v1/fake/fake_pingsource.go | 57 +++++++++---------- .../typed/sources/v1/fake/fake_sinkbinding.go | 57 +++++++++---------- .../sources/v1beta2/fake/fake_pingsource.go | 5 +- vendor/modules.txt | 2 +- 17 files changed, 318 insertions(+), 332 deletions(-) diff --git a/go.mod b/go.mod index 99e6bb100..85e5f53f2 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ require ( k8s.io/api v0.27.6 k8s.io/apimachinery v0.27.6 k8s.io/client-go v0.27.6 - knative.dev/eventing v0.38.1-0.20231003175114-d1c3f1524125 + knative.dev/eventing v0.38.1-0.20231004060457-ce67d85556b7 knative.dev/hack v0.0.0-20230926181829-f2f9b6f91263 knative.dev/pkg v0.0.0-20231003141102-833dd976f13d knative.dev/serving v0.38.1-0.20231004014018-b66b18545146 diff --git a/go.sum b/go.sum index 7b11275e8..cd68f2122 100644 --- a/go.sum +++ b/go.sum @@ -715,8 +715,8 @@ k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f h1:2kWPakN3i/k81b0gvD5C5F k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f/go.mod h1:byini6yhqGC14c3ebc/QwanvYwhuMWF6yz2F8uwW8eg= k8s.io/utils v0.0.0-20230209194617-a36077c30491 h1:r0BAOLElQnnFhE/ApUsg3iHdVYYPBjNSSOMowRZxxsY= k8s.io/utils v0.0.0-20230209194617-a36077c30491/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -knative.dev/eventing v0.38.1-0.20231003175114-d1c3f1524125 h1:DpQD+ccNBNE9ZsLZZmp94etdFt36g0geGTD08HcOvX0= -knative.dev/eventing v0.38.1-0.20231003175114-d1c3f1524125/go.mod h1:/7+DDR6+FxcU15zvnL0SZ/lWcLzN10IwY6G1a097SdM= +knative.dev/eventing v0.38.1-0.20231004060457-ce67d85556b7 h1:kS0FpNxOoeHfHoWK3dAMpLnRNbh268Tg04Po1/8ub0s= +knative.dev/eventing v0.38.1-0.20231004060457-ce67d85556b7/go.mod h1:RiywmLbqf6ZTG0h/fEyqTl0fdRv1DHFr/Tfsm5/noTA= knative.dev/hack v0.0.0-20230926181829-f2f9b6f91263 h1:e6r9J1YopzSh6tDCpyKhVBfRUlZ2r0KRo9wupRjdRF4= knative.dev/hack v0.0.0-20230926181829-f2f9b6f91263/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q= knative.dev/networking v0.0.0-20230927121431-c1cae210daec h1:FuApkAE1QhvChCQDR3yziqdsZ+LiEM0ZxTdI0qKIMrA= diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1/fake/fake_broker.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1/fake/fake_broker.go index 5c90ef92b..75c4d0312 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1/fake/fake_broker.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1/fake/fake_broker.go @@ -21,13 +21,12 @@ package fake import ( "context" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" - eventingv1 "knative.dev/eventing/pkg/apis/eventing/v1" + v1 "knative.dev/eventing/pkg/apis/eventing/v1" ) // FakeBrokers implements BrokerInterface @@ -36,25 +35,25 @@ type FakeBrokers struct { ns string } -var brokersResource = schema.GroupVersionResource{Group: "eventing.knative.dev", Version: "v1", Resource: "brokers"} +var brokersResource = v1.SchemeGroupVersion.WithResource("brokers") -var brokersKind = schema.GroupVersionKind{Group: "eventing.knative.dev", Version: "v1", Kind: "Broker"} +var brokersKind = v1.SchemeGroupVersion.WithKind("Broker") // Get takes name of the broker, and returns the corresponding broker object, and an error if there is any. -func (c *FakeBrokers) Get(ctx context.Context, name string, options v1.GetOptions) (result *eventingv1.Broker, err error) { +func (c *FakeBrokers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Broker, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(brokersResource, c.ns, name), &eventingv1.Broker{}) + Invokes(testing.NewGetAction(brokersResource, c.ns, name), &v1.Broker{}) if obj == nil { return nil, err } - return obj.(*eventingv1.Broker), err + return obj.(*v1.Broker), err } // List takes label and field selectors, and returns the list of Brokers that match those selectors. -func (c *FakeBrokers) List(ctx context.Context, opts v1.ListOptions) (result *eventingv1.BrokerList, err error) { +func (c *FakeBrokers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.BrokerList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(brokersResource, brokersKind, c.ns, opts), &eventingv1.BrokerList{}) + Invokes(testing.NewListAction(brokersResource, brokersKind, c.ns, opts), &v1.BrokerList{}) if obj == nil { return nil, err @@ -64,8 +63,8 @@ func (c *FakeBrokers) List(ctx context.Context, opts v1.ListOptions) (result *ev if label == nil { label = labels.Everything() } - list := &eventingv1.BrokerList{ListMeta: obj.(*eventingv1.BrokerList).ListMeta} - for _, item := range obj.(*eventingv1.BrokerList).Items { + list := &v1.BrokerList{ListMeta: obj.(*v1.BrokerList).ListMeta} + for _, item := range obj.(*v1.BrokerList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -74,69 +73,69 @@ func (c *FakeBrokers) List(ctx context.Context, opts v1.ListOptions) (result *ev } // Watch returns a watch.Interface that watches the requested brokers. -func (c *FakeBrokers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeBrokers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(brokersResource, c.ns, opts)) } // Create takes the representation of a broker and creates it. Returns the server's representation of the broker, and an error, if there is any. -func (c *FakeBrokers) Create(ctx context.Context, broker *eventingv1.Broker, opts v1.CreateOptions) (result *eventingv1.Broker, err error) { +func (c *FakeBrokers) Create(ctx context.Context, broker *v1.Broker, opts metav1.CreateOptions) (result *v1.Broker, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(brokersResource, c.ns, broker), &eventingv1.Broker{}) + Invokes(testing.NewCreateAction(brokersResource, c.ns, broker), &v1.Broker{}) if obj == nil { return nil, err } - return obj.(*eventingv1.Broker), err + return obj.(*v1.Broker), err } // Update takes the representation of a broker and updates it. Returns the server's representation of the broker, and an error, if there is any. -func (c *FakeBrokers) Update(ctx context.Context, broker *eventingv1.Broker, opts v1.UpdateOptions) (result *eventingv1.Broker, err error) { +func (c *FakeBrokers) Update(ctx context.Context, broker *v1.Broker, opts metav1.UpdateOptions) (result *v1.Broker, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(brokersResource, c.ns, broker), &eventingv1.Broker{}) + Invokes(testing.NewUpdateAction(brokersResource, c.ns, broker), &v1.Broker{}) if obj == nil { return nil, err } - return obj.(*eventingv1.Broker), err + return obj.(*v1.Broker), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeBrokers) UpdateStatus(ctx context.Context, broker *eventingv1.Broker, opts v1.UpdateOptions) (*eventingv1.Broker, error) { +func (c *FakeBrokers) UpdateStatus(ctx context.Context, broker *v1.Broker, opts metav1.UpdateOptions) (*v1.Broker, error) { obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(brokersResource, "status", c.ns, broker), &eventingv1.Broker{}) + Invokes(testing.NewUpdateSubresourceAction(brokersResource, "status", c.ns, broker), &v1.Broker{}) if obj == nil { return nil, err } - return obj.(*eventingv1.Broker), err + return obj.(*v1.Broker), err } // Delete takes name of the broker and deletes it. Returns an error if one occurs. -func (c *FakeBrokers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { +func (c *FakeBrokers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(brokersResource, c.ns, name, opts), &eventingv1.Broker{}) + Invokes(testing.NewDeleteActionWithOptions(brokersResource, c.ns, name, opts), &v1.Broker{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeBrokers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { +func (c *FakeBrokers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { action := testing.NewDeleteCollectionAction(brokersResource, c.ns, listOpts) - _, err := c.Fake.Invokes(action, &eventingv1.BrokerList{}) + _, err := c.Fake.Invokes(action, &v1.BrokerList{}) return err } // Patch applies the patch and returns the patched broker. -func (c *FakeBrokers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *eventingv1.Broker, err error) { +func (c *FakeBrokers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Broker, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(brokersResource, c.ns, name, pt, data, subresources...), &eventingv1.Broker{}) + Invokes(testing.NewPatchSubresourceAction(brokersResource, c.ns, name, pt, data, subresources...), &v1.Broker{}) if obj == nil { return nil, err } - return obj.(*eventingv1.Broker), err + return obj.(*v1.Broker), err } diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1/fake/fake_trigger.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1/fake/fake_trigger.go index 81e8920dd..d588e8898 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1/fake/fake_trigger.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1/fake/fake_trigger.go @@ -21,13 +21,12 @@ package fake import ( "context" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" - eventingv1 "knative.dev/eventing/pkg/apis/eventing/v1" + v1 "knative.dev/eventing/pkg/apis/eventing/v1" ) // FakeTriggers implements TriggerInterface @@ -36,25 +35,25 @@ type FakeTriggers struct { ns string } -var triggersResource = schema.GroupVersionResource{Group: "eventing.knative.dev", Version: "v1", Resource: "triggers"} +var triggersResource = v1.SchemeGroupVersion.WithResource("triggers") -var triggersKind = schema.GroupVersionKind{Group: "eventing.knative.dev", Version: "v1", Kind: "Trigger"} +var triggersKind = v1.SchemeGroupVersion.WithKind("Trigger") // Get takes name of the trigger, and returns the corresponding trigger object, and an error if there is any. -func (c *FakeTriggers) Get(ctx context.Context, name string, options v1.GetOptions) (result *eventingv1.Trigger, err error) { +func (c *FakeTriggers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Trigger, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(triggersResource, c.ns, name), &eventingv1.Trigger{}) + Invokes(testing.NewGetAction(triggersResource, c.ns, name), &v1.Trigger{}) if obj == nil { return nil, err } - return obj.(*eventingv1.Trigger), err + return obj.(*v1.Trigger), err } // List takes label and field selectors, and returns the list of Triggers that match those selectors. -func (c *FakeTriggers) List(ctx context.Context, opts v1.ListOptions) (result *eventingv1.TriggerList, err error) { +func (c *FakeTriggers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.TriggerList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(triggersResource, triggersKind, c.ns, opts), &eventingv1.TriggerList{}) + Invokes(testing.NewListAction(triggersResource, triggersKind, c.ns, opts), &v1.TriggerList{}) if obj == nil { return nil, err @@ -64,8 +63,8 @@ func (c *FakeTriggers) List(ctx context.Context, opts v1.ListOptions) (result *e if label == nil { label = labels.Everything() } - list := &eventingv1.TriggerList{ListMeta: obj.(*eventingv1.TriggerList).ListMeta} - for _, item := range obj.(*eventingv1.TriggerList).Items { + list := &v1.TriggerList{ListMeta: obj.(*v1.TriggerList).ListMeta} + for _, item := range obj.(*v1.TriggerList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -74,69 +73,69 @@ func (c *FakeTriggers) List(ctx context.Context, opts v1.ListOptions) (result *e } // Watch returns a watch.Interface that watches the requested triggers. -func (c *FakeTriggers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeTriggers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(triggersResource, c.ns, opts)) } // Create takes the representation of a trigger and creates it. Returns the server's representation of the trigger, and an error, if there is any. -func (c *FakeTriggers) Create(ctx context.Context, trigger *eventingv1.Trigger, opts v1.CreateOptions) (result *eventingv1.Trigger, err error) { +func (c *FakeTriggers) Create(ctx context.Context, trigger *v1.Trigger, opts metav1.CreateOptions) (result *v1.Trigger, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(triggersResource, c.ns, trigger), &eventingv1.Trigger{}) + Invokes(testing.NewCreateAction(triggersResource, c.ns, trigger), &v1.Trigger{}) if obj == nil { return nil, err } - return obj.(*eventingv1.Trigger), err + return obj.(*v1.Trigger), err } // Update takes the representation of a trigger and updates it. Returns the server's representation of the trigger, and an error, if there is any. -func (c *FakeTriggers) Update(ctx context.Context, trigger *eventingv1.Trigger, opts v1.UpdateOptions) (result *eventingv1.Trigger, err error) { +func (c *FakeTriggers) Update(ctx context.Context, trigger *v1.Trigger, opts metav1.UpdateOptions) (result *v1.Trigger, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(triggersResource, c.ns, trigger), &eventingv1.Trigger{}) + Invokes(testing.NewUpdateAction(triggersResource, c.ns, trigger), &v1.Trigger{}) if obj == nil { return nil, err } - return obj.(*eventingv1.Trigger), err + return obj.(*v1.Trigger), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeTriggers) UpdateStatus(ctx context.Context, trigger *eventingv1.Trigger, opts v1.UpdateOptions) (*eventingv1.Trigger, error) { +func (c *FakeTriggers) UpdateStatus(ctx context.Context, trigger *v1.Trigger, opts metav1.UpdateOptions) (*v1.Trigger, error) { obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(triggersResource, "status", c.ns, trigger), &eventingv1.Trigger{}) + Invokes(testing.NewUpdateSubresourceAction(triggersResource, "status", c.ns, trigger), &v1.Trigger{}) if obj == nil { return nil, err } - return obj.(*eventingv1.Trigger), err + return obj.(*v1.Trigger), err } // Delete takes name of the trigger and deletes it. Returns an error if one occurs. -func (c *FakeTriggers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { +func (c *FakeTriggers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(triggersResource, c.ns, name, opts), &eventingv1.Trigger{}) + Invokes(testing.NewDeleteActionWithOptions(triggersResource, c.ns, name, opts), &v1.Trigger{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeTriggers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { +func (c *FakeTriggers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { action := testing.NewDeleteCollectionAction(triggersResource, c.ns, listOpts) - _, err := c.Fake.Invokes(action, &eventingv1.TriggerList{}) + _, err := c.Fake.Invokes(action, &v1.TriggerList{}) return err } // Patch applies the patch and returns the patched trigger. -func (c *FakeTriggers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *eventingv1.Trigger, err error) { +func (c *FakeTriggers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Trigger, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(triggersResource, c.ns, name, pt, data, subresources...), &eventingv1.Trigger{}) + Invokes(testing.NewPatchSubresourceAction(triggersResource, c.ns, name, pt, data, subresources...), &v1.Trigger{}) if obj == nil { return nil, err } - return obj.(*eventingv1.Trigger), err + return obj.(*v1.Trigger), err } diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1beta1/fake/fake_eventtype.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1beta1/fake/fake_eventtype.go index e95e19c9c..7de907f2b 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1beta1/fake/fake_eventtype.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1beta1/fake/fake_eventtype.go @@ -23,7 +23,6 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -36,9 +35,9 @@ type FakeEventTypes struct { ns string } -var eventtypesResource = schema.GroupVersionResource{Group: "eventing.knative.dev", Version: "v1beta1", Resource: "eventtypes"} +var eventtypesResource = v1beta1.SchemeGroupVersion.WithResource("eventtypes") -var eventtypesKind = schema.GroupVersionKind{Group: "eventing.knative.dev", Version: "v1beta1", Kind: "EventType"} +var eventtypesKind = v1beta1.SchemeGroupVersion.WithKind("EventType") // Get takes name of the eventType, and returns the corresponding eventType object, and an error if there is any. func (c *FakeEventTypes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.EventType, err error) { diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1beta2/fake/fake_eventtype.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1beta2/fake/fake_eventtype.go index d348f36a5..5dd5fa7fb 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1beta2/fake/fake_eventtype.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1beta2/fake/fake_eventtype.go @@ -23,7 +23,6 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -36,9 +35,9 @@ type FakeEventTypes struct { ns string } -var eventtypesResource = schema.GroupVersionResource{Group: "eventing.knative.dev", Version: "v1beta2", Resource: "eventtypes"} +var eventtypesResource = v1beta2.SchemeGroupVersion.WithResource("eventtypes") -var eventtypesKind = schema.GroupVersionKind{Group: "eventing.knative.dev", Version: "v1beta2", Kind: "EventType"} +var eventtypesKind = v1beta2.SchemeGroupVersion.WithKind("EventType") // Get takes name of the eventType, and returns the corresponding eventType object, and an error if there is any. func (c *FakeEventTypes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.EventType, err error) { diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/flows/v1/fake/fake_parallel.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/flows/v1/fake/fake_parallel.go index bba3d6261..9252eec2c 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/flows/v1/fake/fake_parallel.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/flows/v1/fake/fake_parallel.go @@ -21,13 +21,12 @@ package fake import ( "context" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" - flowsv1 "knative.dev/eventing/pkg/apis/flows/v1" + v1 "knative.dev/eventing/pkg/apis/flows/v1" ) // FakeParallels implements ParallelInterface @@ -36,25 +35,25 @@ type FakeParallels struct { ns string } -var parallelsResource = schema.GroupVersionResource{Group: "flows.knative.dev", Version: "v1", Resource: "parallels"} +var parallelsResource = v1.SchemeGroupVersion.WithResource("parallels") -var parallelsKind = schema.GroupVersionKind{Group: "flows.knative.dev", Version: "v1", Kind: "Parallel"} +var parallelsKind = v1.SchemeGroupVersion.WithKind("Parallel") // Get takes name of the parallel, and returns the corresponding parallel object, and an error if there is any. -func (c *FakeParallels) Get(ctx context.Context, name string, options v1.GetOptions) (result *flowsv1.Parallel, err error) { +func (c *FakeParallels) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Parallel, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(parallelsResource, c.ns, name), &flowsv1.Parallel{}) + Invokes(testing.NewGetAction(parallelsResource, c.ns, name), &v1.Parallel{}) if obj == nil { return nil, err } - return obj.(*flowsv1.Parallel), err + return obj.(*v1.Parallel), err } // List takes label and field selectors, and returns the list of Parallels that match those selectors. -func (c *FakeParallels) List(ctx context.Context, opts v1.ListOptions) (result *flowsv1.ParallelList, err error) { +func (c *FakeParallels) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ParallelList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(parallelsResource, parallelsKind, c.ns, opts), &flowsv1.ParallelList{}) + Invokes(testing.NewListAction(parallelsResource, parallelsKind, c.ns, opts), &v1.ParallelList{}) if obj == nil { return nil, err @@ -64,8 +63,8 @@ func (c *FakeParallels) List(ctx context.Context, opts v1.ListOptions) (result * if label == nil { label = labels.Everything() } - list := &flowsv1.ParallelList{ListMeta: obj.(*flowsv1.ParallelList).ListMeta} - for _, item := range obj.(*flowsv1.ParallelList).Items { + list := &v1.ParallelList{ListMeta: obj.(*v1.ParallelList).ListMeta} + for _, item := range obj.(*v1.ParallelList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -74,69 +73,69 @@ func (c *FakeParallels) List(ctx context.Context, opts v1.ListOptions) (result * } // Watch returns a watch.Interface that watches the requested parallels. -func (c *FakeParallels) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeParallels) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(parallelsResource, c.ns, opts)) } // Create takes the representation of a parallel and creates it. Returns the server's representation of the parallel, and an error, if there is any. -func (c *FakeParallels) Create(ctx context.Context, parallel *flowsv1.Parallel, opts v1.CreateOptions) (result *flowsv1.Parallel, err error) { +func (c *FakeParallels) Create(ctx context.Context, parallel *v1.Parallel, opts metav1.CreateOptions) (result *v1.Parallel, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(parallelsResource, c.ns, parallel), &flowsv1.Parallel{}) + Invokes(testing.NewCreateAction(parallelsResource, c.ns, parallel), &v1.Parallel{}) if obj == nil { return nil, err } - return obj.(*flowsv1.Parallel), err + return obj.(*v1.Parallel), err } // Update takes the representation of a parallel and updates it. Returns the server's representation of the parallel, and an error, if there is any. -func (c *FakeParallels) Update(ctx context.Context, parallel *flowsv1.Parallel, opts v1.UpdateOptions) (result *flowsv1.Parallel, err error) { +func (c *FakeParallels) Update(ctx context.Context, parallel *v1.Parallel, opts metav1.UpdateOptions) (result *v1.Parallel, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(parallelsResource, c.ns, parallel), &flowsv1.Parallel{}) + Invokes(testing.NewUpdateAction(parallelsResource, c.ns, parallel), &v1.Parallel{}) if obj == nil { return nil, err } - return obj.(*flowsv1.Parallel), err + return obj.(*v1.Parallel), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeParallels) UpdateStatus(ctx context.Context, parallel *flowsv1.Parallel, opts v1.UpdateOptions) (*flowsv1.Parallel, error) { +func (c *FakeParallels) UpdateStatus(ctx context.Context, parallel *v1.Parallel, opts metav1.UpdateOptions) (*v1.Parallel, error) { obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(parallelsResource, "status", c.ns, parallel), &flowsv1.Parallel{}) + Invokes(testing.NewUpdateSubresourceAction(parallelsResource, "status", c.ns, parallel), &v1.Parallel{}) if obj == nil { return nil, err } - return obj.(*flowsv1.Parallel), err + return obj.(*v1.Parallel), err } // Delete takes name of the parallel and deletes it. Returns an error if one occurs. -func (c *FakeParallels) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { +func (c *FakeParallels) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(parallelsResource, c.ns, name, opts), &flowsv1.Parallel{}) + Invokes(testing.NewDeleteActionWithOptions(parallelsResource, c.ns, name, opts), &v1.Parallel{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeParallels) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { +func (c *FakeParallels) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { action := testing.NewDeleteCollectionAction(parallelsResource, c.ns, listOpts) - _, err := c.Fake.Invokes(action, &flowsv1.ParallelList{}) + _, err := c.Fake.Invokes(action, &v1.ParallelList{}) return err } // Patch applies the patch and returns the patched parallel. -func (c *FakeParallels) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *flowsv1.Parallel, err error) { +func (c *FakeParallels) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Parallel, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(parallelsResource, c.ns, name, pt, data, subresources...), &flowsv1.Parallel{}) + Invokes(testing.NewPatchSubresourceAction(parallelsResource, c.ns, name, pt, data, subresources...), &v1.Parallel{}) if obj == nil { return nil, err } - return obj.(*flowsv1.Parallel), err + return obj.(*v1.Parallel), err } diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/flows/v1/fake/fake_sequence.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/flows/v1/fake/fake_sequence.go index 5c3ed8a97..33b79160e 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/flows/v1/fake/fake_sequence.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/flows/v1/fake/fake_sequence.go @@ -21,13 +21,12 @@ package fake import ( "context" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" - flowsv1 "knative.dev/eventing/pkg/apis/flows/v1" + v1 "knative.dev/eventing/pkg/apis/flows/v1" ) // FakeSequences implements SequenceInterface @@ -36,25 +35,25 @@ type FakeSequences struct { ns string } -var sequencesResource = schema.GroupVersionResource{Group: "flows.knative.dev", Version: "v1", Resource: "sequences"} +var sequencesResource = v1.SchemeGroupVersion.WithResource("sequences") -var sequencesKind = schema.GroupVersionKind{Group: "flows.knative.dev", Version: "v1", Kind: "Sequence"} +var sequencesKind = v1.SchemeGroupVersion.WithKind("Sequence") // Get takes name of the sequence, and returns the corresponding sequence object, and an error if there is any. -func (c *FakeSequences) Get(ctx context.Context, name string, options v1.GetOptions) (result *flowsv1.Sequence, err error) { +func (c *FakeSequences) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Sequence, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(sequencesResource, c.ns, name), &flowsv1.Sequence{}) + Invokes(testing.NewGetAction(sequencesResource, c.ns, name), &v1.Sequence{}) if obj == nil { return nil, err } - return obj.(*flowsv1.Sequence), err + return obj.(*v1.Sequence), err } // List takes label and field selectors, and returns the list of Sequences that match those selectors. -func (c *FakeSequences) List(ctx context.Context, opts v1.ListOptions) (result *flowsv1.SequenceList, err error) { +func (c *FakeSequences) List(ctx context.Context, opts metav1.ListOptions) (result *v1.SequenceList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(sequencesResource, sequencesKind, c.ns, opts), &flowsv1.SequenceList{}) + Invokes(testing.NewListAction(sequencesResource, sequencesKind, c.ns, opts), &v1.SequenceList{}) if obj == nil { return nil, err @@ -64,8 +63,8 @@ func (c *FakeSequences) List(ctx context.Context, opts v1.ListOptions) (result * if label == nil { label = labels.Everything() } - list := &flowsv1.SequenceList{ListMeta: obj.(*flowsv1.SequenceList).ListMeta} - for _, item := range obj.(*flowsv1.SequenceList).Items { + list := &v1.SequenceList{ListMeta: obj.(*v1.SequenceList).ListMeta} + for _, item := range obj.(*v1.SequenceList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -74,69 +73,69 @@ func (c *FakeSequences) List(ctx context.Context, opts v1.ListOptions) (result * } // Watch returns a watch.Interface that watches the requested sequences. -func (c *FakeSequences) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeSequences) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(sequencesResource, c.ns, opts)) } // Create takes the representation of a sequence and creates it. Returns the server's representation of the sequence, and an error, if there is any. -func (c *FakeSequences) Create(ctx context.Context, sequence *flowsv1.Sequence, opts v1.CreateOptions) (result *flowsv1.Sequence, err error) { +func (c *FakeSequences) Create(ctx context.Context, sequence *v1.Sequence, opts metav1.CreateOptions) (result *v1.Sequence, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(sequencesResource, c.ns, sequence), &flowsv1.Sequence{}) + Invokes(testing.NewCreateAction(sequencesResource, c.ns, sequence), &v1.Sequence{}) if obj == nil { return nil, err } - return obj.(*flowsv1.Sequence), err + return obj.(*v1.Sequence), err } // Update takes the representation of a sequence and updates it. Returns the server's representation of the sequence, and an error, if there is any. -func (c *FakeSequences) Update(ctx context.Context, sequence *flowsv1.Sequence, opts v1.UpdateOptions) (result *flowsv1.Sequence, err error) { +func (c *FakeSequences) Update(ctx context.Context, sequence *v1.Sequence, opts metav1.UpdateOptions) (result *v1.Sequence, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(sequencesResource, c.ns, sequence), &flowsv1.Sequence{}) + Invokes(testing.NewUpdateAction(sequencesResource, c.ns, sequence), &v1.Sequence{}) if obj == nil { return nil, err } - return obj.(*flowsv1.Sequence), err + return obj.(*v1.Sequence), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeSequences) UpdateStatus(ctx context.Context, sequence *flowsv1.Sequence, opts v1.UpdateOptions) (*flowsv1.Sequence, error) { +func (c *FakeSequences) UpdateStatus(ctx context.Context, sequence *v1.Sequence, opts metav1.UpdateOptions) (*v1.Sequence, error) { obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(sequencesResource, "status", c.ns, sequence), &flowsv1.Sequence{}) + Invokes(testing.NewUpdateSubresourceAction(sequencesResource, "status", c.ns, sequence), &v1.Sequence{}) if obj == nil { return nil, err } - return obj.(*flowsv1.Sequence), err + return obj.(*v1.Sequence), err } // Delete takes name of the sequence and deletes it. Returns an error if one occurs. -func (c *FakeSequences) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { +func (c *FakeSequences) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(sequencesResource, c.ns, name, opts), &flowsv1.Sequence{}) + Invokes(testing.NewDeleteActionWithOptions(sequencesResource, c.ns, name, opts), &v1.Sequence{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeSequences) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { +func (c *FakeSequences) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { action := testing.NewDeleteCollectionAction(sequencesResource, c.ns, listOpts) - _, err := c.Fake.Invokes(action, &flowsv1.SequenceList{}) + _, err := c.Fake.Invokes(action, &v1.SequenceList{}) return err } // Patch applies the patch and returns the patched sequence. -func (c *FakeSequences) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *flowsv1.Sequence, err error) { +func (c *FakeSequences) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Sequence, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(sequencesResource, c.ns, name, pt, data, subresources...), &flowsv1.Sequence{}) + Invokes(testing.NewPatchSubresourceAction(sequencesResource, c.ns, name, pt, data, subresources...), &v1.Sequence{}) if obj == nil { return nil, err } - return obj.(*flowsv1.Sequence), err + return obj.(*v1.Sequence), err } diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1/fake/fake_channel.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1/fake/fake_channel.go index cd0928865..3adaf9189 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1/fake/fake_channel.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1/fake/fake_channel.go @@ -21,13 +21,12 @@ package fake import ( "context" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" - messagingv1 "knative.dev/eventing/pkg/apis/messaging/v1" + v1 "knative.dev/eventing/pkg/apis/messaging/v1" ) // FakeChannels implements ChannelInterface @@ -36,25 +35,25 @@ type FakeChannels struct { ns string } -var channelsResource = schema.GroupVersionResource{Group: "messaging.knative.dev", Version: "v1", Resource: "channels"} +var channelsResource = v1.SchemeGroupVersion.WithResource("channels") -var channelsKind = schema.GroupVersionKind{Group: "messaging.knative.dev", Version: "v1", Kind: "Channel"} +var channelsKind = v1.SchemeGroupVersion.WithKind("Channel") // Get takes name of the channel, and returns the corresponding channel object, and an error if there is any. -func (c *FakeChannels) Get(ctx context.Context, name string, options v1.GetOptions) (result *messagingv1.Channel, err error) { +func (c *FakeChannels) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Channel, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(channelsResource, c.ns, name), &messagingv1.Channel{}) + Invokes(testing.NewGetAction(channelsResource, c.ns, name), &v1.Channel{}) if obj == nil { return nil, err } - return obj.(*messagingv1.Channel), err + return obj.(*v1.Channel), err } // List takes label and field selectors, and returns the list of Channels that match those selectors. -func (c *FakeChannels) List(ctx context.Context, opts v1.ListOptions) (result *messagingv1.ChannelList, err error) { +func (c *FakeChannels) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ChannelList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(channelsResource, channelsKind, c.ns, opts), &messagingv1.ChannelList{}) + Invokes(testing.NewListAction(channelsResource, channelsKind, c.ns, opts), &v1.ChannelList{}) if obj == nil { return nil, err @@ -64,8 +63,8 @@ func (c *FakeChannels) List(ctx context.Context, opts v1.ListOptions) (result *m if label == nil { label = labels.Everything() } - list := &messagingv1.ChannelList{ListMeta: obj.(*messagingv1.ChannelList).ListMeta} - for _, item := range obj.(*messagingv1.ChannelList).Items { + list := &v1.ChannelList{ListMeta: obj.(*v1.ChannelList).ListMeta} + for _, item := range obj.(*v1.ChannelList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -74,69 +73,69 @@ func (c *FakeChannels) List(ctx context.Context, opts v1.ListOptions) (result *m } // Watch returns a watch.Interface that watches the requested channels. -func (c *FakeChannels) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeChannels) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(channelsResource, c.ns, opts)) } // Create takes the representation of a channel and creates it. Returns the server's representation of the channel, and an error, if there is any. -func (c *FakeChannels) Create(ctx context.Context, channel *messagingv1.Channel, opts v1.CreateOptions) (result *messagingv1.Channel, err error) { +func (c *FakeChannels) Create(ctx context.Context, channel *v1.Channel, opts metav1.CreateOptions) (result *v1.Channel, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(channelsResource, c.ns, channel), &messagingv1.Channel{}) + Invokes(testing.NewCreateAction(channelsResource, c.ns, channel), &v1.Channel{}) if obj == nil { return nil, err } - return obj.(*messagingv1.Channel), err + return obj.(*v1.Channel), err } // Update takes the representation of a channel and updates it. Returns the server's representation of the channel, and an error, if there is any. -func (c *FakeChannels) Update(ctx context.Context, channel *messagingv1.Channel, opts v1.UpdateOptions) (result *messagingv1.Channel, err error) { +func (c *FakeChannels) Update(ctx context.Context, channel *v1.Channel, opts metav1.UpdateOptions) (result *v1.Channel, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(channelsResource, c.ns, channel), &messagingv1.Channel{}) + Invokes(testing.NewUpdateAction(channelsResource, c.ns, channel), &v1.Channel{}) if obj == nil { return nil, err } - return obj.(*messagingv1.Channel), err + return obj.(*v1.Channel), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeChannels) UpdateStatus(ctx context.Context, channel *messagingv1.Channel, opts v1.UpdateOptions) (*messagingv1.Channel, error) { +func (c *FakeChannels) UpdateStatus(ctx context.Context, channel *v1.Channel, opts metav1.UpdateOptions) (*v1.Channel, error) { obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(channelsResource, "status", c.ns, channel), &messagingv1.Channel{}) + Invokes(testing.NewUpdateSubresourceAction(channelsResource, "status", c.ns, channel), &v1.Channel{}) if obj == nil { return nil, err } - return obj.(*messagingv1.Channel), err + return obj.(*v1.Channel), err } // Delete takes name of the channel and deletes it. Returns an error if one occurs. -func (c *FakeChannels) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { +func (c *FakeChannels) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(channelsResource, c.ns, name, opts), &messagingv1.Channel{}) + Invokes(testing.NewDeleteActionWithOptions(channelsResource, c.ns, name, opts), &v1.Channel{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeChannels) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { +func (c *FakeChannels) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { action := testing.NewDeleteCollectionAction(channelsResource, c.ns, listOpts) - _, err := c.Fake.Invokes(action, &messagingv1.ChannelList{}) + _, err := c.Fake.Invokes(action, &v1.ChannelList{}) return err } // Patch applies the patch and returns the patched channel. -func (c *FakeChannels) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *messagingv1.Channel, err error) { +func (c *FakeChannels) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Channel, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(channelsResource, c.ns, name, pt, data, subresources...), &messagingv1.Channel{}) + Invokes(testing.NewPatchSubresourceAction(channelsResource, c.ns, name, pt, data, subresources...), &v1.Channel{}) if obj == nil { return nil, err } - return obj.(*messagingv1.Channel), err + return obj.(*v1.Channel), err } diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1/fake/fake_inmemorychannel.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1/fake/fake_inmemorychannel.go index b9ea87abc..edfc05df7 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1/fake/fake_inmemorychannel.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1/fake/fake_inmemorychannel.go @@ -21,13 +21,12 @@ package fake import ( "context" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" - messagingv1 "knative.dev/eventing/pkg/apis/messaging/v1" + v1 "knative.dev/eventing/pkg/apis/messaging/v1" ) // FakeInMemoryChannels implements InMemoryChannelInterface @@ -36,25 +35,25 @@ type FakeInMemoryChannels struct { ns string } -var inmemorychannelsResource = schema.GroupVersionResource{Group: "messaging.knative.dev", Version: "v1", Resource: "inmemorychannels"} +var inmemorychannelsResource = v1.SchemeGroupVersion.WithResource("inmemorychannels") -var inmemorychannelsKind = schema.GroupVersionKind{Group: "messaging.knative.dev", Version: "v1", Kind: "InMemoryChannel"} +var inmemorychannelsKind = v1.SchemeGroupVersion.WithKind("InMemoryChannel") // Get takes name of the inMemoryChannel, and returns the corresponding inMemoryChannel object, and an error if there is any. -func (c *FakeInMemoryChannels) Get(ctx context.Context, name string, options v1.GetOptions) (result *messagingv1.InMemoryChannel, err error) { +func (c *FakeInMemoryChannels) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.InMemoryChannel, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(inmemorychannelsResource, c.ns, name), &messagingv1.InMemoryChannel{}) + Invokes(testing.NewGetAction(inmemorychannelsResource, c.ns, name), &v1.InMemoryChannel{}) if obj == nil { return nil, err } - return obj.(*messagingv1.InMemoryChannel), err + return obj.(*v1.InMemoryChannel), err } // List takes label and field selectors, and returns the list of InMemoryChannels that match those selectors. -func (c *FakeInMemoryChannels) List(ctx context.Context, opts v1.ListOptions) (result *messagingv1.InMemoryChannelList, err error) { +func (c *FakeInMemoryChannels) List(ctx context.Context, opts metav1.ListOptions) (result *v1.InMemoryChannelList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(inmemorychannelsResource, inmemorychannelsKind, c.ns, opts), &messagingv1.InMemoryChannelList{}) + Invokes(testing.NewListAction(inmemorychannelsResource, inmemorychannelsKind, c.ns, opts), &v1.InMemoryChannelList{}) if obj == nil { return nil, err @@ -64,8 +63,8 @@ func (c *FakeInMemoryChannels) List(ctx context.Context, opts v1.ListOptions) (r if label == nil { label = labels.Everything() } - list := &messagingv1.InMemoryChannelList{ListMeta: obj.(*messagingv1.InMemoryChannelList).ListMeta} - for _, item := range obj.(*messagingv1.InMemoryChannelList).Items { + list := &v1.InMemoryChannelList{ListMeta: obj.(*v1.InMemoryChannelList).ListMeta} + for _, item := range obj.(*v1.InMemoryChannelList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -74,69 +73,69 @@ func (c *FakeInMemoryChannels) List(ctx context.Context, opts v1.ListOptions) (r } // Watch returns a watch.Interface that watches the requested inMemoryChannels. -func (c *FakeInMemoryChannels) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeInMemoryChannels) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(inmemorychannelsResource, c.ns, opts)) } // Create takes the representation of a inMemoryChannel and creates it. Returns the server's representation of the inMemoryChannel, and an error, if there is any. -func (c *FakeInMemoryChannels) Create(ctx context.Context, inMemoryChannel *messagingv1.InMemoryChannel, opts v1.CreateOptions) (result *messagingv1.InMemoryChannel, err error) { +func (c *FakeInMemoryChannels) Create(ctx context.Context, inMemoryChannel *v1.InMemoryChannel, opts metav1.CreateOptions) (result *v1.InMemoryChannel, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(inmemorychannelsResource, c.ns, inMemoryChannel), &messagingv1.InMemoryChannel{}) + Invokes(testing.NewCreateAction(inmemorychannelsResource, c.ns, inMemoryChannel), &v1.InMemoryChannel{}) if obj == nil { return nil, err } - return obj.(*messagingv1.InMemoryChannel), err + return obj.(*v1.InMemoryChannel), err } // Update takes the representation of a inMemoryChannel and updates it. Returns the server's representation of the inMemoryChannel, and an error, if there is any. -func (c *FakeInMemoryChannels) Update(ctx context.Context, inMemoryChannel *messagingv1.InMemoryChannel, opts v1.UpdateOptions) (result *messagingv1.InMemoryChannel, err error) { +func (c *FakeInMemoryChannels) Update(ctx context.Context, inMemoryChannel *v1.InMemoryChannel, opts metav1.UpdateOptions) (result *v1.InMemoryChannel, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(inmemorychannelsResource, c.ns, inMemoryChannel), &messagingv1.InMemoryChannel{}) + Invokes(testing.NewUpdateAction(inmemorychannelsResource, c.ns, inMemoryChannel), &v1.InMemoryChannel{}) if obj == nil { return nil, err } - return obj.(*messagingv1.InMemoryChannel), err + return obj.(*v1.InMemoryChannel), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeInMemoryChannels) UpdateStatus(ctx context.Context, inMemoryChannel *messagingv1.InMemoryChannel, opts v1.UpdateOptions) (*messagingv1.InMemoryChannel, error) { +func (c *FakeInMemoryChannels) UpdateStatus(ctx context.Context, inMemoryChannel *v1.InMemoryChannel, opts metav1.UpdateOptions) (*v1.InMemoryChannel, error) { obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(inmemorychannelsResource, "status", c.ns, inMemoryChannel), &messagingv1.InMemoryChannel{}) + Invokes(testing.NewUpdateSubresourceAction(inmemorychannelsResource, "status", c.ns, inMemoryChannel), &v1.InMemoryChannel{}) if obj == nil { return nil, err } - return obj.(*messagingv1.InMemoryChannel), err + return obj.(*v1.InMemoryChannel), err } // Delete takes name of the inMemoryChannel and deletes it. Returns an error if one occurs. -func (c *FakeInMemoryChannels) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { +func (c *FakeInMemoryChannels) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(inmemorychannelsResource, c.ns, name, opts), &messagingv1.InMemoryChannel{}) + Invokes(testing.NewDeleteActionWithOptions(inmemorychannelsResource, c.ns, name, opts), &v1.InMemoryChannel{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeInMemoryChannels) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { +func (c *FakeInMemoryChannels) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { action := testing.NewDeleteCollectionAction(inmemorychannelsResource, c.ns, listOpts) - _, err := c.Fake.Invokes(action, &messagingv1.InMemoryChannelList{}) + _, err := c.Fake.Invokes(action, &v1.InMemoryChannelList{}) return err } // Patch applies the patch and returns the patched inMemoryChannel. -func (c *FakeInMemoryChannels) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *messagingv1.InMemoryChannel, err error) { +func (c *FakeInMemoryChannels) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.InMemoryChannel, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(inmemorychannelsResource, c.ns, name, pt, data, subresources...), &messagingv1.InMemoryChannel{}) + Invokes(testing.NewPatchSubresourceAction(inmemorychannelsResource, c.ns, name, pt, data, subresources...), &v1.InMemoryChannel{}) if obj == nil { return nil, err } - return obj.(*messagingv1.InMemoryChannel), err + return obj.(*v1.InMemoryChannel), err } diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1/fake/fake_subscription.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1/fake/fake_subscription.go index f6ee84ee9..27341766a 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1/fake/fake_subscription.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1/fake/fake_subscription.go @@ -21,13 +21,12 @@ package fake import ( "context" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" - messagingv1 "knative.dev/eventing/pkg/apis/messaging/v1" + v1 "knative.dev/eventing/pkg/apis/messaging/v1" ) // FakeSubscriptions implements SubscriptionInterface @@ -36,25 +35,25 @@ type FakeSubscriptions struct { ns string } -var subscriptionsResource = schema.GroupVersionResource{Group: "messaging.knative.dev", Version: "v1", Resource: "subscriptions"} +var subscriptionsResource = v1.SchemeGroupVersion.WithResource("subscriptions") -var subscriptionsKind = schema.GroupVersionKind{Group: "messaging.knative.dev", Version: "v1", Kind: "Subscription"} +var subscriptionsKind = v1.SchemeGroupVersion.WithKind("Subscription") // Get takes name of the subscription, and returns the corresponding subscription object, and an error if there is any. -func (c *FakeSubscriptions) Get(ctx context.Context, name string, options v1.GetOptions) (result *messagingv1.Subscription, err error) { +func (c *FakeSubscriptions) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Subscription, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(subscriptionsResource, c.ns, name), &messagingv1.Subscription{}) + Invokes(testing.NewGetAction(subscriptionsResource, c.ns, name), &v1.Subscription{}) if obj == nil { return nil, err } - return obj.(*messagingv1.Subscription), err + return obj.(*v1.Subscription), err } // List takes label and field selectors, and returns the list of Subscriptions that match those selectors. -func (c *FakeSubscriptions) List(ctx context.Context, opts v1.ListOptions) (result *messagingv1.SubscriptionList, err error) { +func (c *FakeSubscriptions) List(ctx context.Context, opts metav1.ListOptions) (result *v1.SubscriptionList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(subscriptionsResource, subscriptionsKind, c.ns, opts), &messagingv1.SubscriptionList{}) + Invokes(testing.NewListAction(subscriptionsResource, subscriptionsKind, c.ns, opts), &v1.SubscriptionList{}) if obj == nil { return nil, err @@ -64,8 +63,8 @@ func (c *FakeSubscriptions) List(ctx context.Context, opts v1.ListOptions) (resu if label == nil { label = labels.Everything() } - list := &messagingv1.SubscriptionList{ListMeta: obj.(*messagingv1.SubscriptionList).ListMeta} - for _, item := range obj.(*messagingv1.SubscriptionList).Items { + list := &v1.SubscriptionList{ListMeta: obj.(*v1.SubscriptionList).ListMeta} + for _, item := range obj.(*v1.SubscriptionList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -74,69 +73,69 @@ func (c *FakeSubscriptions) List(ctx context.Context, opts v1.ListOptions) (resu } // Watch returns a watch.Interface that watches the requested subscriptions. -func (c *FakeSubscriptions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeSubscriptions) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(subscriptionsResource, c.ns, opts)) } // Create takes the representation of a subscription and creates it. Returns the server's representation of the subscription, and an error, if there is any. -func (c *FakeSubscriptions) Create(ctx context.Context, subscription *messagingv1.Subscription, opts v1.CreateOptions) (result *messagingv1.Subscription, err error) { +func (c *FakeSubscriptions) Create(ctx context.Context, subscription *v1.Subscription, opts metav1.CreateOptions) (result *v1.Subscription, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(subscriptionsResource, c.ns, subscription), &messagingv1.Subscription{}) + Invokes(testing.NewCreateAction(subscriptionsResource, c.ns, subscription), &v1.Subscription{}) if obj == nil { return nil, err } - return obj.(*messagingv1.Subscription), err + return obj.(*v1.Subscription), err } // Update takes the representation of a subscription and updates it. Returns the server's representation of the subscription, and an error, if there is any. -func (c *FakeSubscriptions) Update(ctx context.Context, subscription *messagingv1.Subscription, opts v1.UpdateOptions) (result *messagingv1.Subscription, err error) { +func (c *FakeSubscriptions) Update(ctx context.Context, subscription *v1.Subscription, opts metav1.UpdateOptions) (result *v1.Subscription, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(subscriptionsResource, c.ns, subscription), &messagingv1.Subscription{}) + Invokes(testing.NewUpdateAction(subscriptionsResource, c.ns, subscription), &v1.Subscription{}) if obj == nil { return nil, err } - return obj.(*messagingv1.Subscription), err + return obj.(*v1.Subscription), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeSubscriptions) UpdateStatus(ctx context.Context, subscription *messagingv1.Subscription, opts v1.UpdateOptions) (*messagingv1.Subscription, error) { +func (c *FakeSubscriptions) UpdateStatus(ctx context.Context, subscription *v1.Subscription, opts metav1.UpdateOptions) (*v1.Subscription, error) { obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(subscriptionsResource, "status", c.ns, subscription), &messagingv1.Subscription{}) + Invokes(testing.NewUpdateSubresourceAction(subscriptionsResource, "status", c.ns, subscription), &v1.Subscription{}) if obj == nil { return nil, err } - return obj.(*messagingv1.Subscription), err + return obj.(*v1.Subscription), err } // Delete takes name of the subscription and deletes it. Returns an error if one occurs. -func (c *FakeSubscriptions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { +func (c *FakeSubscriptions) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(subscriptionsResource, c.ns, name, opts), &messagingv1.Subscription{}) + Invokes(testing.NewDeleteActionWithOptions(subscriptionsResource, c.ns, name, opts), &v1.Subscription{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeSubscriptions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { +func (c *FakeSubscriptions) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { action := testing.NewDeleteCollectionAction(subscriptionsResource, c.ns, listOpts) - _, err := c.Fake.Invokes(action, &messagingv1.SubscriptionList{}) + _, err := c.Fake.Invokes(action, &v1.SubscriptionList{}) return err } // Patch applies the patch and returns the patched subscription. -func (c *FakeSubscriptions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *messagingv1.Subscription, err error) { +func (c *FakeSubscriptions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Subscription, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(subscriptionsResource, c.ns, name, pt, data, subresources...), &messagingv1.Subscription{}) + Invokes(testing.NewPatchSubresourceAction(subscriptionsResource, c.ns, name, pt, data, subresources...), &v1.Subscription{}) if obj == nil { return nil, err } - return obj.(*messagingv1.Subscription), err + return obj.(*v1.Subscription), err } diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1/fake/fake_apiserversource.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1/fake/fake_apiserversource.go index 5ca73d0e9..d50e2dc7a 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1/fake/fake_apiserversource.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1/fake/fake_apiserversource.go @@ -21,13 +21,12 @@ package fake import ( "context" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" - sourcesv1 "knative.dev/eventing/pkg/apis/sources/v1" + v1 "knative.dev/eventing/pkg/apis/sources/v1" ) // FakeApiServerSources implements ApiServerSourceInterface @@ -36,25 +35,25 @@ type FakeApiServerSources struct { ns string } -var apiserversourcesResource = schema.GroupVersionResource{Group: "sources.knative.dev", Version: "v1", Resource: "apiserversources"} +var apiserversourcesResource = v1.SchemeGroupVersion.WithResource("apiserversources") -var apiserversourcesKind = schema.GroupVersionKind{Group: "sources.knative.dev", Version: "v1", Kind: "ApiServerSource"} +var apiserversourcesKind = v1.SchemeGroupVersion.WithKind("ApiServerSource") // Get takes name of the apiServerSource, and returns the corresponding apiServerSource object, and an error if there is any. -func (c *FakeApiServerSources) Get(ctx context.Context, name string, options v1.GetOptions) (result *sourcesv1.ApiServerSource, err error) { +func (c *FakeApiServerSources) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ApiServerSource, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(apiserversourcesResource, c.ns, name), &sourcesv1.ApiServerSource{}) + Invokes(testing.NewGetAction(apiserversourcesResource, c.ns, name), &v1.ApiServerSource{}) if obj == nil { return nil, err } - return obj.(*sourcesv1.ApiServerSource), err + return obj.(*v1.ApiServerSource), err } // List takes label and field selectors, and returns the list of ApiServerSources that match those selectors. -func (c *FakeApiServerSources) List(ctx context.Context, opts v1.ListOptions) (result *sourcesv1.ApiServerSourceList, err error) { +func (c *FakeApiServerSources) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ApiServerSourceList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(apiserversourcesResource, apiserversourcesKind, c.ns, opts), &sourcesv1.ApiServerSourceList{}) + Invokes(testing.NewListAction(apiserversourcesResource, apiserversourcesKind, c.ns, opts), &v1.ApiServerSourceList{}) if obj == nil { return nil, err @@ -64,8 +63,8 @@ func (c *FakeApiServerSources) List(ctx context.Context, opts v1.ListOptions) (r if label == nil { label = labels.Everything() } - list := &sourcesv1.ApiServerSourceList{ListMeta: obj.(*sourcesv1.ApiServerSourceList).ListMeta} - for _, item := range obj.(*sourcesv1.ApiServerSourceList).Items { + list := &v1.ApiServerSourceList{ListMeta: obj.(*v1.ApiServerSourceList).ListMeta} + for _, item := range obj.(*v1.ApiServerSourceList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -74,69 +73,69 @@ func (c *FakeApiServerSources) List(ctx context.Context, opts v1.ListOptions) (r } // Watch returns a watch.Interface that watches the requested apiServerSources. -func (c *FakeApiServerSources) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeApiServerSources) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(apiserversourcesResource, c.ns, opts)) } // Create takes the representation of a apiServerSource and creates it. Returns the server's representation of the apiServerSource, and an error, if there is any. -func (c *FakeApiServerSources) Create(ctx context.Context, apiServerSource *sourcesv1.ApiServerSource, opts v1.CreateOptions) (result *sourcesv1.ApiServerSource, err error) { +func (c *FakeApiServerSources) Create(ctx context.Context, apiServerSource *v1.ApiServerSource, opts metav1.CreateOptions) (result *v1.ApiServerSource, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(apiserversourcesResource, c.ns, apiServerSource), &sourcesv1.ApiServerSource{}) + Invokes(testing.NewCreateAction(apiserversourcesResource, c.ns, apiServerSource), &v1.ApiServerSource{}) if obj == nil { return nil, err } - return obj.(*sourcesv1.ApiServerSource), err + return obj.(*v1.ApiServerSource), err } // Update takes the representation of a apiServerSource and updates it. Returns the server's representation of the apiServerSource, and an error, if there is any. -func (c *FakeApiServerSources) Update(ctx context.Context, apiServerSource *sourcesv1.ApiServerSource, opts v1.UpdateOptions) (result *sourcesv1.ApiServerSource, err error) { +func (c *FakeApiServerSources) Update(ctx context.Context, apiServerSource *v1.ApiServerSource, opts metav1.UpdateOptions) (result *v1.ApiServerSource, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(apiserversourcesResource, c.ns, apiServerSource), &sourcesv1.ApiServerSource{}) + Invokes(testing.NewUpdateAction(apiserversourcesResource, c.ns, apiServerSource), &v1.ApiServerSource{}) if obj == nil { return nil, err } - return obj.(*sourcesv1.ApiServerSource), err + return obj.(*v1.ApiServerSource), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeApiServerSources) UpdateStatus(ctx context.Context, apiServerSource *sourcesv1.ApiServerSource, opts v1.UpdateOptions) (*sourcesv1.ApiServerSource, error) { +func (c *FakeApiServerSources) UpdateStatus(ctx context.Context, apiServerSource *v1.ApiServerSource, opts metav1.UpdateOptions) (*v1.ApiServerSource, error) { obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(apiserversourcesResource, "status", c.ns, apiServerSource), &sourcesv1.ApiServerSource{}) + Invokes(testing.NewUpdateSubresourceAction(apiserversourcesResource, "status", c.ns, apiServerSource), &v1.ApiServerSource{}) if obj == nil { return nil, err } - return obj.(*sourcesv1.ApiServerSource), err + return obj.(*v1.ApiServerSource), err } // Delete takes name of the apiServerSource and deletes it. Returns an error if one occurs. -func (c *FakeApiServerSources) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { +func (c *FakeApiServerSources) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(apiserversourcesResource, c.ns, name, opts), &sourcesv1.ApiServerSource{}) + Invokes(testing.NewDeleteActionWithOptions(apiserversourcesResource, c.ns, name, opts), &v1.ApiServerSource{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeApiServerSources) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { +func (c *FakeApiServerSources) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { action := testing.NewDeleteCollectionAction(apiserversourcesResource, c.ns, listOpts) - _, err := c.Fake.Invokes(action, &sourcesv1.ApiServerSourceList{}) + _, err := c.Fake.Invokes(action, &v1.ApiServerSourceList{}) return err } // Patch applies the patch and returns the patched apiServerSource. -func (c *FakeApiServerSources) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *sourcesv1.ApiServerSource, err error) { +func (c *FakeApiServerSources) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ApiServerSource, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(apiserversourcesResource, c.ns, name, pt, data, subresources...), &sourcesv1.ApiServerSource{}) + Invokes(testing.NewPatchSubresourceAction(apiserversourcesResource, c.ns, name, pt, data, subresources...), &v1.ApiServerSource{}) if obj == nil { return nil, err } - return obj.(*sourcesv1.ApiServerSource), err + return obj.(*v1.ApiServerSource), err } diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1/fake/fake_containersource.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1/fake/fake_containersource.go index 9d04ccad0..402008c06 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1/fake/fake_containersource.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1/fake/fake_containersource.go @@ -21,13 +21,12 @@ package fake import ( "context" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" - sourcesv1 "knative.dev/eventing/pkg/apis/sources/v1" + v1 "knative.dev/eventing/pkg/apis/sources/v1" ) // FakeContainerSources implements ContainerSourceInterface @@ -36,25 +35,25 @@ type FakeContainerSources struct { ns string } -var containersourcesResource = schema.GroupVersionResource{Group: "sources.knative.dev", Version: "v1", Resource: "containersources"} +var containersourcesResource = v1.SchemeGroupVersion.WithResource("containersources") -var containersourcesKind = schema.GroupVersionKind{Group: "sources.knative.dev", Version: "v1", Kind: "ContainerSource"} +var containersourcesKind = v1.SchemeGroupVersion.WithKind("ContainerSource") // Get takes name of the containerSource, and returns the corresponding containerSource object, and an error if there is any. -func (c *FakeContainerSources) Get(ctx context.Context, name string, options v1.GetOptions) (result *sourcesv1.ContainerSource, err error) { +func (c *FakeContainerSources) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ContainerSource, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(containersourcesResource, c.ns, name), &sourcesv1.ContainerSource{}) + Invokes(testing.NewGetAction(containersourcesResource, c.ns, name), &v1.ContainerSource{}) if obj == nil { return nil, err } - return obj.(*sourcesv1.ContainerSource), err + return obj.(*v1.ContainerSource), err } // List takes label and field selectors, and returns the list of ContainerSources that match those selectors. -func (c *FakeContainerSources) List(ctx context.Context, opts v1.ListOptions) (result *sourcesv1.ContainerSourceList, err error) { +func (c *FakeContainerSources) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ContainerSourceList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(containersourcesResource, containersourcesKind, c.ns, opts), &sourcesv1.ContainerSourceList{}) + Invokes(testing.NewListAction(containersourcesResource, containersourcesKind, c.ns, opts), &v1.ContainerSourceList{}) if obj == nil { return nil, err @@ -64,8 +63,8 @@ func (c *FakeContainerSources) List(ctx context.Context, opts v1.ListOptions) (r if label == nil { label = labels.Everything() } - list := &sourcesv1.ContainerSourceList{ListMeta: obj.(*sourcesv1.ContainerSourceList).ListMeta} - for _, item := range obj.(*sourcesv1.ContainerSourceList).Items { + list := &v1.ContainerSourceList{ListMeta: obj.(*v1.ContainerSourceList).ListMeta} + for _, item := range obj.(*v1.ContainerSourceList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -74,69 +73,69 @@ func (c *FakeContainerSources) List(ctx context.Context, opts v1.ListOptions) (r } // Watch returns a watch.Interface that watches the requested containerSources. -func (c *FakeContainerSources) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeContainerSources) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(containersourcesResource, c.ns, opts)) } // Create takes the representation of a containerSource and creates it. Returns the server's representation of the containerSource, and an error, if there is any. -func (c *FakeContainerSources) Create(ctx context.Context, containerSource *sourcesv1.ContainerSource, opts v1.CreateOptions) (result *sourcesv1.ContainerSource, err error) { +func (c *FakeContainerSources) Create(ctx context.Context, containerSource *v1.ContainerSource, opts metav1.CreateOptions) (result *v1.ContainerSource, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(containersourcesResource, c.ns, containerSource), &sourcesv1.ContainerSource{}) + Invokes(testing.NewCreateAction(containersourcesResource, c.ns, containerSource), &v1.ContainerSource{}) if obj == nil { return nil, err } - return obj.(*sourcesv1.ContainerSource), err + return obj.(*v1.ContainerSource), err } // Update takes the representation of a containerSource and updates it. Returns the server's representation of the containerSource, and an error, if there is any. -func (c *FakeContainerSources) Update(ctx context.Context, containerSource *sourcesv1.ContainerSource, opts v1.UpdateOptions) (result *sourcesv1.ContainerSource, err error) { +func (c *FakeContainerSources) Update(ctx context.Context, containerSource *v1.ContainerSource, opts metav1.UpdateOptions) (result *v1.ContainerSource, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(containersourcesResource, c.ns, containerSource), &sourcesv1.ContainerSource{}) + Invokes(testing.NewUpdateAction(containersourcesResource, c.ns, containerSource), &v1.ContainerSource{}) if obj == nil { return nil, err } - return obj.(*sourcesv1.ContainerSource), err + return obj.(*v1.ContainerSource), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeContainerSources) UpdateStatus(ctx context.Context, containerSource *sourcesv1.ContainerSource, opts v1.UpdateOptions) (*sourcesv1.ContainerSource, error) { +func (c *FakeContainerSources) UpdateStatus(ctx context.Context, containerSource *v1.ContainerSource, opts metav1.UpdateOptions) (*v1.ContainerSource, error) { obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(containersourcesResource, "status", c.ns, containerSource), &sourcesv1.ContainerSource{}) + Invokes(testing.NewUpdateSubresourceAction(containersourcesResource, "status", c.ns, containerSource), &v1.ContainerSource{}) if obj == nil { return nil, err } - return obj.(*sourcesv1.ContainerSource), err + return obj.(*v1.ContainerSource), err } // Delete takes name of the containerSource and deletes it. Returns an error if one occurs. -func (c *FakeContainerSources) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { +func (c *FakeContainerSources) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(containersourcesResource, c.ns, name, opts), &sourcesv1.ContainerSource{}) + Invokes(testing.NewDeleteActionWithOptions(containersourcesResource, c.ns, name, opts), &v1.ContainerSource{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeContainerSources) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { +func (c *FakeContainerSources) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { action := testing.NewDeleteCollectionAction(containersourcesResource, c.ns, listOpts) - _, err := c.Fake.Invokes(action, &sourcesv1.ContainerSourceList{}) + _, err := c.Fake.Invokes(action, &v1.ContainerSourceList{}) return err } // Patch applies the patch and returns the patched containerSource. -func (c *FakeContainerSources) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *sourcesv1.ContainerSource, err error) { +func (c *FakeContainerSources) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ContainerSource, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(containersourcesResource, c.ns, name, pt, data, subresources...), &sourcesv1.ContainerSource{}) + Invokes(testing.NewPatchSubresourceAction(containersourcesResource, c.ns, name, pt, data, subresources...), &v1.ContainerSource{}) if obj == nil { return nil, err } - return obj.(*sourcesv1.ContainerSource), err + return obj.(*v1.ContainerSource), err } diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1/fake/fake_pingsource.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1/fake/fake_pingsource.go index 1230a4e73..dc03e7dc3 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1/fake/fake_pingsource.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1/fake/fake_pingsource.go @@ -21,13 +21,12 @@ package fake import ( "context" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" - sourcesv1 "knative.dev/eventing/pkg/apis/sources/v1" + v1 "knative.dev/eventing/pkg/apis/sources/v1" ) // FakePingSources implements PingSourceInterface @@ -36,25 +35,25 @@ type FakePingSources struct { ns string } -var pingsourcesResource = schema.GroupVersionResource{Group: "sources.knative.dev", Version: "v1", Resource: "pingsources"} +var pingsourcesResource = v1.SchemeGroupVersion.WithResource("pingsources") -var pingsourcesKind = schema.GroupVersionKind{Group: "sources.knative.dev", Version: "v1", Kind: "PingSource"} +var pingsourcesKind = v1.SchemeGroupVersion.WithKind("PingSource") // Get takes name of the pingSource, and returns the corresponding pingSource object, and an error if there is any. -func (c *FakePingSources) Get(ctx context.Context, name string, options v1.GetOptions) (result *sourcesv1.PingSource, err error) { +func (c *FakePingSources) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.PingSource, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(pingsourcesResource, c.ns, name), &sourcesv1.PingSource{}) + Invokes(testing.NewGetAction(pingsourcesResource, c.ns, name), &v1.PingSource{}) if obj == nil { return nil, err } - return obj.(*sourcesv1.PingSource), err + return obj.(*v1.PingSource), err } // List takes label and field selectors, and returns the list of PingSources that match those selectors. -func (c *FakePingSources) List(ctx context.Context, opts v1.ListOptions) (result *sourcesv1.PingSourceList, err error) { +func (c *FakePingSources) List(ctx context.Context, opts metav1.ListOptions) (result *v1.PingSourceList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(pingsourcesResource, pingsourcesKind, c.ns, opts), &sourcesv1.PingSourceList{}) + Invokes(testing.NewListAction(pingsourcesResource, pingsourcesKind, c.ns, opts), &v1.PingSourceList{}) if obj == nil { return nil, err @@ -64,8 +63,8 @@ func (c *FakePingSources) List(ctx context.Context, opts v1.ListOptions) (result if label == nil { label = labels.Everything() } - list := &sourcesv1.PingSourceList{ListMeta: obj.(*sourcesv1.PingSourceList).ListMeta} - for _, item := range obj.(*sourcesv1.PingSourceList).Items { + list := &v1.PingSourceList{ListMeta: obj.(*v1.PingSourceList).ListMeta} + for _, item := range obj.(*v1.PingSourceList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -74,69 +73,69 @@ func (c *FakePingSources) List(ctx context.Context, opts v1.ListOptions) (result } // Watch returns a watch.Interface that watches the requested pingSources. -func (c *FakePingSources) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { +func (c *FakePingSources) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(pingsourcesResource, c.ns, opts)) } // Create takes the representation of a pingSource and creates it. Returns the server's representation of the pingSource, and an error, if there is any. -func (c *FakePingSources) Create(ctx context.Context, pingSource *sourcesv1.PingSource, opts v1.CreateOptions) (result *sourcesv1.PingSource, err error) { +func (c *FakePingSources) Create(ctx context.Context, pingSource *v1.PingSource, opts metav1.CreateOptions) (result *v1.PingSource, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(pingsourcesResource, c.ns, pingSource), &sourcesv1.PingSource{}) + Invokes(testing.NewCreateAction(pingsourcesResource, c.ns, pingSource), &v1.PingSource{}) if obj == nil { return nil, err } - return obj.(*sourcesv1.PingSource), err + return obj.(*v1.PingSource), err } // Update takes the representation of a pingSource and updates it. Returns the server's representation of the pingSource, and an error, if there is any. -func (c *FakePingSources) Update(ctx context.Context, pingSource *sourcesv1.PingSource, opts v1.UpdateOptions) (result *sourcesv1.PingSource, err error) { +func (c *FakePingSources) Update(ctx context.Context, pingSource *v1.PingSource, opts metav1.UpdateOptions) (result *v1.PingSource, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(pingsourcesResource, c.ns, pingSource), &sourcesv1.PingSource{}) + Invokes(testing.NewUpdateAction(pingsourcesResource, c.ns, pingSource), &v1.PingSource{}) if obj == nil { return nil, err } - return obj.(*sourcesv1.PingSource), err + return obj.(*v1.PingSource), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakePingSources) UpdateStatus(ctx context.Context, pingSource *sourcesv1.PingSource, opts v1.UpdateOptions) (*sourcesv1.PingSource, error) { +func (c *FakePingSources) UpdateStatus(ctx context.Context, pingSource *v1.PingSource, opts metav1.UpdateOptions) (*v1.PingSource, error) { obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(pingsourcesResource, "status", c.ns, pingSource), &sourcesv1.PingSource{}) + Invokes(testing.NewUpdateSubresourceAction(pingsourcesResource, "status", c.ns, pingSource), &v1.PingSource{}) if obj == nil { return nil, err } - return obj.(*sourcesv1.PingSource), err + return obj.(*v1.PingSource), err } // Delete takes name of the pingSource and deletes it. Returns an error if one occurs. -func (c *FakePingSources) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { +func (c *FakePingSources) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(pingsourcesResource, c.ns, name, opts), &sourcesv1.PingSource{}) + Invokes(testing.NewDeleteActionWithOptions(pingsourcesResource, c.ns, name, opts), &v1.PingSource{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakePingSources) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { +func (c *FakePingSources) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { action := testing.NewDeleteCollectionAction(pingsourcesResource, c.ns, listOpts) - _, err := c.Fake.Invokes(action, &sourcesv1.PingSourceList{}) + _, err := c.Fake.Invokes(action, &v1.PingSourceList{}) return err } // Patch applies the patch and returns the patched pingSource. -func (c *FakePingSources) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *sourcesv1.PingSource, err error) { +func (c *FakePingSources) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.PingSource, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(pingsourcesResource, c.ns, name, pt, data, subresources...), &sourcesv1.PingSource{}) + Invokes(testing.NewPatchSubresourceAction(pingsourcesResource, c.ns, name, pt, data, subresources...), &v1.PingSource{}) if obj == nil { return nil, err } - return obj.(*sourcesv1.PingSource), err + return obj.(*v1.PingSource), err } diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1/fake/fake_sinkbinding.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1/fake/fake_sinkbinding.go index 434269594..bdac441a8 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1/fake/fake_sinkbinding.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1/fake/fake_sinkbinding.go @@ -21,13 +21,12 @@ package fake import ( "context" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" - sourcesv1 "knative.dev/eventing/pkg/apis/sources/v1" + v1 "knative.dev/eventing/pkg/apis/sources/v1" ) // FakeSinkBindings implements SinkBindingInterface @@ -36,25 +35,25 @@ type FakeSinkBindings struct { ns string } -var sinkbindingsResource = schema.GroupVersionResource{Group: "sources.knative.dev", Version: "v1", Resource: "sinkbindings"} +var sinkbindingsResource = v1.SchemeGroupVersion.WithResource("sinkbindings") -var sinkbindingsKind = schema.GroupVersionKind{Group: "sources.knative.dev", Version: "v1", Kind: "SinkBinding"} +var sinkbindingsKind = v1.SchemeGroupVersion.WithKind("SinkBinding") // Get takes name of the sinkBinding, and returns the corresponding sinkBinding object, and an error if there is any. -func (c *FakeSinkBindings) Get(ctx context.Context, name string, options v1.GetOptions) (result *sourcesv1.SinkBinding, err error) { +func (c *FakeSinkBindings) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.SinkBinding, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(sinkbindingsResource, c.ns, name), &sourcesv1.SinkBinding{}) + Invokes(testing.NewGetAction(sinkbindingsResource, c.ns, name), &v1.SinkBinding{}) if obj == nil { return nil, err } - return obj.(*sourcesv1.SinkBinding), err + return obj.(*v1.SinkBinding), err } // List takes label and field selectors, and returns the list of SinkBindings that match those selectors. -func (c *FakeSinkBindings) List(ctx context.Context, opts v1.ListOptions) (result *sourcesv1.SinkBindingList, err error) { +func (c *FakeSinkBindings) List(ctx context.Context, opts metav1.ListOptions) (result *v1.SinkBindingList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(sinkbindingsResource, sinkbindingsKind, c.ns, opts), &sourcesv1.SinkBindingList{}) + Invokes(testing.NewListAction(sinkbindingsResource, sinkbindingsKind, c.ns, opts), &v1.SinkBindingList{}) if obj == nil { return nil, err @@ -64,8 +63,8 @@ func (c *FakeSinkBindings) List(ctx context.Context, opts v1.ListOptions) (resul if label == nil { label = labels.Everything() } - list := &sourcesv1.SinkBindingList{ListMeta: obj.(*sourcesv1.SinkBindingList).ListMeta} - for _, item := range obj.(*sourcesv1.SinkBindingList).Items { + list := &v1.SinkBindingList{ListMeta: obj.(*v1.SinkBindingList).ListMeta} + for _, item := range obj.(*v1.SinkBindingList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -74,69 +73,69 @@ func (c *FakeSinkBindings) List(ctx context.Context, opts v1.ListOptions) (resul } // Watch returns a watch.Interface that watches the requested sinkBindings. -func (c *FakeSinkBindings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeSinkBindings) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(sinkbindingsResource, c.ns, opts)) } // Create takes the representation of a sinkBinding and creates it. Returns the server's representation of the sinkBinding, and an error, if there is any. -func (c *FakeSinkBindings) Create(ctx context.Context, sinkBinding *sourcesv1.SinkBinding, opts v1.CreateOptions) (result *sourcesv1.SinkBinding, err error) { +func (c *FakeSinkBindings) Create(ctx context.Context, sinkBinding *v1.SinkBinding, opts metav1.CreateOptions) (result *v1.SinkBinding, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(sinkbindingsResource, c.ns, sinkBinding), &sourcesv1.SinkBinding{}) + Invokes(testing.NewCreateAction(sinkbindingsResource, c.ns, sinkBinding), &v1.SinkBinding{}) if obj == nil { return nil, err } - return obj.(*sourcesv1.SinkBinding), err + return obj.(*v1.SinkBinding), err } // Update takes the representation of a sinkBinding and updates it. Returns the server's representation of the sinkBinding, and an error, if there is any. -func (c *FakeSinkBindings) Update(ctx context.Context, sinkBinding *sourcesv1.SinkBinding, opts v1.UpdateOptions) (result *sourcesv1.SinkBinding, err error) { +func (c *FakeSinkBindings) Update(ctx context.Context, sinkBinding *v1.SinkBinding, opts metav1.UpdateOptions) (result *v1.SinkBinding, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(sinkbindingsResource, c.ns, sinkBinding), &sourcesv1.SinkBinding{}) + Invokes(testing.NewUpdateAction(sinkbindingsResource, c.ns, sinkBinding), &v1.SinkBinding{}) if obj == nil { return nil, err } - return obj.(*sourcesv1.SinkBinding), err + return obj.(*v1.SinkBinding), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeSinkBindings) UpdateStatus(ctx context.Context, sinkBinding *sourcesv1.SinkBinding, opts v1.UpdateOptions) (*sourcesv1.SinkBinding, error) { +func (c *FakeSinkBindings) UpdateStatus(ctx context.Context, sinkBinding *v1.SinkBinding, opts metav1.UpdateOptions) (*v1.SinkBinding, error) { obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(sinkbindingsResource, "status", c.ns, sinkBinding), &sourcesv1.SinkBinding{}) + Invokes(testing.NewUpdateSubresourceAction(sinkbindingsResource, "status", c.ns, sinkBinding), &v1.SinkBinding{}) if obj == nil { return nil, err } - return obj.(*sourcesv1.SinkBinding), err + return obj.(*v1.SinkBinding), err } // Delete takes name of the sinkBinding and deletes it. Returns an error if one occurs. -func (c *FakeSinkBindings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { +func (c *FakeSinkBindings) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(sinkbindingsResource, c.ns, name, opts), &sourcesv1.SinkBinding{}) + Invokes(testing.NewDeleteActionWithOptions(sinkbindingsResource, c.ns, name, opts), &v1.SinkBinding{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeSinkBindings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { +func (c *FakeSinkBindings) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { action := testing.NewDeleteCollectionAction(sinkbindingsResource, c.ns, listOpts) - _, err := c.Fake.Invokes(action, &sourcesv1.SinkBindingList{}) + _, err := c.Fake.Invokes(action, &v1.SinkBindingList{}) return err } // Patch applies the patch and returns the patched sinkBinding. -func (c *FakeSinkBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *sourcesv1.SinkBinding, err error) { +func (c *FakeSinkBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.SinkBinding, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(sinkbindingsResource, c.ns, name, pt, data, subresources...), &sourcesv1.SinkBinding{}) + Invokes(testing.NewPatchSubresourceAction(sinkbindingsResource, c.ns, name, pt, data, subresources...), &v1.SinkBinding{}) if obj == nil { return nil, err } - return obj.(*sourcesv1.SinkBinding), err + return obj.(*v1.SinkBinding), err } diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta2/fake/fake_pingsource.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta2/fake/fake_pingsource.go index 8275dfc1c..205baf6ee 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta2/fake/fake_pingsource.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta2/fake/fake_pingsource.go @@ -23,7 +23,6 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -36,9 +35,9 @@ type FakePingSources struct { ns string } -var pingsourcesResource = schema.GroupVersionResource{Group: "sources.knative.dev", Version: "v1beta2", Resource: "pingsources"} +var pingsourcesResource = v1beta2.SchemeGroupVersion.WithResource("pingsources") -var pingsourcesKind = schema.GroupVersionKind{Group: "sources.knative.dev", Version: "v1beta2", Kind: "PingSource"} +var pingsourcesKind = v1beta2.SchemeGroupVersion.WithKind("PingSource") // Get takes name of the pingSource, and returns the corresponding pingSource object, and an error if there is any. func (c *FakePingSources) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.PingSource, err error) { diff --git a/vendor/modules.txt b/vendor/modules.txt index 78a343604..b16ac7767 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -968,7 +968,7 @@ k8s.io/utils/net k8s.io/utils/pointer k8s.io/utils/strings/slices k8s.io/utils/trace -# knative.dev/eventing v0.38.1-0.20231003175114-d1c3f1524125 +# knative.dev/eventing v0.38.1-0.20231004060457-ce67d85556b7 ## explicit; go 1.19 knative.dev/eventing/pkg/adapter/v2 knative.dev/eventing/pkg/adapter/v2/test