-
Notifications
You must be signed in to change notification settings - Fork 4
/
wire.go
42 lines (39 loc) · 1.07 KB
/
wire.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
//+build wireinject
package main
import (
"github.com/google/wire"
authV2 "github.com/unicsmcr/hs_auth/authorization/v2"
"github.com/unicsmcr/hs_auth/config"
"github.com/unicsmcr/hs_auth/environment"
"github.com/unicsmcr/hs_auth/repositories"
"github.com/unicsmcr/hs_auth/routers"
v2 "github.com/unicsmcr/hs_auth/routers/api/v2"
"github.com/unicsmcr/hs_auth/routers/frontend"
"github.com/unicsmcr/hs_auth/services/mongo"
"github.com/unicsmcr/hs_auth/services/multiplexers"
"github.com/unicsmcr/hs_auth/utils"
)
func InitializeServer() (Server, error) {
wire.Build(
NewServer,
routers.NewMainRouter,
frontend.NewRouter,
v2.NewAPIV2Router,
mongo.NewMongoTokenService,
mongo.NewMongoTeamService,
mongo.NewMongoUserService,
multiplexers.NewEmailServiceV2,
repositories.NewUserRepository,
repositories.NewTeamRepository,
repositories.NewTokenRepository,
utils.NewDatabase,
utils.NewSendgridClient,
utils.NewSMTPClient,
environment.NewEnv,
utils.NewLogger,
config.NewAppConfig,
utils.NewTimeProvider,
authV2.NewAuthorizer,
)
return Server{}, nil
}