Files

37 lines
1.1 KiB
Go
Raw Permalink Normal View History

2026-04-13 08:14:09 +03:00
package main
// Домен уведомлений.
// Этим файлом владеет команда уведомлений.
//
// Что внутри: отправка уведомлений, шаблоны, каналы доставки.
// Что НЕ знает: как устроена авторизация, как устроены профили внутри.
import "go.uber.org/fx"
var NotificationModule = fx.Module("notification",
fx.Provide(
newNotificationRepo,
newNotificationService,
),
)
// --- NotificationRepo ---
type notificationRepo struct{ db DB }
func newNotificationRepo(db DB) NotificationRepository {
return &notificationRepo{db: db}
}
// --- NotificationService ---
type notificationServiceImpl struct {
notificationRepo NotificationRepository
userService UserService
events EventBus
}
func newNotificationService(notificationRepo NotificationRepository, userService UserService, events EventBus) NotificationService {
return &notificationServiceImpl{notificationRepo: notificationRepo, userService: userService, events: events}
}