Versions in this module Expand all Collapse all v0 v0.4.0 Jun 19, 2026 Changes in this version + const ChannelEmail + const ChannelSMS + const ChannelWhatsapp + const StatusFailed + const StatusPending + const StatusSent + const Version + type CreateEventTriggerInput struct + BodyTemplate string + Channel string + Event string + Namespace string + RecipientTemplate string + Sender *string + SubjectTemplate *string + type EventTrigger struct + BodyTemplate string + Channel string + Enabled bool + Event string + ID string + Namespace string + RecipientTemplate string + Sender string + SubjectTemplate string + type MockProvider struct + ShouldFail bool + func (m *MockProvider) Send(ctx context.Context, n *Notification) error + type Module struct + func NewModule(provider Provider) *Module + func (m *Module) CancelScheduledNotification(ctx context.Context, id string) (bool, error) + func (m *Module) CreateEventTrigger(ctx context.Context, input CreateEventTriggerInput) (*EventTrigger, error) + func (m *Module) DeleteEventTrigger(ctx context.Context, id string) (bool, error) + func (m *Module) FieldResolvers() map[string]any + func (m *Module) ID() string + func (m *Module) Init(ctx context.Context, rt mdk.Runtime) error + func (m *Module) ListEventTriggers(ctx context.Context) ([]*EventTrigger, error) + func (m *Module) ListNotifications(ctx context.Context, recipient *string) ([]*Notification, error) + func (m *Module) ListScheduledNotifications(ctx context.Context) ([]*ScheduledNotification, error) + func (m *Module) Models() []any + func (m *Module) Mutations() map[string]any + func (m *Module) Queries() map[string]any + func (m *Module) Repo() *Repository + func (m *Module) Routes() []mdk.Route + func (m *Module) ScheduleNotification(ctx context.Context, input ScheduleNotificationInput) (*ScheduledNotification, error) + func (m *Module) SendNotification(ctx context.Context, input any) (any, error) + func (m *Module) SendNotificationStep(sCtx mdk.StepContext) mdk.StepResult + func (m *Module) Shutdown(ctx context.Context) error + type MultiChannelRoutingProvider struct + func NewMultiChannelRoutingProvider(email, whatsapp Provider) *MultiChannelRoutingProvider + func (m *MultiChannelRoutingProvider) Send(ctx context.Context, n *Notification) error + type Notification struct + Body string + Channel NotificationChannel + CreatedAt time.Time + DeletedAt gorm.DeletedAt + ID string + Recipient string + Sender string + Status NotificationStatus + Subject string + UpdatedAt time.Time + type NotificationChannel string + type NotificationStatus string + type Provider interface + Send func(ctx context.Context, n *Notification) error + type Repository struct + func NewRepository(database *gorm.DB) *Repository + func (r *Repository) GetByID(ctx context.Context, id string) (*Notification, error) + func (r *Repository) List(ctx context.Context, recipient string) ([]*Notification, error) + func (r *Repository) Save(ctx context.Context, n *Notification) error + type SMTPConfig struct + From string + Host string + Password string + Port int + Username string + type SMTPProvider struct + func NewSMTPProvider(defaultConfig SMTPConfig, senders map[string]SMTPConfig) *SMTPProvider + func (s *SMTPProvider) Send(ctx context.Context, n *Notification) error + type ScheduleNotificationInput struct + Body string + Channel string + CronExpression *string + Recipient string + ScheduledAt time.Time + Sender *string + Subject *string + type ScheduledNotification struct + Body string + Channel string + CreatedAt time.Time + CronExpression string + ID string + LastRunAt *time.Time + Recipient string + ScheduledAt time.Time + Sender string + Status string + Subject string + UpdatedAt time.Time + type TwilioWhatsappConfig struct + AccountSID string + AuthToken string + From string + type TwilioWhatsappProvider struct + func NewTwilioWhatsappProvider(defaultConfig TwilioWhatsappConfig, senders map[string]TwilioWhatsappConfig) *TwilioWhatsappProvider + func (w *TwilioWhatsappProvider) Send(ctx context.Context, n *Notification) error