MSP-1071 update locator

This commit is contained in:
john committed 2022-10-12 09:12:38 +03:00
1 parent 56e38174bf
commit 447d33747a
2 files changed
+15 -12

No files matched your search

+5 -6
View File
@@ -3,18 +3,17 @@ package assembly
import (
"context"
"github.com/integration-system/isp-kit/dbrx"
"github.com/integration-system/isp-kit/dbx"
"github.com/integration-system/isp-kit/http/httpcli"
"github.com/integration-system/isp-kit/http/httpclix"
"msp-admin-service/conf"
"github.com/integration-system/isp-kit/app"
"github.com/integration-system/isp-kit/bootstrap"
"github.com/integration-system/isp-kit/cluster"
"github.com/integration-system/isp-kit/dbrx"
"github.com/integration-system/isp-kit/dbx"
"github.com/integration-system/isp-kit/grpc"
"github.com/integration-system/isp-kit/http/httpcli"
"github.com/integration-system/isp-kit/http/httpclix"
"github.com/integration-system/isp-kit/log"
"github.com/pkg/errors"
"msp-admin-service/conf"
)
type Assembly struct {
+10 -6
View File
@@ -2,16 +2,15 @@ package assembly
import (
"github.com/integration-system/isp-kit/db"
"github.com/integration-system/isp-kit/grpc/endpoint"
"github.com/integration-system/isp-kit/grpc/isp"
"github.com/integration-system/isp-kit/http/httpcli"
"github.com/integration-system/isp-kit/log"
"msp-admin-service/conf"
"msp-admin-service/controller"
"msp-admin-service/repository"
"msp-admin-service/service"
"github.com/integration-system/isp-kit/grpc/endpoint"
"github.com/integration-system/isp-kit/grpc/isp"
"msp-admin-service/routes"
"msp-admin-service/service"
)
type Locator struct {
@@ -37,8 +36,13 @@ func (l Locator) Handler(cfg conf.Remote) isp.BackendServiceServer {
tokenService := service.NewToken(tokenRepo, cfg.ExpireSec)
sudirService := service.NewSudir(cfg.SudirAuth, sudirRepo, roleRepo)
userService := service.NewUser(userRepo, roleRepo, l.logger)
authService := service.NewAuth(userRepo, tokenService, sudirService, l.logger)
authService := service.NewAuth(userRepo,
tokenService,
sudirService,
l.logger,
cfg.AntiBruteforce.DelayLoginRequestInSec,
cfg.AntiBruteforce.MaxInFlightLoginRequests,
)
userController := controller.NewUser(userService)
customizationController := controller.NewCustomization(cfg.UiDesign)
authController := controller.NewAuth(authService, l.logger)