Repository navigation
Expand file tree
/
Copy pathwire_gen.go
More file actions
67 lines (62 loc) · 3.02 KB
/
Copy pathwire_gen.go
File metadata and controls
67 lines (62 loc) · 3.02 KB
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
// Code generated by Wire. DO NOT EDIT.
//go:generate go run -mod=mod github.com/google/wire/cmd/wire
//go:build !wireinject
// +build !wireinject
package main
import (
"classroom-analysis/internal/ioc"
"classroom-analysis/internal/repository"
"classroom-analysis/internal/repository/dao"
"classroom-analysis/internal/service"
"classroom-analysis/internal/web"
)
// Injectors from wire.go:
func InitWebServer() *App {
client := ioc.InitMongodb()
v := ioc.InitLogger(client)
emailDaoInterface := dao.NewEmailDao(client)
database := ioc.InitMongoDatabase(client)
analysisDAO := dao.NewAnalysisDAO(database)
emailInterface := repository.NewEmailRepository(emailDaoInterface, analysisDAO)
emailServiceInterface := service.NewEmailService(emailInterface)
emailHandler := web.NewEmailHandler(emailServiceInterface)
teacherDAO := dao.NewTeacherDAO(database)
teacherRepository := repository.NewTeacherRepository(teacherDAO)
fileDao := dao.NewFileDao(database)
fileDaoInterface := dao.ProvideFileDaoInterface(fileDao)
fileRepository := repository.NewFileRepository(fileDaoInterface)
fileInterface := repository.ProvideFileInterface(fileRepository)
analysisRepository := repository.NewAnalysisRepository(analysisDAO, emailDaoInterface, fileInterface)
videoAnalysisDAO := dao.NewVideoAnalysisDAO(database)
videoAnalysisRepository := repository.NewVideoAnalysisRepository(videoAnalysisDAO)
studentDAO := dao.NewStudentDAO(database)
studentRepository := repository.NewStudentRepository(studentDAO)
studentFocusDAO := dao.NewStudentFocusDAO(database)
studentFocusRepository := repository.NewStudentFocusRepository(studentFocusDAO)
teacherService := service.NewTeacherService(teacherRepository, analysisRepository, videoAnalysisRepository, studentRepository, studentFocusRepository)
imageAnalysisDAO := dao.NewImageAnalysisDAO(database)
imageAnalysisRepository := repository.NewImageAnalysisRepository(imageAnalysisDAO)
analysisTaskDAO := dao.NewAnalysisTaskDAO(database)
analysisTaskRepository := repository.NewAnalysisTaskRepository(analysisTaskDAO)
faceAnalysisDAO := dao.NewFaceAnalysisDAO(database)
faceAnalysisRepository := repository.NewFaceAnalysisRepository(faceAnalysisDAO)
analysisService := service.NewAnalysisService(analysisRepository, videoAnalysisRepository, imageAnalysisRepository, studentFocusRepository, studentRepository, analysisTaskRepository, faceAnalysisRepository, fileRepository)
logger := ioc.NewLogger()
writer := ioc.InitKafkaWriter()
redisClient := ioc.InitRedis()
teacherHandler := web.NewTeacherHandler(teacherService, analysisService, fileRepository, logger, writer, redisClient)
minioClient := ioc.NewMinioClient()
fileServiceInterface := service.NewFileService(minioClient, fileInterface)
fileHandler := web.NewFileHandler(fileServiceInterface)
engine := ioc.InitGin(v, emailHandler, teacherHandler, fileHandler)
config := ioc.InitViper()
app := &App{
server: engine,
mongodb: client,
redis: redisClient,
minio: minioClient,
config: config,
FileHandler: fileHandler,
}
return app
}