/
wire_gen.go
84 lines (70 loc) · 4.46 KB
/
wire_gen.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
// Code generated by Wire. DO NOT EDIT.
//go:generate go run github.com/google/wire/cmd/wire
//go:build !wireinject
// +build !wireinject
package providers
import (
"github.com/ZupIT/horusec-devkit/pkg/services/broker"
config2 "github.com/ZupIT/horusec-devkit/pkg/services/broker/config"
"github.com/ZupIT/horusec-devkit/pkg/services/cache"
"github.com/ZupIT/horusec-devkit/pkg/services/database"
"github.com/ZupIT/horusec-devkit/pkg/services/database/config"
router2 "github.com/ZupIT/horusec-devkit/pkg/services/http/router"
"github.com/google/wire"
"github.com/ZupIT/horusec-platform/auth/config/app"
"github.com/ZupIT/horusec-platform/auth/config/cors"
"github.com/ZupIT/horusec-platform/auth/config/grpc"
account3 "github.com/ZupIT/horusec-platform/auth/internal/controllers/account"
authentication3 "github.com/ZupIT/horusec-platform/auth/internal/controllers/authentication"
account4 "github.com/ZupIT/horusec-platform/auth/internal/handlers/account"
authentication4 "github.com/ZupIT/horusec-platform/auth/internal/handlers/authentication"
"github.com/ZupIT/horusec-platform/auth/internal/handlers/health"
account2 "github.com/ZupIT/horusec-platform/auth/internal/repositories/account"
authentication2 "github.com/ZupIT/horusec-platform/auth/internal/repositories/authentication"
"github.com/ZupIT/horusec-platform/auth/internal/router"
"github.com/ZupIT/horusec-platform/auth/internal/services/authentication/horusec"
"github.com/ZupIT/horusec-platform/auth/internal/services/authentication/keycloak"
"github.com/ZupIT/horusec-platform/auth/internal/services/authentication/ldap"
"github.com/ZupIT/horusec-platform/auth/internal/usecases/account"
"github.com/ZupIT/horusec-platform/auth/internal/usecases/authentication"
)
// Injectors from wire.go:
func Initialize(string2 string) (router.IRouter, error) {
options := cors.NewCorsConfig()
iRouter := router2.NewHTTPRouter(options, string2)
iConfig := config.NewDatabaseConfig()
connection, err := database.NewDatabaseReadAndWrite(iConfig)
if err != nil {
return nil, err
}
appIConfig := app.NewAuthAppConfig(connection)
iUseCases := authentication.NewAuthenticationUseCases()
accountIUseCases := account.NewAccountUseCases(appIConfig)
iRepository := account2.NewAccountRepository(connection, accountIUseCases)
authenticationIRepository := authentication2.NewAuthenticationRepository(connection, iUseCases)
iCache := cache.NewCache()
iService := horusec.NewHorusecAuthenticationService(iRepository, appIConfig, iUseCases, authenticationIRepository, iCache)
ldapIService := ldap.NewLDAPAuthenticationService(iRepository, iUseCases, appIConfig, authenticationIRepository, iCache)
keycloakIService := keycloak.NewKeycloakAuthenticationService(iRepository, appIConfig, iUseCases, authenticationIRepository)
iController := authentication3.NewAuthenticationController(appIConfig, iService, ldapIService, keycloakIService, iRepository)
handler := authentication4.NewAuthenticationHandler(appIConfig, iUseCases, iController)
iAuthGRPCServer := grpc.NewAuthGRPCServer(handler)
configIConfig := config2.NewBrokerConfig()
iBroker, err := broker.NewBroker(configIConfig)
if err != nil {
return nil, err
}
accountIController := account3.NewAccountController(iRepository, keycloakIService, accountIUseCases, appIConfig, iBroker, iCache)
accountHandler := account4.NewAccountHandler(accountIUseCases, accountIController, appIConfig)
healthHandler := health.NewHealthHandler(connection, iBroker)
routerIRouter := router.NewHTTPRouter(iRouter, iAuthGRPCServer, handler, accountHandler, healthHandler)
return routerIRouter, nil
}
// wire.go:
var devKitProviders = wire.NewSet(config.NewDatabaseConfig, config2.NewBrokerConfig, broker.NewBroker, database.NewDatabaseReadAndWrite, cache.NewCache, router2.NewHTTPRouter)
var configProviders = wire.NewSet(grpc.NewAuthGRPCServer, cors.NewCorsConfig, app.NewAuthAppConfig, router.NewHTTPRouter)
var controllerProviders = wire.NewSet(authentication3.NewAuthenticationController, account3.NewAccountController)
var handleProviders = wire.NewSet(authentication4.NewAuthenticationHandler, account4.NewAccountHandler, health.NewHealthHandler)
var useCasesProviders = wire.NewSet(authentication.NewAuthenticationUseCases, account.NewAccountUseCases)
var repositoriesProviders = wire.NewSet(account2.NewAccountRepository, authentication2.NewAuthenticationRepository)
var serviceProviders = wire.NewSet(horusec.NewHorusecAuthenticationService, ldap.NewLDAPAuthenticationService, keycloak.NewKeycloakAuthenticationService)