customer/internal/initialize/services.go

27 lines
543 B
Go
Raw Normal View History

2023-05-16 01:12:07 +00:00
package initialize
import (
2023-05-17 20:27:09 +00:00
"go.uber.org/zap"
"penahub.gitlab.yandexcloud.net/pena-services/customer/internal/service/account"
2023-05-16 01:12:07 +00:00
)
type ServicesDeps struct {
2023-05-17 20:27:09 +00:00
Logger *zap.Logger
2023-05-16 01:12:07 +00:00
Repositories *Repositories
Clients *Clients
}
type Services struct {
2023-05-17 20:27:09 +00:00
AccountService *account.Service
2023-05-16 01:12:07 +00:00
}
func NewServices(deps *ServicesDeps) *Services {
2023-05-17 20:27:09 +00:00
return &Services{
AccountService: account.New(&account.Deps{
Logger: deps.Logger,
Repository: deps.Repositories.AccountRepository,
AuthClient: deps.Clients.AuthClient,
2023-05-17 20:27:09 +00:00
}),
}
2023-05-16 01:12:07 +00:00
}