amazon events published as server side event

This commit is contained in:
2026-08-20 00:35:13 -06:00
parent 16ecf2dc66
commit 4748eda41e
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,