amazon events published as server side event

This commit is contained in:
2026-08-19 23:19:41 -06:00
parent 6edd46d32a
commit 00eed86bb2
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,