12345678910111213141516171819 |
- package svc
- import (
- "bp.jydev.jianyu360.cn/SocialPlatform/knowledgeBase/api/knowledge/internal/config"
- "bp.jydev.jianyu360.cn/SocialPlatform/knowledgeBase/rpc/knowledge/knowledgeclient"
- "github.com/zeromicro/go-zero/zrpc"
- )
- type ServiceContext struct {
- Config config.Config
- Knowledge knowledgeclient.Knowledge
- }
- func NewServiceContext(c config.Config) *ServiceContext {
- return &ServiceContext{
- Config: c,
- Knowledge: knowledgeclient.NewKnowledge(zrpc.MustNewClient(c.Knowledge)),
- }
- }
|