initial commit

This commit is contained in:
2025-05-22 19:39:08 +08:00
commit 531bb42d01
103 changed files with 10291 additions and 0 deletions

View File

@ -0,0 +1,21 @@
package svc
import (
"godemo/gateway/internal/config"
"godemo/user/user"
"github.com/zeromicro/go-zero/zrpc"
)
type ServiceContext struct {
Config config.Config
UserRpc user.UserClient
}
func NewServiceContext(c config.Config) *ServiceContext {
conn := zrpc.MustNewClient(c.UserRpc).Conn()
return &ServiceContext{
Config: c,
UserRpc: user.NewUserClient(conn),
}
}