24 lines
479 B
Go
24 lines
479 B
Go
// Code scaffolded by goctl. Safe to edit.
|
|
// goctl 1.10.1
|
|
|
|
package svc
|
|
|
|
import (
|
|
"sundynix-micro-go/app/user/api/internal/config"
|
|
"sundynix-micro-go/app/user/rpc/userservice"
|
|
|
|
"github.com/zeromicro/go-zero/zrpc"
|
|
)
|
|
|
|
type ServiceContext struct {
|
|
Config config.Config
|
|
UserRpc userservice.UserService
|
|
}
|
|
|
|
func NewServiceContext(c config.Config) *ServiceContext {
|
|
return &ServiceContext{
|
|
Config: c,
|
|
UserRpc: userservice.NewUserService(zrpc.MustNewClient(c.UserRpc)),
|
|
}
|
|
}
|