-
Notifications
You must be signed in to change notification settings - Fork 0
/
wire.go
38 lines (33 loc) · 1.05 KB
/
wire.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
// +build wireinject
package main
import (
"github.com/google/wire"
"github.com/Icedroid/go-grpc/internal/app"
"github.com/Icedroid/go-grpc/internal/app/grpcclient"
"github.com/Icedroid/go-grpc/internal/app/grpcserver"
"github.com/Icedroid/go-grpc/internal/app/repository"
"github.com/Icedroid/go-grpc/internal/app/service"
pkgapp "github.com/Icedroid/go-grpc/internal/pkg/app"
"github.com/Icedroid/go-grpc/internal/pkg/config"
"github.com/Icedroid/go-grpc/internal/pkg/database"
"github.com/Icedroid/go-grpc/internal/pkg/jaeger"
"github.com/Icedroid/go-grpc/internal/pkg/log"
"github.com/Icedroid/go-grpc/internal/pkg/transport/grpc"
"github.com/Icedroid/go-grpc/internal/pkg/transport/http"
)
var providerSet = wire.NewSet(
app.ProviderSet,
log.ProviderSet,
config.ProviderSet,
database.ProviderSet,
service.ProviderSet,
jaeger.ProviderSet,
http.ProviderSet,
grpc.ProviderSet,
repository.ProviderSet,
grpcclient.ProviderSet,
grpcserver.ProviderSet,
)
func CreateApp(appName string) (*pkgapp.Application, error) {
panic(wire.Build(providerSet))
}