knowledge.go 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. // Code generated by goctl. DO NOT EDIT!
  2. // Source: knowledge.proto
  3. package knowledgeclient
  4. import (
  5. "context"
  6. "github.com/zeromicro/go-zero/zrpc"
  7. "google.golang.org/grpc"
  8. )
  9. type (
  10. Knowledge interface {
  11. // 知识新增
  12. KnowledgeAdd(ctx context.Context, in *AddRequest, opts ...grpc.CallOption) (*AddResponse, error)
  13. // 知识列表
  14. KnowledgeList(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error)
  15. // 知识编辑
  16. KnowledgeEdit(ctx context.Context, in *KnowledgeEditReq, opts ...grpc.CallOption) (*AddResponse, error)
  17. // 知识详情
  18. KnowledgeInfo(ctx context.Context, in *KnowledgeEntity, opts ...grpc.CallOption) (*InfoResponse, error)
  19. // 知识删除
  20. KnowledgeDel(ctx context.Context, in *KnowledgeDelReq, opts ...grpc.CallOption) (*AddResponse, error)
  21. // 根据问题匹配答案
  22. FindAnswer(ctx context.Context, in *FindAnswerReq, opts ...grpc.CallOption) (*FindAnswerResp, error)
  23. // 推荐答案
  24. RecommendAnswer(ctx context.Context, in *FindAnswerReq, opts ...grpc.CallOption) (*RecommendAnswerResp, error)
  25. // 客服话术添加、编辑
  26. CommonPhrasesAdd(ctx context.Context, in *CommonPhrasesAddReq, opts ...grpc.CallOption) (*AddResponse, error)
  27. // 客服话术详情
  28. CommonPhrasesInfo(ctx context.Context, in *CommonPhrasesInfoReq, opts ...grpc.CallOption) (*CommonPhrasesInfoResp, error)
  29. // 客服话术列表
  30. CommonPhrasesList(ctx context.Context, in *CommonPhrasesListReq, opts ...grpc.CallOption) (*CommonPhrasesListResp, error)
  31. // 客服话术删除
  32. CommonPhrasesDel(ctx context.Context, in *CommonPhrasesInfoReq, opts ...grpc.CallOption) (*AddResponse, error)
  33. // 客服话术分类查询
  34. CommonPhraseClassList(ctx context.Context, in *CommonPhrasesClassListReq, opts ...grpc.CallOption) (*CommonPhrasesClassListResp, error)
  35. // 客服输入文字,匹配话术
  36. CommonPhraseQuery(ctx context.Context, in *CommonPhraseQueryReq, opts ...grpc.CallOption) (*CommonPhraseQueryResp, error)
  37. // 聊天框 关键词信息
  38. KeywordList(ctx context.Context, in *CommonPhraseQueryReq, opts ...grpc.CallOption) (*KeywordListResp, error)
  39. }
  40. defaultKnowledge struct {
  41. cli zrpc.Client
  42. }
  43. )
  44. func NewKnowledge(cli zrpc.Client) Knowledge {
  45. return &defaultKnowledge{
  46. cli: cli,
  47. }
  48. }
  49. // 知识新增
  50. func (m *defaultKnowledge) KnowledgeAdd(ctx context.Context, in *AddRequest, opts ...grpc.CallOption) (*AddResponse, error) {
  51. client := NewKnowledgeClient(m.cli.Conn())
  52. return client.KnowledgeAdd(ctx, in, opts...)
  53. }
  54. // 知识列表
  55. func (m *defaultKnowledge) KnowledgeList(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) {
  56. client := NewKnowledgeClient(m.cli.Conn())
  57. return client.KnowledgeList(ctx, in, opts...)
  58. }
  59. // 知识编辑
  60. func (m *defaultKnowledge) KnowledgeEdit(ctx context.Context, in *KnowledgeEditReq, opts ...grpc.CallOption) (*AddResponse, error) {
  61. client := NewKnowledgeClient(m.cli.Conn())
  62. return client.KnowledgeEdit(ctx, in, opts...)
  63. }
  64. // 知识详情
  65. func (m *defaultKnowledge) KnowledgeInfo(ctx context.Context, in *KnowledgeEntity, opts ...grpc.CallOption) (*InfoResponse, error) {
  66. client := NewKnowledgeClient(m.cli.Conn())
  67. return client.KnowledgeInfo(ctx, in, opts...)
  68. }
  69. // 知识删除
  70. func (m *defaultKnowledge) KnowledgeDel(ctx context.Context, in *KnowledgeDelReq, opts ...grpc.CallOption) (*AddResponse, error) {
  71. client := NewKnowledgeClient(m.cli.Conn())
  72. return client.KnowledgeDel(ctx, in, opts...)
  73. }
  74. // 根据问题匹配答案
  75. func (m *defaultKnowledge) FindAnswer(ctx context.Context, in *FindAnswerReq, opts ...grpc.CallOption) (*FindAnswerResp, error) {
  76. client := NewKnowledgeClient(m.cli.Conn())
  77. return client.FindAnswer(ctx, in, opts...)
  78. }
  79. // 推荐答案
  80. func (m *defaultKnowledge) RecommendAnswer(ctx context.Context, in *FindAnswerReq, opts ...grpc.CallOption) (*RecommendAnswerResp, error) {
  81. client := NewKnowledgeClient(m.cli.Conn())
  82. return client.RecommendAnswer(ctx, in, opts...)
  83. }
  84. // 客服话术添加、编辑
  85. func (m *defaultKnowledge) CommonPhrasesAdd(ctx context.Context, in *CommonPhrasesAddReq, opts ...grpc.CallOption) (*AddResponse, error) {
  86. client := NewKnowledgeClient(m.cli.Conn())
  87. return client.CommonPhrasesAdd(ctx, in, opts...)
  88. }
  89. // 客服话术详情
  90. func (m *defaultKnowledge) CommonPhrasesInfo(ctx context.Context, in *CommonPhrasesInfoReq, opts ...grpc.CallOption) (*CommonPhrasesInfoResp, error) {
  91. client := NewKnowledgeClient(m.cli.Conn())
  92. return client.CommonPhrasesInfo(ctx, in, opts...)
  93. }
  94. // 客服话术列表
  95. func (m *defaultKnowledge) CommonPhrasesList(ctx context.Context, in *CommonPhrasesListReq, opts ...grpc.CallOption) (*CommonPhrasesListResp, error) {
  96. client := NewKnowledgeClient(m.cli.Conn())
  97. return client.CommonPhrasesList(ctx, in, opts...)
  98. }
  99. // 客服话术删除
  100. func (m *defaultKnowledge) CommonPhrasesDel(ctx context.Context, in *CommonPhrasesInfoReq, opts ...grpc.CallOption) (*AddResponse, error) {
  101. client := NewKnowledgeClient(m.cli.Conn())
  102. return client.CommonPhrasesDel(ctx, in, opts...)
  103. }
  104. // 客服话术分类查询
  105. func (m *defaultKnowledge) CommonPhraseClassList(ctx context.Context, in *CommonPhrasesClassListReq, opts ...grpc.CallOption) (*CommonPhrasesClassListResp, error) {
  106. client := NewKnowledgeClient(m.cli.Conn())
  107. return client.CommonPhraseClassList(ctx, in, opts...)
  108. }
  109. // 客服输入文字,匹配话术
  110. func (m *defaultKnowledge) CommonPhraseQuery(ctx context.Context, in *CommonPhraseQueryReq, opts ...grpc.CallOption) (*CommonPhraseQueryResp, error) {
  111. client := NewKnowledgeClient(m.cli.Conn())
  112. return client.CommonPhraseQuery(ctx, in, opts...)
  113. }
  114. // 聊天框 关键词信息
  115. func (m *defaultKnowledge) KeywordList(ctx context.Context, in *CommonPhraseQueryReq, opts ...grpc.CallOption) (*KeywordListResp, error) {
  116. client := NewKnowledgeClient(m.cli.Conn())
  117. return client.KeywordList(ctx, in, opts...)
  118. }