notification

package
v0.0.0-...-2d73068 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2020 License: Apache-2.0 Imports: 2 Imported by: 4

Documentation

Overview

Package notification contains all the necessary code for communication with the notification service.

Index

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

func NewUserDeactivationEmail(identityID, email, deactivationDate string) Message

NewUserDeactivationEmail is a helper constructor which returns a message to inform the user that her account will be deactivated soon

func NewUserEmailUpdated

func NewUserEmailUpdated(identityID string, custom map[string]interface{}) Message

NewUserEmailUpdated is a helper constructor which returns a Message with contents of the notification that would be sent out.

func (Message) String

func (m Message) String() string

Directories

Path Synopsis
Package service encapsulates the business logic for notification service
Package service encapsulates the business logic for notification service

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL