-
Notifications
You must be signed in to change notification settings - Fork 0
/
wire_gen.go
38 lines (33 loc) · 847 Bytes
/
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
// Code generated by Wire. DO NOT EDIT.
//go:generate go run github.com/google/wire/cmd/wire
//go:build !wireinject
// +build !wireinject
package main
import (
"wfRadius/src/handler"
"wfRadius/src/root"
"wfRadius/src/root/startup"
"wfRadius/src/wifilog"
"wfRadius/src/ws"
)
// Injectors from wire.go:
func BuildApp() (*root.App, error) {
mConfig := startup.InitCfg()
logger := startup.NewZap(mConfig)
db, err := startup.InitGorm(logger)
if err != nil {
return nil, err
}
cmdProcessor := ws.NewCmdProcessor(mConfig, logger)
worker := ws.NewWorker(mConfig, logger, db, cmdProcessor)
uploader := wifilog.NewUploader(db, logger)
radiusServer := handler.NewRadiusServer(db, logger, uploader)
app := &root.App{
Config: mConfig,
DB: db,
Logger: logger,
Worker: worker,
RServer: radiusServer,
}
return app, nil
}