24 lines
498 B
Go
24 lines
498 B
Go
// Code scaffolded by goctl. Safe to edit.
|
|
// goctl 1.9.2
|
|
|
|
package svc
|
|
|
|
import (
|
|
"juwan-backend/app/player/api/internal/config"
|
|
"juwan-backend/app/player/rpc/playerservice"
|
|
|
|
"github.com/zeromicro/go-zero/zrpc"
|
|
)
|
|
|
|
type ServiceContext struct {
|
|
Config config.Config
|
|
PlayerRpc playerservice.PlayerService
|
|
}
|
|
|
|
func NewServiceContext(c config.Config) *ServiceContext {
|
|
return &ServiceContext{
|
|
Config: c,
|
|
PlayerRpc: playerservice.NewPlayerService(zrpc.MustNewClient(c.PlayerRpcConf)),
|
|
}
|
|
}
|