| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
package v1beta1 |
| 20 |
|
| 21 |
import ( |
| 22 |
context "context" |
| 23 |
|
| 24 |
eventsv1beta1 "k8s.io/api/events/v1beta1" |
| 25 |
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" |
| 26 |
types "k8s.io/apimachinery/pkg/types" |
| 27 |
watch "k8s.io/apimachinery/pkg/watch" |
| 28 |
applyconfigurationseventsv1beta1 "k8s.io/client-go/applyconfigurations/events/v1beta1" |
| 29 |
gentype "k8s.io/client-go/gentype" |
| 30 |
scheme "k8s.io/client-go/kubernetes/scheme" |
| 31 |
) |
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
type EventsGetter interface { |
| 36 |
Events(namespace string) EventInterface |
| 37 |
} |
| 38 |
|
| 39 |
|
| 40 |
type EventInterface interface { |
| 41 |
Create(ctx context.Context, event *eventsv1beta1.Event, opts v1.CreateOptions) (*eventsv1beta1.Event, error) |
| 42 |
Update(ctx context.Context, event *eventsv1beta1.Event, opts v1.UpdateOptions) (*eventsv1beta1.Event, error) |
| 43 |
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error |
| 44 |
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error |
| 45 |
Get(ctx context.Context, name string, opts v1.GetOptions) (*eventsv1beta1.Event, error) |
| 46 |
List(ctx context.Context, opts v1.ListOptions) (*eventsv1beta1.EventList, error) |
| 47 |
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) |
| 48 |
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *eventsv1beta1.Event, err error) |
| 49 |
Apply(ctx context.Context, event *applyconfigurationseventsv1beta1.EventApplyConfiguration, opts v1.ApplyOptions) (result *eventsv1beta1.Event, err error) |
| 50 |
EventExpansion |
| 51 |
} |
| 52 |
|
| 53 |
|
| 54 |
type events struct { |
| 55 |
*gentype.ClientWithListAndApply[*eventsv1beta1.Event, *eventsv1beta1.EventList, *applyconfigurationseventsv1beta1.EventApplyConfiguration] |
| 56 |
} |
| 57 |
|
| 58 |
|
| 59 |
func newEvents(c *EventsV1beta1Client, namespace string) *events { |
| 60 |
return &events{ |
| 61 |
gentype.NewClientWithListAndApply[*eventsv1beta1.Event, *eventsv1beta1.EventList, *applyconfigurationseventsv1beta1.EventApplyConfiguration]( |
| 62 |
"events", |
| 63 |
c.RESTClient(), |
| 64 |
scheme.ParameterCodec, |
| 65 |
namespace, |
| 66 |
func() *eventsv1beta1.Event { return &eventsv1beta1.Event{} }, |
| 67 |
func() *eventsv1beta1.EventList { return &eventsv1beta1.EventList{} }, |
| 68 |
gentype.PrefersProtobuf[*eventsv1beta1.Event](), |
| 69 |
), |
| 70 |
} |
| 71 |
} |