You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
436 B
Go

package svc
import (
"context"
"dcg/app/user_center/usercenter"
"dcg/config"
"github.com/zeromicro/go-zero/zrpc"
)
type ServiceContext struct {
Ctx context.Context
UserCenterRpc usercenter.UserCenter
}
func NewServiceContext() *ServiceContext {
svc := &ServiceContext{
Ctx: context.Background(),
// rpc
UserCenterRpc: usercenter.NewUserCenter(zrpc.MustNewClient(config.Config.UserCenterRpc)),
}
return svc
}