notification

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳