Documentation
¶
Index ¶
- type EmailTemplate
- type InviteEmail
- type MockConfig
- type NotificationsConfig
- type NotificationsService
- func NewMockNotificationsService(config MockConfig) NotificationsService
- func NewNotificationsService(logger log.Logger, config NotificationsConfig, templates TemplateRepository) (NotificationsService, error)
- func NewSmtpNotificationsService(logger log.Logger, config SMTPConfig, templates TemplateRepository) NotificationsService
- type SMTPConfig
- type Template
- type TemplateRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EmailTemplate ¶
type InviteEmail ¶
type InviteEmail struct {
Subject string
AcceptInvitationURL string
Inviter client.Identity
Tenant authn.Tenant
}
func NewInviteEmail ¶
func (*InviteEmail) EmailSubject ¶
func (i *InviteEmail) EmailSubject() string
func (*InviteEmail) TemplateName ¶
func (i *InviteEmail) TemplateName() string
type MockConfig ¶
type MockConfig struct {
From string
}
type NotificationsConfig ¶
type NotificationsConfig struct {
SMTP *SMTPConfig
Mock *MockConfig
}
type NotificationsService ¶
type NotificationsService interface {
SendEmail(to string, email EmailTemplate) error
}
func NewMockNotificationsService ¶
func NewMockNotificationsService(config MockConfig) NotificationsService
func NewNotificationsService ¶
func NewNotificationsService(logger log.Logger, config NotificationsConfig, templates TemplateRepository) (NotificationsService, error)
func NewSmtpNotificationsService ¶
func NewSmtpNotificationsService(logger log.Logger, config SMTPConfig, templates TemplateRepository) NotificationsService
type SMTPConfig ¶
type TemplateRepository ¶
type TemplateRepository interface {
Text(values Template) (string, error)
HTML(values Template) (string, error)
}
func NewTemplateRepository ¶
func NewTemplateRepository(logger log.Logger) (TemplateRepository, error)
Click to show internal directories.
Click to hide internal directories.