diff --git a/jestream/config.go b/jestream/config.go deleted file mode 100644 index 41d28bb..0000000 --- a/jestream/config.go +++ /dev/null @@ -1,8 +0,0 @@ -package jestream - -// StreamConfig ... -var StreamConfig = struct { - Notification string -}{ - Notification: "Service_Notification", -} diff --git a/jestream/notification.go b/jestream/notification.go deleted file mode 100644 index fe48a8b..0000000 --- a/jestream/notification.go +++ /dev/null @@ -1,8 +0,0 @@ -package jestream - -// SubjectNotification ... -var SubjectNotification = struct { - PushNotifications string -}{ - PushNotifications: "selly.pull.notification.push_notifications", -} diff --git a/model/notification_request.go b/js/model/selly.go similarity index 68% rename from model/notification_request.go rename to js/model/selly.go index ed2c36c..053a3be 100644 --- a/model/notification_request.go +++ b/js/model/selly.go @@ -1,10 +1,10 @@ -package model +package jsmodel -// PayloadPushNotification ... -type PayloadPushNotification struct { +// PushNotification ... +type PushNotification struct { User string `json:"user"` Type string `json:"type"` - TargetId string `json:"targetId"` + TargetID string `json:"targetId"` IsFromAdmin bool `json:"isFromAdmin"` Category string `json:"category"` Options struct { diff --git a/js/subject/config.go b/js/subject/config.go new file mode 100644 index 0000000..3f77205 --- /dev/null +++ b/js/subject/config.go @@ -0,0 +1,10 @@ +package jssubject + +var root = "js" + +// prefixes ... +var prefixes = struct { + Selly string +}{ + Selly: "selly", +} diff --git a/js/subject/selly.go b/js/subject/selly.go new file mode 100644 index 0000000..e6a344b --- /dev/null +++ b/js/subject/selly.go @@ -0,0 +1,19 @@ +package jssubject + +import ( + "fmt" +) + +// getSellyValue ... +func getSellyValue(val string) string { + return fmt.Sprintf("%s.%s.%s", root, prefixes.Selly, val) +} + +// Selly ... +var Selly = struct { + Stream string + PushNotification string +}{ + Stream: prefixes.Selly, + PushNotification: getSellyValue("push_notifications"), +}