amazon events published as server side event

This commit is contained in:
2026-03-03 22:08:58 -07:00
parent 0a03b2e62e
commit 22e7b003f6
9 changed files with 186 additions and 35 deletions
+8
View File
@@ -124,6 +124,14 @@ func (q *Queue) Send(ctx context.Context, e Event) error {
return nil
}
func StandardEvent(acctID int64, eventType string) Event {
return Event{
AccountID: acctID,
Type: eventType,
Data: []byte(fmt.Sprintf(`{"eventType": %q}`, eventType)),
}
}
func (e *Event) Write(w http.ResponseWriter) {
fmt.Fprintf(
w,