123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137 |
- // Code generated by goctl. DO NOT EDIT!
- // Source: knowledge.proto
- //go:generate mockgen -destination ./knowledge_mock.go -package knowledge -source $GOFILE
- package knowledgeclient
- import (
- "context"
- "github.com/zeromicro/go-zero/zrpc"
- "bp.jydev.jianyu360.cn/SocialPlatform/knowledgeBase/rpc/knowledge/knowledge"
- )
- type (
- ListRequest = knowledge.ListRequest
- KnowledgeEntity = knowledge.KnowledgeEntity
- KnowledgeDelReq = knowledge.KnowledgeDelReq
- InfoResponse = knowledge.InfoResponse
- CommonPhrasesAddReq = knowledge.CommonPhrasesAddReq
- CommonPhrasesInfoReq = knowledge.CommonPhrasesInfoReq
- CommonPhrasesListReq = knowledge.CommonPhrasesListReq
- FindAnswerReq = knowledge.FindAnswerReq
- FindAnswerResp = knowledge.FindAnswerResp
- ListResponse = knowledge.ListResponse
- KnowledgeEditReq = knowledge.KnowledgeEditReq
- CommonPhrases = knowledge.CommonPhrases
- CommonPhrasesList = knowledge.CommonPhrasesList
- CommonPhrasesListResp = knowledge.CommonPhrasesListResp
- ListData = knowledge.ListData
- CommonPhrasesInfoResp = knowledge.CommonPhrasesInfoResp
- Question = knowledge.Question
- AddRequest = knowledge.AddRequest
- AddResponse = knowledge.AddResponse
- RecommendAnswerResp = knowledge.RecommendAnswerResp
- Knowledge interface {
- // 知识新增
- KnowledgeAdd(ctx context.Context, in *AddRequest) (*AddResponse, error)
- // 知识列表
- KnowledgeList(ctx context.Context, in *ListRequest) (*ListResponse, error)
- // 知识编辑
- KnowledgeEdit(ctx context.Context, in *KnowledgeEditReq) (*AddResponse, error)
- // 知识详情
- KnowledgeInfo(ctx context.Context, in *KnowledgeEntity) (*InfoResponse, error)
- // 知识删除
- KnowledgeDel(ctx context.Context, in *KnowledgeDelReq) (*AddResponse, error)
- // 根据问题匹配答案
- FindAnswer(ctx context.Context, in *FindAnswerReq) (*FindAnswerResp, error)
- // 推荐答案
- RecommendAnswer(ctx context.Context, in *FindAnswerReq) (*RecommendAnswerResp, error)
- // 客服话术添加、编辑
- CommonPhrasesAdd(ctx context.Context, in *CommonPhrasesAddReq) (*AddResponse, error)
- // 客服话术详情
- CommonPhrasesInfo(ctx context.Context, in *CommonPhrasesInfoReq) (*CommonPhrasesInfoResp, error)
- // 客服话术列表
- CommonPhrasesList(ctx context.Context, in *CommonPhrasesListReq) (*CommonPhrasesListResp, error)
- // 客服话术删除
- CommonPhrasesDel(ctx context.Context, in *CommonPhrasesInfoReq) (*AddResponse, error)
- }
- defaultKnowledge struct {
- cli zrpc.Client
- }
- )
- func NewKnowledge(cli zrpc.Client) Knowledge {
- return &defaultKnowledge{
- cli: cli,
- }
- }
- // 知识新增
- func (m *defaultKnowledge) KnowledgeAdd(ctx context.Context, in *AddRequest) (*AddResponse, error) {
- client := knowledge.NewKnowledgeClient(m.cli.Conn())
- return client.KnowledgeAdd(ctx, in)
- }
- // 知识列表
- func (m *defaultKnowledge) KnowledgeList(ctx context.Context, in *ListRequest) (*ListResponse, error) {
- client := knowledge.NewKnowledgeClient(m.cli.Conn())
- return client.KnowledgeList(ctx, in)
- }
- // 知识编辑
- func (m *defaultKnowledge) KnowledgeEdit(ctx context.Context, in *KnowledgeEditReq) (*AddResponse, error) {
- client := knowledge.NewKnowledgeClient(m.cli.Conn())
- return client.KnowledgeEdit(ctx, in)
- }
- // 知识详情
- func (m *defaultKnowledge) KnowledgeInfo(ctx context.Context, in *KnowledgeEntity) (*InfoResponse, error) {
- client := knowledge.NewKnowledgeClient(m.cli.Conn())
- return client.KnowledgeInfo(ctx, in)
- }
- // 知识删除
- func (m *defaultKnowledge) KnowledgeDel(ctx context.Context, in *KnowledgeDelReq) (*AddResponse, error) {
- client := knowledge.NewKnowledgeClient(m.cli.Conn())
- return client.KnowledgeDel(ctx, in)
- }
- // 根据问题匹配答案
- func (m *defaultKnowledge) FindAnswer(ctx context.Context, in *FindAnswerReq) (*FindAnswerResp, error) {
- client := knowledge.NewKnowledgeClient(m.cli.Conn())
- return client.FindAnswer(ctx, in)
- }
- // 推荐答案
- func (m *defaultKnowledge) RecommendAnswer(ctx context.Context, in *FindAnswerReq) (*RecommendAnswerResp, error) {
- client := knowledge.NewKnowledgeClient(m.cli.Conn())
- return client.RecommendAnswer(ctx, in)
- }
- // 客服话术添加、编辑
- func (m *defaultKnowledge) CommonPhrasesAdd(ctx context.Context, in *CommonPhrasesAddReq) (*AddResponse, error) {
- client := knowledge.NewKnowledgeClient(m.cli.Conn())
- return client.CommonPhrasesAdd(ctx, in)
- }
- // 客服话术详情
- func (m *defaultKnowledge) CommonPhrasesInfo(ctx context.Context, in *CommonPhrasesInfoReq) (*CommonPhrasesInfoResp, error) {
- client := knowledge.NewKnowledgeClient(m.cli.Conn())
- return client.CommonPhrasesInfo(ctx, in)
- }
- // 客服话术列表
- func (m *defaultKnowledge) CommonPhrasesList(ctx context.Context, in *CommonPhrasesListReq) (*CommonPhrasesListResp, error) {
- client := knowledge.NewKnowledgeClient(m.cli.Conn())
- return client.CommonPhrasesList(ctx, in)
- }
- // 客服话术删除
- func (m *defaultKnowledge) CommonPhrasesDel(ctx context.Context, in *CommonPhrasesInfoReq) (*AddResponse, error) {
- client := knowledge.NewKnowledgeClient(m.cli.Conn())
- return client.CommonPhrasesDel(ctx, in)
- }
|