24 lines
487 B
Go
24 lines
487 B
Go
// Code scaffolded by goctl. Safe to edit.
|
|
// goctl 1.9.2
|
|
|
|
package svc
|
|
|
|
import (
|
|
"juwan-backend/app/user/api/internal/config"
|
|
"juwan-backend/app/user/rpc/usercenter"
|
|
|
|
"github.com/zeromicro/go-zero/zrpc"
|
|
)
|
|
|
|
type ServiceContext struct {
|
|
Config config.Config
|
|
Usercenter usercenter.Usercenter
|
|
}
|
|
|
|
func NewServiceContext(c config.Config) *ServiceContext {
|
|
return &ServiceContext{
|
|
Config: c,
|
|
Usercenter: usercenter.NewUsercenter(zrpc.MustNewClient(c.UsercenterRpcConf)),
|
|
}
|
|
}
|