-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwire_gen.go
52 lines (40 loc) · 1.68 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
// Code generated by Wire. DO NOT EDIT.
//go:generate go run github.com/google/wire/cmd/wire
//go:build !wireinject
// +build !wireinject
package ticketAllocating_Purchasing
import (
"github.com/Selahattinn/ticketAllocating-Purchasing/internal/api"
"github.com/Selahattinn/ticketAllocating-Purchasing/internal/api/handler"
"github.com/Selahattinn/ticketAllocating-Purchasing/internal/api/orchestration"
"github.com/Selahattinn/ticketAllocating-Purchasing/internal/api/ticket"
"github.com/Selahattinn/ticketAllocating-Purchasing/pkg/healthcheck"
"github.com/Selahattinn/ticketAllocating-Purchasing/pkg/mysql"
"github.com/google/wire"
"github.com/sirupsen/logrus"
)
// Injectors from wire.go:
func InitHealthCheck() healthcheck.IHealthCheckHandler {
iHealthCheckHandler := healthcheck.NewHealthCheckHandler()
return iHealthCheckHandler
}
func InitRoute(l *logrus.Logger, pi mysql.IMysqlInstance) api.IRoute {
iHomeHandler := handler.NewHomeHandler()
iTicketRepository := ticket.NewTicketRepository(pi)
iTicketService := ticket.NewTicketService(l, iTicketRepository)
iTicketOrchestrator := orchestration.NewTicketOrchestrator(iTicketService)
iTicketHandler := handler.NewTicketHandler(iTicketOrchestrator)
iRoute := api.NewRoute(iHomeHandler, iTicketHandler)
return iRoute
}
// wire.go:
var repositoryProviders = wire.NewSet(ticket.NewTicketRepository)
var serviceProviders = wire.NewSet(ticket.NewTicketService)
var orchestratorProviders = wire.NewSet(orchestration.NewTicketOrchestrator)
var handlerProviders = wire.NewSet(handler.NewHomeHandler, handler.NewTicketHandler)
var allProviders = wire.NewSet(
repositoryProviders,
serviceProviders,
orchestratorProviders,
handlerProviders,
)