From b718162cd439fd67487b695f48d4a9f7f90a4469 Mon Sep 17 00:00:00 2001 From: Nguyen Minh Date: Fri, 23 Sep 2022 10:13:14 +0700 Subject: [PATCH] jestream-push-notification --- jestream/config.go | 8 ++++++++ jestream/notification.go | 8 ++++++++ model/notification_request.go | 14 ++++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 jestream/config.go create mode 100644 jestream/notification.go create mode 100644 model/notification_request.go diff --git a/jestream/config.go b/jestream/config.go new file mode 100644 index 0000000..41d28bb --- /dev/null +++ b/jestream/config.go @@ -0,0 +1,8 @@ +package jestream + +// StreamConfig ... +var StreamConfig = struct { + Notification string +}{ + Notification: "Service_Notification", +} diff --git a/jestream/notification.go b/jestream/notification.go new file mode 100644 index 0000000..fe48a8b --- /dev/null +++ b/jestream/notification.go @@ -0,0 +1,8 @@ +package jestream + +// SubjectNotification ... +var SubjectNotification = struct { + PushNotifications string +}{ + PushNotifications: "selly.pull.notification.push_notifications", +} diff --git a/model/notification_request.go b/model/notification_request.go new file mode 100644 index 0000000..ed2c36c --- /dev/null +++ b/model/notification_request.go @@ -0,0 +1,14 @@ +package model + +// PayloadPushNotification ... +type PayloadPushNotification struct { + User string `json:"user"` + Type string `json:"type"` + TargetId string `json:"targetId"` + IsFromAdmin bool `json:"isFromAdmin"` + Category string `json:"category"` + Options struct { + Title string `json:"title"` + Content string `json:"content"` + } `json:"options"` +}