···
// JetstreamEvent represents an event from the Jetstream firehose
// Jetstream documentation: https://docs.bsky.app/docs/advanced-guides/jetstream
type JetstreamEvent struct {
18
-
Did string `json:"did"`
19
-
TimeUS int64 `json:"time_us"`
20
-
Kind string `json:"kind"` // "account", "commit", "identity"
21
-
Account *AccountEvent `json:"account,omitempty"`
18
+
Did string `json:"did"`
19
+
TimeUS int64 `json:"time_us"`
20
+
Kind string `json:"kind"` // "account", "commit", "identity"
21
+
Account *AccountEvent `json:"account,omitempty"`
Identity *IdentityEvent `json:"identity,omitempty"`
23
+
Commit *CommitEvent `json:"commit,omitempty"`
type AccountEvent struct {
···
Handle string `json:"handle"`
Time string `json:"time"`
40
+
// CommitEvent represents a record commit from Jetstream
41
+
type CommitEvent struct {
42
+
Rev string `json:"rev"`
43
+
Operation string `json:"operation"` // "create", "update", "delete"
44
+
Collection string `json:"collection"`
45
+
RKey string `json:"rkey"`
46
+
Record map[string]interface{} `json:"record,omitempty"`
47
+
CID string `json:"cid,omitempty"`
// UserEventConsumer consumes user-related events from Jetstream