2024-11-03 11:20:52 +00:00
|
|
|
package initialize
|
|
|
|
|
|
|
|
import (
|
2025-02-24 17:58:46 +00:00
|
|
|
"gitea.pena/PenaSide/customer/pkg/customer_clients"
|
|
|
|
"gitea.pena/SQuiz/common/clients"
|
2024-11-03 11:20:52 +00:00
|
|
|
"go.uber.org/zap"
|
|
|
|
)
|
|
|
|
|
|
|
|
type Clients struct {
|
|
|
|
MailClient *clients.SmtpClient
|
|
|
|
CustomerClient *customer_clients.CustomersClient
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewClients(cfg Config, logger *zap.Logger) *Clients {
|
|
|
|
return &Clients{
|
|
|
|
MailClient: clients.NewSmtpClient(clients.Deps{
|
2025-02-25 08:14:51 +00:00
|
|
|
SmtpSender: cfg.Sender,
|
|
|
|
ApiKey: cfg.ApiKey,
|
|
|
|
SmtpApiUrl: cfg.ApiUrl,
|
2024-11-03 11:20:52 +00:00
|
|
|
}),
|
|
|
|
CustomerClient: customer_clients.NewCustomersClient(customer_clients.CustomersClientDeps{
|
|
|
|
Logger: logger,
|
2025-02-25 08:14:51 +00:00
|
|
|
CustomerServiceHost: cfg.CustomerMicroserviceRPCURL,
|
2024-11-03 11:20:52 +00:00
|
|
|
}),
|
|
|
|
}
|
|
|
|
}
|