Skip to content

Commit 4a35b3a

Browse files
committed
fix: Records to events
1 parent 2f563b4 commit 4a35b3a

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Object notifications are delivered via a webhook, and obey the following rules:
2424
- A `200` status code acknowledges the request was successful.
2525
- If a `200` status is not received, Tigris will retry for a maximum of 3 times
2626
before giving up and marking the notifications as sent.
27-
- If a webhook request takes longer than 5 seconds the request will be aborted
27+
- If a webhook request takes longer than 10 seconds the request will be aborted
2828
and retried.
2929

3030
## Webhook Authentication
@@ -60,7 +60,7 @@ Each notification will be a JSON object with the following fields:
6060

6161
| Property | Type | Description |
6262
| ------------ | ------ | ------------------------------------------------------------ |
63-
| Records | Array | An array of notification events |
63+
| events | Array | An array of notification events |
6464
| eventVersion | String | Version of the event structure |
6565
| eventSource | String | Source of the event |
6666
| eventName | String | Type of event (e.g., "OBJECT_CREATED_PUT", "OBJECT_DELETED") |
@@ -75,7 +75,7 @@ An example notification payload is:
7575

7676
```json
7777
{
78-
"Records": [
78+
"events": [
7979
{
8080
"eventVersion": "1",
8181
"eventSource": "tigris",

docs/sdks/s3/aws-go-sdk.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ Below is an example of how to use
471471

472472
```go
473473
type ObjectNotificationReq struct {
474-
Records []*ObjectNotificationEvent `json:"Records"`
474+
Events []*ObjectNotificationEvent `json:"events"`
475475
}
476476

477477
type ObjectNotificationEvent struct {
@@ -505,8 +505,8 @@ func eventReceiver(w http.ResponseWriter, r *http.Request) {
505505
}
506506

507507
fmt.Println("Events:")
508-
for _, record := range req.Records {
509-
fmt.Printf("time: %v, event: %v, bucket: %v, key: %v\n", record.EventTime, record.EventName, record.Bucket, record.Object.Key)
508+
for _, event := range req.Events {
509+
fmt.Printf("time: %v, event: %v, bucket: %v, key: %v\n", event.EventTime, event.EventName, event.Bucket, event.Object.Key)
510510
}
511511

512512
fmt.Fprint(w, "ok")

0 commit comments

Comments
 (0)