-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathnotifier.go
31 lines (27 loc) · 1.09 KB
/
notifier.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package domain
type NotificationMessages struct {
ExpirationReminder string `mapstructure:"expiration_reminder"`
AppealApproved string `mapstructure:"appeal_approved"`
AppealRejected string `mapstructure:"appeal_rejected"`
AccessRevoked string `mapstructure:"access_revoked"`
ApproverNotification string `mapstructure:"approver_notification"`
OthersAppealApproved string `mapstructure:"others_appeal_approved"`
GrantOwnerChanged string `mapstructure:"grant_owner_changed"`
}
const (
NotificationTypeExpirationReminder = "ExpirationReminder"
NotificationTypeAppealApproved = "AppealApproved"
NotificationTypeOnBehalfAppealApproved = "OnBehalfAppealApproved"
NotificationTypeAppealRejected = "AppealRejected"
NotificationTypeAccessRevoked = "AccessRevoked"
NotificationTypeApproverNotification = "ApproverNotification"
NotificationTypeGrantOwnerChanged = "GrantOwnerChanged"
)
type NotificationMessage struct {
Type string
Variables map[string]interface{}
}
type Notification struct {
User string
Message NotificationMessage
}