ingest: add wire format for incoming messages

This commit is contained in:
2025-04-06 08:57:04 -04:00
parent 8d6dbcb970
commit 844ad98142
9 changed files with 320 additions and 0 deletions

13
twitch/eventsub.go Normal file
View File

@@ -0,0 +1,13 @@
package twitch
// EventSub is the wire format of incoming payloads from Twitch EventSub.
type EventSub[Event any] struct {
// Subscription is fields relating to the EventSub subscription itself.
Subscription Subscription `json:"subscription"`
// Event is the event payload.
Event Event `json:"event"`
}
// Subscription is the fields of an EventSub subscription
// which are relevant to Kaiyan.
type Subscription struct{}