-
Notifications
You must be signed in to change notification settings - Fork 0
/
wire_gen.go
37 lines (32 loc) · 1.09 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
// 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 (
"github.com/MuxiKeStack/be-feed/events"
"github.com/MuxiKeStack/be-feed/grpc"
"github.com/MuxiKeStack/be-feed/ioc"
"github.com/MuxiKeStack/be-feed/repository"
"github.com/MuxiKeStack/be-feed/repository/dao"
"github.com/MuxiKeStack/be-feed/service"
)
// Injectors from wire.go:
func InitApp() *App {
logger := ioc.InitLogger()
db := ioc.InitDB(logger)
feedPushEventDAO := dao.NewGORMFeedPushEventDAO(db)
feedEventRepository := repository.NewFeedEventRepository(feedPushEventDAO)
feedService := service.NewFeedService(feedEventRepository)
feedServiceServer := grpc.NewFeedServiceServer(feedService)
client := ioc.InitEtcdClient()
server := ioc.InitGRPCxKratosServer(feedServiceServer, client, logger)
saramaClient := ioc.InitKafka()
feedEventConsumer := events.NewFeedEventConsumer(saramaClient, logger, feedService)
v := ioc.InitConsumers(feedEventConsumer)
app := &App{
server: server,
consumers: v,
}
return app
}