Documentation ¶
Index ¶
- Constants
- Variables
- type NotifiableUser
- type NotificationProvider
- type NovuNotification
- type NovuProvider
- func (np *NovuProvider) FillTemplate(workflowId, template string, replace map[string]string) (string, error)
- func (np *NovuProvider) LoadEmailBody(workflowId string) (string, error)
- func (np *NovuProvider) SendNotification(ctx context.Context, notification *NovuNotification, span opentracing.Span) error
Constants ¶
View Source
const ( WorkflowIdTestFlow = "test-workflow" WorkflowIdOrgOwnerUpdateEmail = "org-owner-update-email" WorkflowIdOrgOwnerUpdateAppNotification = "org-owner-update-in-app-notification" WorkflowInvoicePaid = "invoice-paid" WorkflowInvoiceReadyWithPaymentLink = "invoice-ready" WorkflowInvoiceReadyNoPaymentLink = "invoice-ready-nolink" WorkflowInvoiceVoided = "invoice-voided" WorkflowFailedWebhook = "failed-webhook" WorkflowReminderNotificationEmail = "reminder-notification-email" WorkflowReminderInAppNotification = "reminder-in-app-notification" )
View Source
const ( WorkflowIdOrgOwnerUpdateEmailSubject = "%s %s added you as an owner" WorkflowIdOrgOwnerUpdateAppNotificationSubject = "%s %s added you as an owner" WorkflowFailedWebhookSubject = "[Action Required] Webhook %s is offline" WorkflowInvoiceVoidedSubject = "Voided Invoice %s" WorkflowInvoicePaidSubject = "Paid Invoice %s from %s" WorkflowInvoiceReadySubject = "New invoice %s" WorkflowReminderNotificationSubject = "Reminder, %s" )
Variables ¶
View Source
var REQUIRED_TEMPLATE_VALUES = map[string][]string{ WorkflowIdOrgOwnerUpdateEmail: { "{{userFirstName}}", "{{actorFirstName}}", "{{actorLastName}}", "{{orgName}}", "{{orgLink}}", }, WorkflowFailedWebhook: { "{{userFirstName}}", "{{webhookName}}", "{{webhookUrl}}", }, WorkflowReminderNotificationEmail: { "{{reminderContent}}", "{{reminderCreatedAt}}", "{{orgName}}", "{{orgLink}}", }, }
Functions ¶
This section is empty.
Types ¶
type NotifiableUser ¶
type NotificationProvider ¶
type NotificationProvider interface {
SendNotification(ctx context.Context, notification *NovuNotification, span opentracing.Span) error
}
func NewNovuNotificationProvider ¶
func NewNovuNotificationProvider(log logger.Logger, apiKey string, s3Client aws_client.S3ClientI) NotificationProvider
type NovuNotification ¶
type NovuProvider ¶
func (*NovuProvider) FillTemplate ¶
func (*NovuProvider) LoadEmailBody ¶
func (np *NovuProvider) LoadEmailBody(workflowId string) (string, error)
func (*NovuProvider) SendNotification ¶
func (np *NovuProvider) SendNotification(ctx context.Context, notification *NovuNotification, span opentracing.Span) error
Click to show internal directories.
Click to hide internal directories.