temp
This commit is contained in:
@@ -1,13 +1,24 @@
|
||||
package svc
|
||||
|
||||
import "tianyuan-api/apps/mqs/internal/config"
|
||||
import (
|
||||
"github.com/zeromicro/go-zero/zrpc"
|
||||
"tianyuan-api/apps/mqs/internal/config"
|
||||
"tianyuan-api/apps/user/user"
|
||||
)
|
||||
|
||||
type ServiceContext struct {
|
||||
Config config.Config
|
||||
Config config.Config
|
||||
WalletRpc user.WalletServiceClient
|
||||
ApiRequestRpc user.ApiRequestServiceClient
|
||||
}
|
||||
|
||||
func NewServiceContext(c config.Config) *ServiceContext {
|
||||
walletRpc := user.NewWalletServiceClient(zrpc.MustNewClient(c.UserRpc).Conn())
|
||||
apiRequestRpc := user.NewApiRequestServiceClient(zrpc.MustNewClient(c.UserRpc).Conn())
|
||||
|
||||
return &ServiceContext{
|
||||
Config: c,
|
||||
Config: c,
|
||||
WalletRpc: walletRpc,
|
||||
ApiRequestRpc: apiRequestRpc,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user