Skip to content

Commit cfcc51c

Browse files
authored
Merge pull request #113 from tigrisdata/object-notifications
Object notifications doc fixes
2 parents 2f563b4 + bbff34a commit cfcc51c

File tree

4 files changed

+11
-13
lines changed

4 files changed

+11
-13
lines changed

docs/buckets/object_notifications.md renamed to docs/buckets/object-notifications.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ Tigris object notifications allow you to receive notifications via a webhook.
44
These events allow you to keep track of when objects are created, updated, or
55
deleted for a specific bucket.
66

7-
## Enable Object Notifications via Console (TODO)
7+
## Enable Object Notifications via Tigris Dashboard
88

99
To enable object notifications, you need to set up a webhook in the Tigris
10-
Console. This can be done in `Settings` for the bucket.
10+
Dashboard. This can be done in `Settings` for the bucket.
1111

1212
Here's a short video demonstration on enabling object notifications:
1313

@@ -19,12 +19,12 @@ Here's a short video demonstration on enabling object notifications:
1919

2020
Object notifications are delivered via a webhook, and obey the following rules:
2121

22-
- Tigris will make an HTTP POST post request to the webhook URL with the event
22+
- Tigris will make an HTTP POST request to the webhook URL with the event
2323
payload.
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/pricing/index.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,6 @@ storage.
157157

158158
</details>
159159

160-
### Events
161-
162160
<details>
163161
<summary>What is an event and how are they charged?</summary>
164162

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -467,11 +467,11 @@ func main() {
467467
## Webhook
468468

469469
Below is an example of how to use
470-
[webhook](/docs/buckets/object_notifications.md) with the AWS Go SDK.
470+
[webhook](/docs/buckets/object-notifications.md) with the AWS Go SDK.
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")

sidebars.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ const sidebars = {
6060
"buckets/cors",
6161
"buckets/custom-domain",
6262
"buckets/objects-expiration",
63-
"buckets/object_notifications",
63+
"buckets/object-notifications",
6464
],
6565
},
6666
{

0 commit comments

Comments
 (0)