-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathwire_gen.go
59 lines (50 loc) · 2.29 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
// 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/google/wire"
"github.com/traPtitech/anke-to/model"
"github.com/traPtitech/anke-to/router"
"github.com/traPtitech/anke-to/traq"
)
import (
_ "net/http/pprof"
)
// Injectors from wire.go:
func InjectAPIServer() *router.API {
administrator := model.NewAdministrator()
respondent := model.NewRespondent()
question := model.NewQuestion()
questionnaire := model.NewQuestionnaire()
middleware := router.NewMiddleware(administrator, respondent, question, questionnaire)
target := model.NewTarget()
option := model.NewOption()
scaleLabel := model.NewScaleLabel()
validation := model.NewValidation()
transaction := model.NewTransaction()
webhook := traq.NewWebhook()
routerQuestionnaire := router.NewQuestionnaire(questionnaire, target, administrator, question, option, scaleLabel, validation, transaction, webhook)
routerQuestion := router.NewQuestion(validation, question, option, scaleLabel)
response := model.NewResponse()
routerResponse := router.NewResponse(questionnaire, validation, scaleLabel, respondent, response)
result := router.NewResult(respondent, questionnaire, administrator)
user := router.NewUser(respondent, questionnaire, target, administrator)
api := router.NewAPI(middleware, routerQuestionnaire, routerQuestion, routerResponse, result, user)
return api
}
// wire.go:
var (
administratorBind = wire.Bind(new(model.IAdministrator), new(*model.Administrator))
optionBind = wire.Bind(new(model.IOption), new(*model.Option))
questionnaireBind = wire.Bind(new(model.IQuestionnaire), new(*model.Questionnaire))
questionBind = wire.Bind(new(model.IQuestion), new(*model.Question))
respondentBind = wire.Bind(new(model.IRespondent), new(*model.Respondent))
responseBind = wire.Bind(new(model.IResponse), new(*model.Response))
scaleLabelBind = wire.Bind(new(model.IScaleLabel), new(*model.ScaleLabel))
targetBind = wire.Bind(new(model.ITarget), new(*model.Target))
validationBind = wire.Bind(new(model.IValidation), new(*model.Validation))
transactionBind = wire.Bind(new(model.ITransaction), new(*model.Transaction))
webhookBind = wire.Bind(new(traq.IWebhook), new(*traq.Webhook))
)