forked from west2-online/DomTok
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprovider.go
More file actions
27 lines (25 loc) · 993 Bytes
/
provider.go
File metadata and controls
27 lines (25 loc) · 993 Bytes
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
package infrastructure
import (
"github.com/google/wire"
"github.com/west2-online/domtok/app/order/domain/repository"
"github.com/west2-online/domtok/app/order/infrastructure/locker"
"github.com/west2-online/domtok/app/order/infrastructure/mq"
"github.com/west2-online/domtok/app/order/infrastructure/mysql"
"github.com/west2-online/domtok/app/order/infrastructure/redis"
"github.com/west2-online/domtok/app/order/infrastructure/rpc"
"github.com/west2-online/domtok/pkg/utils"
)
var InfraProviderSet = wire.NewSet(
mysql.NewOrderDB,
wire.Bind(new(repository.OrderDB), new(*mysql.OrderDB)),
mq.NewRocketmq,
wire.Bind(new(repository.MQ), new(*mq.RocketMq)),
rpc.NewOrderRpcImpl,
wire.Bind(new(repository.RPC), new(*rpc.OrderRpcImpl)),
redis.NewOrderCache,
wire.Bind(new(repository.Cache), new(*redis.OrderCache)),
locker.NewLocker,
wire.Bind(new(repository.Locker), new(*locker.Locker)),
utils.NewSnowflake,
wire.Bind(new(repository.IDGenerator), new(*utils.Snowflake)),
)