feat(mail): add MailSender port and explicit provider selection

This commit is contained in:
shira committed 2026-10-06 00:38:58 +03:00
1 parent e7d0d92ef9
commit 6153887eb5
26 files changed
+1253 -29

No files matched your search

+9 -1
View File
@@ -19,10 +19,18 @@ import (
redisadapter "lincodex/backend/internal/adapter/secondary/redis"
"lincodex/backend/internal/adapter/secondary/seaweedfs"
"lincodex/backend/internal/port/inbound"
"lincodex/backend/internal/port/outbound"
"lincodex/backend/internal/usecase/health"
)
func initialize(ctx context.Context, config config.Config, logger *slog.Logger) (*Application, func(), error) {
// initialize receives the mail sender that start selected, so an unusable
// EMAIL_PROVIDER fails before any dependency is created.
func initialize(
ctx context.Context,
config config.Config,
logger *slog.Logger,
mailSender outbound.MailSender,
) (*Application, func(), error) {
wire.Build(
wire.NewSet(
postgres.NewHealthChecker,