2023-06-12 14:19:10 +00:00
|
|
|
package initialize
|
|
|
|
|
|
|
|
import (
|
2023-07-03 11:40:20 +00:00
|
|
|
"penahub.gitlab.yandexcloud.net/backend/verification/internal/client"
|
2024-05-26 15:32:07 +00:00
|
|
|
"penahub.gitlab.yandexcloud.net/backend/verification/internal/controllers/admin"
|
|
|
|
"penahub.gitlab.yandexcloud.net/backend/verification/internal/controllers/user"
|
2024-05-26 13:50:52 +00:00
|
|
|
"penahub.gitlab.yandexcloud.net/pena-services/customer/pkg/customer_clients"
|
2023-06-12 14:19:10 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type Controllers struct {
|
2024-05-26 15:32:07 +00:00
|
|
|
VerificationAdmin *admin.VerifyAdminController
|
|
|
|
VerificationUser *user.VerifyUserController
|
2023-06-12 14:19:10 +00:00
|
|
|
}
|
|
|
|
|
2024-05-26 13:50:52 +00:00
|
|
|
func NewControllers(reps *Repositories, telegram *client.Telegram, customer *customer_clients.CustomersClient) *Controllers {
|
2024-05-26 15:32:07 +00:00
|
|
|
return &Controllers{
|
|
|
|
VerificationAdmin: admin.NewVerificationAdminController(admin.VerifyAdminControllerDeps{
|
|
|
|
Repository: reps.Verification,
|
|
|
|
Customer: customer,
|
|
|
|
}),
|
|
|
|
VerificationUser: user.NewVerificationUserController(user.VerifyUserControllerDeps{
|
|
|
|
Repository: reps.Verification,
|
|
|
|
Telegram: telegram,
|
|
|
|
}),
|
|
|
|
}
|
2023-06-12 14:19:10 +00:00
|
|
|
}
|