@@ -5,24 +5,24 @@ import (
5
5
"fmt"
6
6
"os"
7
7
8
- cloudevents "github.com/cloudevents/sdk-go/v2"
8
+ event "github.com/cloudevents/sdk-go/v2"
9
9
)
10
10
11
11
// Handle a CloudEvent.
12
12
// Supported Function signatures:
13
- // func()
14
- // func() error
15
- // func(context.Context)
16
- // func(context.Context) error
17
- // func(cloudevents .Event)
18
- // func(cloudevents .Event) error
19
- // func(context.Context, cloudevents .Event)
20
- // func(context.Context, cloudevents .Event) error
21
- // func(cloudevents .Event, *cloudevents.EventResponse)
22
- // func(cloudevents .Event, *cloudevents.EventResponse) error
23
- // func(context.Context, cloudevents .Event, *cloudevents.EventResponse)
24
- // func(context.Context, cloudevents .Event, *cloudevents.EventResponse) error
25
- func Handle (ctx context.Context , event cloudevents .Event ) error {
13
+ // * func()
14
+ // * func() error
15
+ // * func(context.Context)
16
+ // * func(context.Context) error
17
+ // * func(event .Event)
18
+ // * func(event .Event) error
19
+ // * func(context.Context, event .Event)
20
+ // * func(context.Context, event .Event) error
21
+ // * func(event .Event) *event.Event
22
+ // * func(event .Event) (*event.Event, error)
23
+ // * func(context.Context, event .Event) *event.Event
24
+ // * func(context.Context, event .Event) (*event.Event, error)
25
+ func Handle (ctx context.Context , event event .Event ) error {
26
26
if err := event .Validate (); err != nil {
27
27
fmt .Fprintf (os .Stderr , "invalid event received. %v" , err )
28
28
return err
0 commit comments