From 75067eb456e565b22e99ed319ca22797ba24f024 Mon Sep 17 00:00:00 2001 From: Bastian Beier Date: Mon, 23 Dec 2024 17:05:04 +0100 Subject: [PATCH] feat: Add SendEmailsEvent --- pkg/events/notifications.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 pkg/events/notifications.go diff --git a/pkg/events/notifications.go b/pkg/events/notifications.go new file mode 100644 index 00000000000..6a31479569a --- /dev/null +++ b/pkg/events/notifications.go @@ -0,0 +1,17 @@ +package events + +import ( + "encoding/json" +) + +// SendEmailsEvent instructs the notification service to send grouped emails +type SendEmailsEvent struct { + Interval string +} + +// Unmarshal to fulfill umarshaller interface +func (SendEmailsEvent) Unmarshal(v []byte) (interface{}, error) { + e := SendEmailsEvent{} + err := json.Unmarshal(v, &e) + return e, err +}