Files
sundynix-micro-be/app/system/api/internal/svc/serviceContext.go
T

21 lines
443 B
Go

package svc
import (
"sundynix-micro-go/app/system/api/internal/config"
"sundynix-micro-go/app/system/rpc/systemservice"
"github.com/zeromicro/go-zero/zrpc"
)
type ServiceContext struct {
Config config.Config
SystemRpc systemservice.SystemService
}
func NewServiceContext(c config.Config) *ServiceContext {
return &ServiceContext{
Config: c,
SystemRpc: systemservice.NewSystemService(zrpc.MustNewClient(c.SystemRpc)),
}
}