-
Notifications
You must be signed in to change notification settings - Fork 0
/
wire_gen.go
70 lines (65 loc) · 4.64 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
// 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 (
"github.com/komalreddy3/Attendance-go/api"
"github.com/komalreddy3/Attendance-go/api/dashboardApi/dashboardResthandler"
"github.com/komalreddy3/Attendance-go/api/dashboardApi/dashboardRouter"
"github.com/komalreddy3/Attendance-go/api/loginApi/loginResthandler"
"github.com/komalreddy3/Attendance-go/api/loginApi/loginRouter"
"github.com/komalreddy3/Attendance-go/api/principalApi/principalResthandler"
"github.com/komalreddy3/Attendance-go/api/principalApi/principalRouter"
"github.com/komalreddy3/Attendance-go/api/studentApi/studentResthandler"
"github.com/komalreddy3/Attendance-go/api/studentApi/studentRouter"
"github.com/komalreddy3/Attendance-go/api/teacherApi/teacherResthandler"
"github.com/komalreddy3/Attendance-go/api/teacherApi/teacherRouter"
"github.com/komalreddy3/Attendance-go/pkg/attendance/attendanceRepository"
"github.com/komalreddy3/Attendance-go/pkg/attendance/attendanceServices"
"github.com/komalreddy3/Attendance-go/pkg/dashboard/dashboardServices"
"github.com/komalreddy3/Attendance-go/pkg/login/loginRepository"
"github.com/komalreddy3/Attendance-go/pkg/login/loginServices"
"github.com/komalreddy3/Attendance-go/pkg/principal/principalRepository"
"github.com/komalreddy3/Attendance-go/pkg/principal/principalServices"
"github.com/komalreddy3/Attendance-go/pkg/student/studentRepository"
"github.com/komalreddy3/Attendance-go/pkg/student/studentServices"
"github.com/komalreddy3/Attendance-go/pkg/teacher/teacherRepository"
"github.com/komalreddy3/Attendance-go/pkg/teacher/teacherServices"
"github.com/komalreddy3/Attendance-go/pkg/user/userRepository"
"github.com/komalreddy3/Attendance-go/pkg/user/userServices"
)
// Injectors from Wire.go:
func InitializeEvent() (*App, error) {
pgDB := NewDbConnection()
sugaredLogger, err := NewLogger()
if err != nil {
return nil, err
}
userRepositoryUserRepository := userRepository.NewUserRepositoryImpl(pgDB, sugaredLogger)
userServiceImpl := userServices.NewUserServiceImpl(userRepositoryUserRepository, sugaredLogger)
attendanceRepositoryAttendanceRepository := attendanceRepository.NewAttendanceRepositoryImpl(pgDB, sugaredLogger)
attendanceServiceImpl := attendanceServices.NewAttendanceServiceImpl(attendanceRepositoryAttendanceRepository, sugaredLogger)
principalRepositoryPrincipalRepository := principalRepository.NewPrincipalRepositoryImpl(pgDB, userServiceImpl, attendanceServiceImpl, sugaredLogger)
principalServiceImpl := principalServices.NewPrincipalServiceImpl(principalRepositoryPrincipalRepository, sugaredLogger)
loginRepositoryLoginRepository := loginRepository.NewLoginRepositoryImpl(pgDB, sugaredLogger)
loginServiceImpl := loginServices.NewLoginServiceImpl(loginRepositoryLoginRepository, sugaredLogger)
principalRestHandler := principalResthandler.NewPrincipalRestHandler(principalServiceImpl, loginServiceImpl, sugaredLogger)
principalRouterPrincipalRouter := principalRouter.NewPrincipalRouterImpl(principalRestHandler)
teacherRepositoryTeacherRepository := teacherRepository.NewTeacherRepositoryImpl(pgDB, userServiceImpl, attendanceServiceImpl, sugaredLogger)
teacherServiceImpl := teacherServices.NewTeacherServiceImpl(teacherRepositoryTeacherRepository, sugaredLogger)
teacherRestHandler := teacherResthandler.NewTeacherRestHandler(teacherServiceImpl, loginServiceImpl, sugaredLogger)
teacherRouterTeacherRouter := teacherRouter.NewTeacherRouterImpl(teacherRestHandler)
studentRepositoryStudentRepository := studentRepository.NewStudentRepositoryImpl(pgDB, userServiceImpl, attendanceServiceImpl, sugaredLogger)
studentServiceImpl := studentServices.NewStudentServiceImpl(studentRepositoryStudentRepository, sugaredLogger)
studentRestHandler := studentResthandler.NewStudentRestHandler(studentServiceImpl, loginServiceImpl, sugaredLogger)
studentRouterStudentRouter := studentRouter.NewStudentRouterImpl(studentRestHandler)
dashboardServiceImpl := dashboardServices.NewDashboardServiceImpl(sugaredLogger)
dashboardRestHandler := dashboardResthandler.NewDashboardRestHandler(dashboardServiceImpl, loginServiceImpl, sugaredLogger)
dashboardRouterDashboardRouter := dashboardRouter.NewDashboardRouterImpl(dashboardRestHandler)
loginRestHandler := loginResthandler.NewLoginRestHandler(loginServiceImpl, sugaredLogger)
loginRouterLoginRouter := loginRouter.NewLoginRouterImpl(loginRestHandler)
muxRouter := api.NewMuxRouterImpl(principalRouterPrincipalRouter, teacherRouterTeacherRouter, studentRouterStudentRouter, dashboardRouterDashboardRouter, loginRouterLoginRouter)
app := NewApp(muxRouter, sugaredLogger, pgDB)
return app, nil
}