/
wire_gen.go
35 lines (29 loc) · 1.41 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
// Code generated by Wire. DO NOT EDIT.
//go:generate wire
//+build !wireinject
package main
import (
"github.com/go-eagle/eagle/pkg/app"
"github.com/go-microservice/ins-api/internal/repository"
"github.com/go-microservice/ins-api/internal/server"
"github.com/go-microservice/ins-api/internal/service"
)
import (
_ "go.uber.org/automaxprocs"
)
// Injectors from wire.go:
func InitApp(cfg *app.Config, config *app.ServerConfig) (*app.App, error) {
userServiceClient := repository.NewUserClient()
userServiceServer := service.NewUserServiceServer(userServiceClient)
relationServiceClient := repository.NewRelationClient()
relationServiceServer := service.NewRelationServiceServer(relationServiceClient, userServiceClient)
postServiceClient := repository.NewPostClient()
likeServiceClient := repository.NewLikeClient()
postServiceServer := service.NewPostServiceServer(postServiceClient, likeServiceClient, userServiceClient)
commentServiceClient := repository.NewCommentClient()
commentServiceServer := service.NewCommentServiceServer(commentServiceClient, postServiceClient, userServiceClient)
likeServiceServer := service.NewLikeServiceServer(likeServiceClient, postServiceClient, commentServiceClient, userServiceClient)
httpServer := server.NewHTTPServer(config, userServiceServer, relationServiceServer, postServiceServer, commentServiceServer, likeServiceServer)
appApp := newApp(cfg, httpServer)
return appApp, nil
}