Documentation ¶ Index ¶ Variables type Email func (n *Email) Send(customer models.Customer) error type Noop func (n *Noop) Send(customer models.Customer) error type Notifier func New(p Params) (Notifier, error) func NewEmail(logger *slog.Logger, cfg config.EmailNotifications) (Notifier, error) func NewNoop() Notifier type Params Constants ¶ This section is empty. Variables ¶ View Source var Module = fx.Module("notification", fx.Provide(New), ) Functions ¶ This section is empty. Types ¶ type Email ¶ type Email struct { Notifier // contains filtered or unexported fields } func (*Email) Send ¶ func (n *Email) Send(customer models.Customer) error type Noop ¶ type Noop struct { Notifier } func (*Noop) Send ¶ func (n *Noop) Send(customer models.Customer) error type Notifier ¶ type Notifier interface { Send(customer models.Customer) error } func New ¶ func New(p Params) (Notifier, error) func NewEmail ¶ func NewEmail(logger *slog.Logger, cfg config.EmailNotifications) (Notifier, error) func NewNoop ¶ func NewNoop() Notifier type Params ¶ type Params struct { fx.In Logger *slog.Logger Config *config.Config } Source Files ¶ View all Source files email.go module.go noop.go types.go Click to show internal directories. Click to hide internal directories.