Documentation ¶
Overview ¶
Package notification contains all the necessary code for communication with the notification service.
Index ¶
- type Configuration
- type Message
- func NewSpaceInvitationEmail(identityID string, spaceName string, inviterName string, roleNames string, ...) Message
- func NewTeamInvitationEmail(identityID string, teamName string, inviterName string, spaceName string, ...) Message
- func NewUserDeactivationEmail(identityID, email, deactivationDate string) Message
- func NewUserEmailUpdated(identityID string, custom map[string]interface{}) Message
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration interface {
GetNotificationServiceURL() string
}
type Message ¶
type Message struct { MessageID uuid.UUID // unique ID per event UserID *string Custom map[string]interface{} TargetID string MessageType string }
Message represents a new event of a Type for a Target performed by a User See helper constructors like NewUserEmailUpdated
func NewSpaceInvitationEmail ¶
func NewSpaceInvitationEmail(identityID string, spaceName string, inviterName string, roleNames string, acceptURL string) Message
NewSpaceInvitationEmail creates a Message for the notification service in order to send an invitation e-mail to a user
The following custom parameter values are required:
spaceName - the name of the space inviter - the name of the user sending the invitation roleNames - a comma-separated list of role names acceptToken - the unique acceptance token value
func NewTeamInvitationEmail ¶
func NewTeamInvitationEmail(identityID string, teamName string, inviterName string, spaceName string, acceptURL string) Message
NewTeamInvitationEmail creates a Message for the notification service in order to send an invitation e-mail to a user
The following custom parameter values are required:
teamName - the name of the team inviter - the name of the user sending the invitation spaceName - the name of the space to which the team belongs acceptToken - the unique acceptance token value
func NewUserDeactivationEmail ¶
NewUserDeactivationEmail is a helper constructor which returns a message to inform the user that her account will be deactivated soon
func NewUserEmailUpdated ¶
NewUserEmailUpdated is a helper constructor which returns a Message with contents of the notification that would be sent out.