knowledge.pb.go 52 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // versions:
  3. // protoc-gen-go v1.27.1
  4. // protoc v3.19.4
  5. // source: knowledge.proto
  6. package knowledge
  7. import (
  8. context "context"
  9. grpc "google.golang.org/grpc"
  10. codes "google.golang.org/grpc/codes"
  11. status "google.golang.org/grpc/status"
  12. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  13. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  14. reflect "reflect"
  15. sync "sync"
  16. )
  17. const (
  18. // Verify that this generated code is sufficiently up-to-date.
  19. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  20. // Verify that runtime/protoimpl is sufficiently up-to-date.
  21. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  22. )
  23. type Question struct {
  24. state protoimpl.MessageState
  25. sizeCache protoimpl.SizeCache
  26. unknownFields protoimpl.UnknownFields
  27. XId string `protobuf:"bytes,1,opt,name=_id,json=Id,proto3" json:"_id,omitempty"`
  28. Question string `protobuf:"bytes,2,opt,name=question,proto3" json:"question,omitempty"`
  29. Answer string `protobuf:"bytes,3,opt,name=answer,proto3" json:"answer,omitempty"`
  30. }
  31. func (x *Question) Reset() {
  32. *x = Question{}
  33. if protoimpl.UnsafeEnabled {
  34. mi := &file_knowledge_proto_msgTypes[0]
  35. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  36. ms.StoreMessageInfo(mi)
  37. }
  38. }
  39. func (x *Question) String() string {
  40. return protoimpl.X.MessageStringOf(x)
  41. }
  42. func (*Question) ProtoMessage() {}
  43. func (x *Question) ProtoReflect() protoreflect.Message {
  44. mi := &file_knowledge_proto_msgTypes[0]
  45. if protoimpl.UnsafeEnabled && x != nil {
  46. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  47. if ms.LoadMessageInfo() == nil {
  48. ms.StoreMessageInfo(mi)
  49. }
  50. return ms
  51. }
  52. return mi.MessageOf(x)
  53. }
  54. // Deprecated: Use Question.ProtoReflect.Descriptor instead.
  55. func (*Question) Descriptor() ([]byte, []int) {
  56. return file_knowledge_proto_rawDescGZIP(), []int{0}
  57. }
  58. func (x *Question) GetXId() string {
  59. if x != nil {
  60. return x.XId
  61. }
  62. return ""
  63. }
  64. func (x *Question) GetQuestion() string {
  65. if x != nil {
  66. return x.Question
  67. }
  68. return ""
  69. }
  70. func (x *Question) GetAnswer() string {
  71. if x != nil {
  72. return x.Answer
  73. }
  74. return ""
  75. }
  76. type AddRequest struct {
  77. state protoimpl.MessageState
  78. sizeCache protoimpl.SizeCache
  79. unknownFields protoimpl.UnknownFields
  80. Question string `protobuf:"bytes,1,opt,name=question,proto3" json:"question,omitempty"`
  81. Answer string `protobuf:"bytes,2,opt,name=answer,proto3" json:"answer,omitempty"`
  82. EntId int64 `protobuf:"varint,3,opt,name=entId,proto3" json:"entId,omitempty"`
  83. AppId string `protobuf:"bytes,4,opt,name=appId,proto3" json:"appId,omitempty"`
  84. EntUserId int64 `protobuf:"varint,5,opt,name=entUserId,proto3" json:"entUserId,omitempty"`
  85. }
  86. func (x *AddRequest) Reset() {
  87. *x = AddRequest{}
  88. if protoimpl.UnsafeEnabled {
  89. mi := &file_knowledge_proto_msgTypes[1]
  90. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  91. ms.StoreMessageInfo(mi)
  92. }
  93. }
  94. func (x *AddRequest) String() string {
  95. return protoimpl.X.MessageStringOf(x)
  96. }
  97. func (*AddRequest) ProtoMessage() {}
  98. func (x *AddRequest) ProtoReflect() protoreflect.Message {
  99. mi := &file_knowledge_proto_msgTypes[1]
  100. if protoimpl.UnsafeEnabled && x != nil {
  101. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  102. if ms.LoadMessageInfo() == nil {
  103. ms.StoreMessageInfo(mi)
  104. }
  105. return ms
  106. }
  107. return mi.MessageOf(x)
  108. }
  109. // Deprecated: Use AddRequest.ProtoReflect.Descriptor instead.
  110. func (*AddRequest) Descriptor() ([]byte, []int) {
  111. return file_knowledge_proto_rawDescGZIP(), []int{1}
  112. }
  113. func (x *AddRequest) GetQuestion() string {
  114. if x != nil {
  115. return x.Question
  116. }
  117. return ""
  118. }
  119. func (x *AddRequest) GetAnswer() string {
  120. if x != nil {
  121. return x.Answer
  122. }
  123. return ""
  124. }
  125. func (x *AddRequest) GetEntId() int64 {
  126. if x != nil {
  127. return x.EntId
  128. }
  129. return 0
  130. }
  131. func (x *AddRequest) GetAppId() string {
  132. if x != nil {
  133. return x.AppId
  134. }
  135. return ""
  136. }
  137. func (x *AddRequest) GetEntUserId() int64 {
  138. if x != nil {
  139. return x.EntUserId
  140. }
  141. return 0
  142. }
  143. type AddResponse struct {
  144. state protoimpl.MessageState
  145. sizeCache protoimpl.SizeCache
  146. unknownFields protoimpl.UnknownFields
  147. ErrorCode int64 `protobuf:"varint,1,opt,name=error_code,json=errorCode,proto3" json:"error_code,omitempty"` //响应代码
  148. ErrorMsg string `protobuf:"bytes,2,opt,name=error_msg,json=errorMsg,proto3" json:"error_msg,omitempty"` //响应消息
  149. Data string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` //响应内容
  150. }
  151. func (x *AddResponse) Reset() {
  152. *x = AddResponse{}
  153. if protoimpl.UnsafeEnabled {
  154. mi := &file_knowledge_proto_msgTypes[2]
  155. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  156. ms.StoreMessageInfo(mi)
  157. }
  158. }
  159. func (x *AddResponse) String() string {
  160. return protoimpl.X.MessageStringOf(x)
  161. }
  162. func (*AddResponse) ProtoMessage() {}
  163. func (x *AddResponse) ProtoReflect() protoreflect.Message {
  164. mi := &file_knowledge_proto_msgTypes[2]
  165. if protoimpl.UnsafeEnabled && x != nil {
  166. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  167. if ms.LoadMessageInfo() == nil {
  168. ms.StoreMessageInfo(mi)
  169. }
  170. return ms
  171. }
  172. return mi.MessageOf(x)
  173. }
  174. // Deprecated: Use AddResponse.ProtoReflect.Descriptor instead.
  175. func (*AddResponse) Descriptor() ([]byte, []int) {
  176. return file_knowledge_proto_rawDescGZIP(), []int{2}
  177. }
  178. func (x *AddResponse) GetErrorCode() int64 {
  179. if x != nil {
  180. return x.ErrorCode
  181. }
  182. return 0
  183. }
  184. func (x *AddResponse) GetErrorMsg() string {
  185. if x != nil {
  186. return x.ErrorMsg
  187. }
  188. return ""
  189. }
  190. func (x *AddResponse) GetData() string {
  191. if x != nil {
  192. return x.Data
  193. }
  194. return ""
  195. }
  196. type FindAnswerReq struct {
  197. state protoimpl.MessageState
  198. sizeCache protoimpl.SizeCache
  199. unknownFields protoimpl.UnknownFields
  200. Question string `protobuf:"bytes,1,opt,name=question,proto3" json:"question,omitempty"`
  201. RobotEntId string `protobuf:"bytes,2,opt,name=robotEntId,proto3" json:"robotEntId,omitempty"` //机器人的企业id
  202. Type int64 `protobuf:"varint,3,opt,name=type,proto3" json:"type,omitempty"` // 1文字 2语音
  203. }
  204. func (x *FindAnswerReq) Reset() {
  205. *x = FindAnswerReq{}
  206. if protoimpl.UnsafeEnabled {
  207. mi := &file_knowledge_proto_msgTypes[3]
  208. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  209. ms.StoreMessageInfo(mi)
  210. }
  211. }
  212. func (x *FindAnswerReq) String() string {
  213. return protoimpl.X.MessageStringOf(x)
  214. }
  215. func (*FindAnswerReq) ProtoMessage() {}
  216. func (x *FindAnswerReq) ProtoReflect() protoreflect.Message {
  217. mi := &file_knowledge_proto_msgTypes[3]
  218. if protoimpl.UnsafeEnabled && x != nil {
  219. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  220. if ms.LoadMessageInfo() == nil {
  221. ms.StoreMessageInfo(mi)
  222. }
  223. return ms
  224. }
  225. return mi.MessageOf(x)
  226. }
  227. // Deprecated: Use FindAnswerReq.ProtoReflect.Descriptor instead.
  228. func (*FindAnswerReq) Descriptor() ([]byte, []int) {
  229. return file_knowledge_proto_rawDescGZIP(), []int{3}
  230. }
  231. func (x *FindAnswerReq) GetQuestion() string {
  232. if x != nil {
  233. return x.Question
  234. }
  235. return ""
  236. }
  237. func (x *FindAnswerReq) GetRobotEntId() string {
  238. if x != nil {
  239. return x.RobotEntId
  240. }
  241. return ""
  242. }
  243. func (x *FindAnswerReq) GetType() int64 {
  244. if x != nil {
  245. return x.Type
  246. }
  247. return 0
  248. }
  249. type FindAnswerResp struct {
  250. state protoimpl.MessageState
  251. sizeCache protoimpl.SizeCache
  252. unknownFields protoimpl.UnknownFields
  253. ErrorCode int64 `protobuf:"varint,1,opt,name=error_code,json=errorCode,proto3" json:"error_code,omitempty"` //响应代码
  254. ErrorMsg string `protobuf:"bytes,2,opt,name=error_msg,json=errorMsg,proto3" json:"error_msg,omitempty"` //响应消息
  255. Data *Question `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` //响应内容
  256. }
  257. func (x *FindAnswerResp) Reset() {
  258. *x = FindAnswerResp{}
  259. if protoimpl.UnsafeEnabled {
  260. mi := &file_knowledge_proto_msgTypes[4]
  261. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  262. ms.StoreMessageInfo(mi)
  263. }
  264. }
  265. func (x *FindAnswerResp) String() string {
  266. return protoimpl.X.MessageStringOf(x)
  267. }
  268. func (*FindAnswerResp) ProtoMessage() {}
  269. func (x *FindAnswerResp) ProtoReflect() protoreflect.Message {
  270. mi := &file_knowledge_proto_msgTypes[4]
  271. if protoimpl.UnsafeEnabled && x != nil {
  272. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  273. if ms.LoadMessageInfo() == nil {
  274. ms.StoreMessageInfo(mi)
  275. }
  276. return ms
  277. }
  278. return mi.MessageOf(x)
  279. }
  280. // Deprecated: Use FindAnswerResp.ProtoReflect.Descriptor instead.
  281. func (*FindAnswerResp) Descriptor() ([]byte, []int) {
  282. return file_knowledge_proto_rawDescGZIP(), []int{4}
  283. }
  284. func (x *FindAnswerResp) GetErrorCode() int64 {
  285. if x != nil {
  286. return x.ErrorCode
  287. }
  288. return 0
  289. }
  290. func (x *FindAnswerResp) GetErrorMsg() string {
  291. if x != nil {
  292. return x.ErrorMsg
  293. }
  294. return ""
  295. }
  296. func (x *FindAnswerResp) GetData() *Question {
  297. if x != nil {
  298. return x.Data
  299. }
  300. return nil
  301. }
  302. type RecommendAnswerResp struct {
  303. state protoimpl.MessageState
  304. sizeCache protoimpl.SizeCache
  305. unknownFields protoimpl.UnknownFields
  306. ErrorCode int64 `protobuf:"varint,1,opt,name=error_code,json=errorCode,proto3" json:"error_code,omitempty"` //响应代码
  307. ErrorMsg string `protobuf:"bytes,2,opt,name=error_msg,json=errorMsg,proto3" json:"error_msg,omitempty"` //响应消息
  308. Data []*Question `protobuf:"bytes,3,rep,name=data,proto3" json:"data,omitempty"` //响应内容
  309. }
  310. func (x *RecommendAnswerResp) Reset() {
  311. *x = RecommendAnswerResp{}
  312. if protoimpl.UnsafeEnabled {
  313. mi := &file_knowledge_proto_msgTypes[5]
  314. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  315. ms.StoreMessageInfo(mi)
  316. }
  317. }
  318. func (x *RecommendAnswerResp) String() string {
  319. return protoimpl.X.MessageStringOf(x)
  320. }
  321. func (*RecommendAnswerResp) ProtoMessage() {}
  322. func (x *RecommendAnswerResp) ProtoReflect() protoreflect.Message {
  323. mi := &file_knowledge_proto_msgTypes[5]
  324. if protoimpl.UnsafeEnabled && x != nil {
  325. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  326. if ms.LoadMessageInfo() == nil {
  327. ms.StoreMessageInfo(mi)
  328. }
  329. return ms
  330. }
  331. return mi.MessageOf(x)
  332. }
  333. // Deprecated: Use RecommendAnswerResp.ProtoReflect.Descriptor instead.
  334. func (*RecommendAnswerResp) Descriptor() ([]byte, []int) {
  335. return file_knowledge_proto_rawDescGZIP(), []int{5}
  336. }
  337. func (x *RecommendAnswerResp) GetErrorCode() int64 {
  338. if x != nil {
  339. return x.ErrorCode
  340. }
  341. return 0
  342. }
  343. func (x *RecommendAnswerResp) GetErrorMsg() string {
  344. if x != nil {
  345. return x.ErrorMsg
  346. }
  347. return ""
  348. }
  349. func (x *RecommendAnswerResp) GetData() []*Question {
  350. if x != nil {
  351. return x.Data
  352. }
  353. return nil
  354. }
  355. type ListData struct {
  356. state protoimpl.MessageState
  357. sizeCache protoimpl.SizeCache
  358. unknownFields protoimpl.UnknownFields
  359. Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"`
  360. Data []*KnowledgeEntity `protobuf:"bytes,2,rep,name=Data,proto3" json:"Data,omitempty"`
  361. }
  362. func (x *ListData) Reset() {
  363. *x = ListData{}
  364. if protoimpl.UnsafeEnabled {
  365. mi := &file_knowledge_proto_msgTypes[6]
  366. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  367. ms.StoreMessageInfo(mi)
  368. }
  369. }
  370. func (x *ListData) String() string {
  371. return protoimpl.X.MessageStringOf(x)
  372. }
  373. func (*ListData) ProtoMessage() {}
  374. func (x *ListData) ProtoReflect() protoreflect.Message {
  375. mi := &file_knowledge_proto_msgTypes[6]
  376. if protoimpl.UnsafeEnabled && x != nil {
  377. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  378. if ms.LoadMessageInfo() == nil {
  379. ms.StoreMessageInfo(mi)
  380. }
  381. return ms
  382. }
  383. return mi.MessageOf(x)
  384. }
  385. // Deprecated: Use ListData.ProtoReflect.Descriptor instead.
  386. func (*ListData) Descriptor() ([]byte, []int) {
  387. return file_knowledge_proto_rawDescGZIP(), []int{6}
  388. }
  389. func (x *ListData) GetTotal() int64 {
  390. if x != nil {
  391. return x.Total
  392. }
  393. return 0
  394. }
  395. func (x *ListData) GetData() []*KnowledgeEntity {
  396. if x != nil {
  397. return x.Data
  398. }
  399. return nil
  400. }
  401. type ListRequest struct {
  402. state protoimpl.MessageState
  403. sizeCache protoimpl.SizeCache
  404. unknownFields protoimpl.UnknownFields
  405. PageSize int64 `protobuf:"varint,1,opt,name=pageSize,proto3" json:"pageSize,omitempty"` //每页数据量,默认10
  406. PageIndex int64 `protobuf:"varint,2,opt,name=pageIndex,proto3" json:"pageIndex,omitempty"` //页码;默认第一页
  407. EntId int64 `protobuf:"varint,3,opt,name=entId,proto3" json:"entId,omitempty"` //租户id
  408. }
  409. func (x *ListRequest) Reset() {
  410. *x = ListRequest{}
  411. if protoimpl.UnsafeEnabled {
  412. mi := &file_knowledge_proto_msgTypes[7]
  413. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  414. ms.StoreMessageInfo(mi)
  415. }
  416. }
  417. func (x *ListRequest) String() string {
  418. return protoimpl.X.MessageStringOf(x)
  419. }
  420. func (*ListRequest) ProtoMessage() {}
  421. func (x *ListRequest) ProtoReflect() protoreflect.Message {
  422. mi := &file_knowledge_proto_msgTypes[7]
  423. if protoimpl.UnsafeEnabled && x != nil {
  424. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  425. if ms.LoadMessageInfo() == nil {
  426. ms.StoreMessageInfo(mi)
  427. }
  428. return ms
  429. }
  430. return mi.MessageOf(x)
  431. }
  432. // Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.
  433. func (*ListRequest) Descriptor() ([]byte, []int) {
  434. return file_knowledge_proto_rawDescGZIP(), []int{7}
  435. }
  436. func (x *ListRequest) GetPageSize() int64 {
  437. if x != nil {
  438. return x.PageSize
  439. }
  440. return 0
  441. }
  442. func (x *ListRequest) GetPageIndex() int64 {
  443. if x != nil {
  444. return x.PageIndex
  445. }
  446. return 0
  447. }
  448. func (x *ListRequest) GetEntId() int64 {
  449. if x != nil {
  450. return x.EntId
  451. }
  452. return 0
  453. }
  454. type ListResponse struct {
  455. state protoimpl.MessageState
  456. sizeCache protoimpl.SizeCache
  457. unknownFields protoimpl.UnknownFields
  458. ErrorCode int64 `protobuf:"varint,1,opt,name=error_code,json=errorCode,proto3" json:"error_code,omitempty"` //响应代码
  459. ErrorMsg string `protobuf:"bytes,2,opt,name=error_msg,json=errorMsg,proto3" json:"error_msg,omitempty"` //响应消息
  460. Data *ListData `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` //响应内容
  461. }
  462. func (x *ListResponse) Reset() {
  463. *x = ListResponse{}
  464. if protoimpl.UnsafeEnabled {
  465. mi := &file_knowledge_proto_msgTypes[8]
  466. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  467. ms.StoreMessageInfo(mi)
  468. }
  469. }
  470. func (x *ListResponse) String() string {
  471. return protoimpl.X.MessageStringOf(x)
  472. }
  473. func (*ListResponse) ProtoMessage() {}
  474. func (x *ListResponse) ProtoReflect() protoreflect.Message {
  475. mi := &file_knowledge_proto_msgTypes[8]
  476. if protoimpl.UnsafeEnabled && x != nil {
  477. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  478. if ms.LoadMessageInfo() == nil {
  479. ms.StoreMessageInfo(mi)
  480. }
  481. return ms
  482. }
  483. return mi.MessageOf(x)
  484. }
  485. // Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.
  486. func (*ListResponse) Descriptor() ([]byte, []int) {
  487. return file_knowledge_proto_rawDescGZIP(), []int{8}
  488. }
  489. func (x *ListResponse) GetErrorCode() int64 {
  490. if x != nil {
  491. return x.ErrorCode
  492. }
  493. return 0
  494. }
  495. func (x *ListResponse) GetErrorMsg() string {
  496. if x != nil {
  497. return x.ErrorMsg
  498. }
  499. return ""
  500. }
  501. func (x *ListResponse) GetData() *ListData {
  502. if x != nil {
  503. return x.Data
  504. }
  505. return nil
  506. }
  507. type KnowledgeEntity struct {
  508. state protoimpl.MessageState
  509. sizeCache protoimpl.SizeCache
  510. unknownFields protoimpl.UnknownFields
  511. Question string `protobuf:"bytes,1,opt,name=question,proto3" json:"question,omitempty"` //问题
  512. Answer string `protobuf:"bytes,2,opt,name=answer,proto3" json:"answer,omitempty"` //答案
  513. AnswerId int64 `protobuf:"varint,3,opt,name=answerId,proto3" json:"answerId,omitempty"` //答案标识
  514. State int64 `protobuf:"varint,4,opt,name=state,proto3" json:"state,omitempty"` //知识状态0无效1有效
  515. Person string `protobuf:"bytes,5,opt,name=person,proto3" json:"person,omitempty"` //人员姓名
  516. KnowledgeId int64 `protobuf:"varint,6,opt,name=knowledgeId,proto3" json:"knowledgeId,omitempty"`
  517. }
  518. func (x *KnowledgeEntity) Reset() {
  519. *x = KnowledgeEntity{}
  520. if protoimpl.UnsafeEnabled {
  521. mi := &file_knowledge_proto_msgTypes[9]
  522. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  523. ms.StoreMessageInfo(mi)
  524. }
  525. }
  526. func (x *KnowledgeEntity) String() string {
  527. return protoimpl.X.MessageStringOf(x)
  528. }
  529. func (*KnowledgeEntity) ProtoMessage() {}
  530. func (x *KnowledgeEntity) ProtoReflect() protoreflect.Message {
  531. mi := &file_knowledge_proto_msgTypes[9]
  532. if protoimpl.UnsafeEnabled && x != nil {
  533. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  534. if ms.LoadMessageInfo() == nil {
  535. ms.StoreMessageInfo(mi)
  536. }
  537. return ms
  538. }
  539. return mi.MessageOf(x)
  540. }
  541. // Deprecated: Use KnowledgeEntity.ProtoReflect.Descriptor instead.
  542. func (*KnowledgeEntity) Descriptor() ([]byte, []int) {
  543. return file_knowledge_proto_rawDescGZIP(), []int{9}
  544. }
  545. func (x *KnowledgeEntity) GetQuestion() string {
  546. if x != nil {
  547. return x.Question
  548. }
  549. return ""
  550. }
  551. func (x *KnowledgeEntity) GetAnswer() string {
  552. if x != nil {
  553. return x.Answer
  554. }
  555. return ""
  556. }
  557. func (x *KnowledgeEntity) GetAnswerId() int64 {
  558. if x != nil {
  559. return x.AnswerId
  560. }
  561. return 0
  562. }
  563. func (x *KnowledgeEntity) GetState() int64 {
  564. if x != nil {
  565. return x.State
  566. }
  567. return 0
  568. }
  569. func (x *KnowledgeEntity) GetPerson() string {
  570. if x != nil {
  571. return x.Person
  572. }
  573. return ""
  574. }
  575. func (x *KnowledgeEntity) GetKnowledgeId() int64 {
  576. if x != nil {
  577. return x.KnowledgeId
  578. }
  579. return 0
  580. }
  581. type KnowledgeEditReq struct {
  582. state protoimpl.MessageState
  583. sizeCache protoimpl.SizeCache
  584. unknownFields protoimpl.UnknownFields
  585. Question string `protobuf:"bytes,1,opt,name=question,proto3" json:"question,omitempty"` //问题
  586. Answer string `protobuf:"bytes,2,opt,name=answer,proto3" json:"answer,omitempty"` //答案
  587. AnswerId int64 `protobuf:"varint,3,opt,name=answerId,proto3" json:"answerId,omitempty"` //答案标识
  588. EntUserId int64 `protobuf:"varint,5,opt,name=entUserId,proto3" json:"entUserId,omitempty"`
  589. EntId int64 `protobuf:"varint,6,opt,name=entId,proto3" json:"entId,omitempty"` //租户id
  590. KnowledgeId int64 `protobuf:"varint,7,opt,name=knowledgeId,proto3" json:"knowledgeId,omitempty"` //知识库id
  591. AppId string `protobuf:"bytes,8,opt,name=appId,proto3" json:"appId,omitempty"`
  592. }
  593. func (x *KnowledgeEditReq) Reset() {
  594. *x = KnowledgeEditReq{}
  595. if protoimpl.UnsafeEnabled {
  596. mi := &file_knowledge_proto_msgTypes[10]
  597. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  598. ms.StoreMessageInfo(mi)
  599. }
  600. }
  601. func (x *KnowledgeEditReq) String() string {
  602. return protoimpl.X.MessageStringOf(x)
  603. }
  604. func (*KnowledgeEditReq) ProtoMessage() {}
  605. func (x *KnowledgeEditReq) ProtoReflect() protoreflect.Message {
  606. mi := &file_knowledge_proto_msgTypes[10]
  607. if protoimpl.UnsafeEnabled && x != nil {
  608. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  609. if ms.LoadMessageInfo() == nil {
  610. ms.StoreMessageInfo(mi)
  611. }
  612. return ms
  613. }
  614. return mi.MessageOf(x)
  615. }
  616. // Deprecated: Use KnowledgeEditReq.ProtoReflect.Descriptor instead.
  617. func (*KnowledgeEditReq) Descriptor() ([]byte, []int) {
  618. return file_knowledge_proto_rawDescGZIP(), []int{10}
  619. }
  620. func (x *KnowledgeEditReq) GetQuestion() string {
  621. if x != nil {
  622. return x.Question
  623. }
  624. return ""
  625. }
  626. func (x *KnowledgeEditReq) GetAnswer() string {
  627. if x != nil {
  628. return x.Answer
  629. }
  630. return ""
  631. }
  632. func (x *KnowledgeEditReq) GetAnswerId() int64 {
  633. if x != nil {
  634. return x.AnswerId
  635. }
  636. return 0
  637. }
  638. func (x *KnowledgeEditReq) GetEntUserId() int64 {
  639. if x != nil {
  640. return x.EntUserId
  641. }
  642. return 0
  643. }
  644. func (x *KnowledgeEditReq) GetEntId() int64 {
  645. if x != nil {
  646. return x.EntId
  647. }
  648. return 0
  649. }
  650. func (x *KnowledgeEditReq) GetKnowledgeId() int64 {
  651. if x != nil {
  652. return x.KnowledgeId
  653. }
  654. return 0
  655. }
  656. func (x *KnowledgeEditReq) GetAppId() string {
  657. if x != nil {
  658. return x.AppId
  659. }
  660. return ""
  661. }
  662. type InfoResponse struct {
  663. state protoimpl.MessageState
  664. sizeCache protoimpl.SizeCache
  665. unknownFields protoimpl.UnknownFields
  666. ErrorCode int64 `protobuf:"varint,1,opt,name=error_code,json=errorCode,proto3" json:"error_code,omitempty"` //响应代码
  667. ErrorMsg string `protobuf:"bytes,2,opt,name=error_msg,json=errorMsg,proto3" json:"error_msg,omitempty"` //响应消息
  668. Data *KnowledgeEntity `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` //响应内容
  669. }
  670. func (x *InfoResponse) Reset() {
  671. *x = InfoResponse{}
  672. if protoimpl.UnsafeEnabled {
  673. mi := &file_knowledge_proto_msgTypes[11]
  674. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  675. ms.StoreMessageInfo(mi)
  676. }
  677. }
  678. func (x *InfoResponse) String() string {
  679. return protoimpl.X.MessageStringOf(x)
  680. }
  681. func (*InfoResponse) ProtoMessage() {}
  682. func (x *InfoResponse) ProtoReflect() protoreflect.Message {
  683. mi := &file_knowledge_proto_msgTypes[11]
  684. if protoimpl.UnsafeEnabled && x != nil {
  685. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  686. if ms.LoadMessageInfo() == nil {
  687. ms.StoreMessageInfo(mi)
  688. }
  689. return ms
  690. }
  691. return mi.MessageOf(x)
  692. }
  693. // Deprecated: Use InfoResponse.ProtoReflect.Descriptor instead.
  694. func (*InfoResponse) Descriptor() ([]byte, []int) {
  695. return file_knowledge_proto_rawDescGZIP(), []int{11}
  696. }
  697. func (x *InfoResponse) GetErrorCode() int64 {
  698. if x != nil {
  699. return x.ErrorCode
  700. }
  701. return 0
  702. }
  703. func (x *InfoResponse) GetErrorMsg() string {
  704. if x != nil {
  705. return x.ErrorMsg
  706. }
  707. return ""
  708. }
  709. func (x *InfoResponse) GetData() *KnowledgeEntity {
  710. if x != nil {
  711. return x.Data
  712. }
  713. return nil
  714. }
  715. type KnowledgeDelReq struct {
  716. state protoimpl.MessageState
  717. sizeCache protoimpl.SizeCache
  718. unknownFields protoimpl.UnknownFields
  719. AnswerId int64 `protobuf:"varint,1,opt,name=answerId,proto3" json:"answerId,omitempty"`
  720. }
  721. func (x *KnowledgeDelReq) Reset() {
  722. *x = KnowledgeDelReq{}
  723. if protoimpl.UnsafeEnabled {
  724. mi := &file_knowledge_proto_msgTypes[12]
  725. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  726. ms.StoreMessageInfo(mi)
  727. }
  728. }
  729. func (x *KnowledgeDelReq) String() string {
  730. return protoimpl.X.MessageStringOf(x)
  731. }
  732. func (*KnowledgeDelReq) ProtoMessage() {}
  733. func (x *KnowledgeDelReq) ProtoReflect() protoreflect.Message {
  734. mi := &file_knowledge_proto_msgTypes[12]
  735. if protoimpl.UnsafeEnabled && x != nil {
  736. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  737. if ms.LoadMessageInfo() == nil {
  738. ms.StoreMessageInfo(mi)
  739. }
  740. return ms
  741. }
  742. return mi.MessageOf(x)
  743. }
  744. // Deprecated: Use KnowledgeDelReq.ProtoReflect.Descriptor instead.
  745. func (*KnowledgeDelReq) Descriptor() ([]byte, []int) {
  746. return file_knowledge_proto_rawDescGZIP(), []int{12}
  747. }
  748. func (x *KnowledgeDelReq) GetAnswerId() int64 {
  749. if x != nil {
  750. return x.AnswerId
  751. }
  752. return 0
  753. }
  754. var File_knowledge_proto protoreflect.FileDescriptor
  755. var file_knowledge_proto_rawDesc = []byte{
  756. 0x0a, 0x0f, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
  757. 0x6f, 0x12, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x4f, 0x0a, 0x08, 0x51,
  758. 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0f, 0x0a, 0x03, 0x5f, 0x69, 0x64, 0x18, 0x01,
  759. 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x71, 0x75, 0x65, 0x73,
  760. 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x71, 0x75, 0x65, 0x73,
  761. 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x18, 0x03,
  762. 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x22, 0x8a, 0x01, 0x0a,
  763. 0x0a, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x71,
  764. 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x71,
  765. 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6e, 0x73, 0x77, 0x65,
  766. 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x12,
  767. 0x14, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05,
  768. 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x18, 0x04,
  769. 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x65,
  770. 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09,
  771. 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x5d, 0x0a, 0x0b, 0x41, 0x64, 0x64,
  772. 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f,
  773. 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x72,
  774. 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72,
  775. 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f,
  776. 0x72, 0x4d, 0x73, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01,
  777. 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x5f, 0x0a, 0x0d, 0x46, 0x69, 0x6e, 0x64,
  778. 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x71, 0x75, 0x65,
  779. 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x71, 0x75, 0x65,
  780. 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x6f, 0x62, 0x6f, 0x74, 0x45, 0x6e,
  781. 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x6f, 0x62, 0x6f, 0x74,
  782. 0x45, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20,
  783. 0x01, 0x28, 0x03, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x74, 0x0a, 0x0e, 0x46, 0x69, 0x6e,
  784. 0x64, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x65,
  785. 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
  786. 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x72,
  787. 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65,
  788. 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x26, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18,
  789. 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65,
  790. 0x2e, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22,
  791. 0x79, 0x0a, 0x13, 0x52, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x41, 0x6e, 0x73, 0x77,
  792. 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f,
  793. 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f,
  794. 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d,
  795. 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d,
  796. 0x73, 0x67, 0x12, 0x26, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b,
  797. 0x32, 0x12, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x73,
  798. 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x4f, 0x0a, 0x08, 0x4c, 0x69,
  799. 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18,
  800. 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x2d, 0x0a, 0x04,
  801. 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x74, 0x65, 0x6d,
  802. 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x4b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x45,
  803. 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x04, 0x44, 0x61, 0x74, 0x61, 0x22, 0x5d, 0x0a, 0x0b, 0x4c,
  804. 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61,
  805. 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x61,
  806. 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e,
  807. 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x49,
  808. 0x6e, 0x64, 0x65, 0x78, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x03, 0x20,
  809. 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x72, 0x0a, 0x0c, 0x4c, 0x69,
  810. 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72,
  811. 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09,
  812. 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x72, 0x72,
  813. 0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72,
  814. 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x26, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03,
  815. 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e,
  816. 0x4c, 0x69, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xb1,
  817. 0x01, 0x0a, 0x0f, 0x4b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x69,
  818. 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01,
  819. 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16,
  820. 0x0a, 0x06, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
  821. 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72,
  822. 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72,
  823. 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
  824. 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x73,
  825. 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e,
  826. 0x12, 0x20, 0x0a, 0x0b, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x49, 0x64, 0x18,
  827. 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65,
  828. 0x49, 0x64, 0x22, 0xce, 0x01, 0x0a, 0x10, 0x4b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65,
  829. 0x45, 0x64, 0x69, 0x74, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x71, 0x75, 0x65, 0x73, 0x74,
  830. 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x71, 0x75, 0x65, 0x73, 0x74,
  831. 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x18, 0x02, 0x20,
  832. 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x61,
  833. 0x6e, 0x73, 0x77, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x61,
  834. 0x6e, 0x73, 0x77, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73,
  835. 0x65, 0x72, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x6e, 0x74, 0x55,
  836. 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x06,
  837. 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x6b,
  838. 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03,
  839. 0x52, 0x0b, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x49, 0x64, 0x12, 0x14, 0x0a,
  840. 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70,
  841. 0x70, 0x49, 0x64, 0x22, 0x79, 0x0a, 0x0c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f,
  842. 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64,
  843. 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f,
  844. 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18,
  845. 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x12,
  846. 0x2d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e,
  847. 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x4b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64,
  848. 0x67, 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x2d,
  849. 0x0a, 0x0f, 0x4b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x44, 0x65, 0x6c, 0x52, 0x65,
  850. 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20,
  851. 0x01, 0x28, 0x03, 0x52, 0x08, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x49, 0x64, 0x32, 0xde, 0x03,
  852. 0x0a, 0x09, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x12, 0x3b, 0x0a, 0x0c, 0x4b,
  853. 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x41, 0x64, 0x64, 0x12, 0x14, 0x2e, 0x74, 0x65,
  854. 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
  855. 0x74, 0x1a, 0x15, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x41, 0x64, 0x64,
  856. 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0d, 0x4b, 0x6e, 0x6f, 0x77,
  857. 0x6c, 0x65, 0x64, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x15, 0x2e, 0x74, 0x65, 0x6d, 0x70,
  858. 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
  859. 0x1a, 0x16, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74,
  860. 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x0d, 0x4b, 0x6e, 0x6f, 0x77,
  861. 0x6c, 0x65, 0x64, 0x67, 0x65, 0x45, 0x64, 0x69, 0x74, 0x12, 0x1a, 0x2e, 0x74, 0x65, 0x6d, 0x70,
  862. 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x4b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x45, 0x64,
  863. 0x69, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65,
  864. 0x2e, 0x41, 0x64, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x0d,
  865. 0x4b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x19, 0x2e,
  866. 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x4b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64,
  867. 0x67, 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c,
  868. 0x61, 0x74, 0x65, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
  869. 0x12, 0x40, 0x0a, 0x0c, 0x4b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x44, 0x65, 0x6c,
  870. 0x12, 0x19, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x4b, 0x6e, 0x6f, 0x77,
  871. 0x6c, 0x65, 0x64, 0x67, 0x65, 0x44, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x74, 0x65,
  872. 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
  873. 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x0a, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72,
  874. 0x12, 0x17, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x46, 0x69, 0x6e, 0x64,
  875. 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x74, 0x65, 0x6d, 0x70,
  876. 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x52,
  877. 0x65, 0x73, 0x70, 0x12, 0x49, 0x0a, 0x0f, 0x52, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64,
  878. 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x12, 0x17, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74,
  879. 0x65, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a,
  880. 0x1d, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x6d,
  881. 0x6d, 0x65, 0x6e, 0x64, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x42, 0x0d,
  882. 0x5a, 0x0b, 0x2e, 0x2f, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x62, 0x06, 0x70,
  883. 0x72, 0x6f, 0x74, 0x6f, 0x33,
  884. }
  885. var (
  886. file_knowledge_proto_rawDescOnce sync.Once
  887. file_knowledge_proto_rawDescData = file_knowledge_proto_rawDesc
  888. )
  889. func file_knowledge_proto_rawDescGZIP() []byte {
  890. file_knowledge_proto_rawDescOnce.Do(func() {
  891. file_knowledge_proto_rawDescData = protoimpl.X.CompressGZIP(file_knowledge_proto_rawDescData)
  892. })
  893. return file_knowledge_proto_rawDescData
  894. }
  895. var file_knowledge_proto_msgTypes = make([]protoimpl.MessageInfo, 13)
  896. var file_knowledge_proto_goTypes = []interface{}{
  897. (*Question)(nil), // 0: template.Question
  898. (*AddRequest)(nil), // 1: template.AddRequest
  899. (*AddResponse)(nil), // 2: template.AddResponse
  900. (*FindAnswerReq)(nil), // 3: template.FindAnswerReq
  901. (*FindAnswerResp)(nil), // 4: template.FindAnswerResp
  902. (*RecommendAnswerResp)(nil), // 5: template.RecommendAnswerResp
  903. (*ListData)(nil), // 6: template.ListData
  904. (*ListRequest)(nil), // 7: template.ListRequest
  905. (*ListResponse)(nil), // 8: template.ListResponse
  906. (*KnowledgeEntity)(nil), // 9: template.KnowledgeEntity
  907. (*KnowledgeEditReq)(nil), // 10: template.KnowledgeEditReq
  908. (*InfoResponse)(nil), // 11: template.InfoResponse
  909. (*KnowledgeDelReq)(nil), // 12: template.KnowledgeDelReq
  910. }
  911. var file_knowledge_proto_depIdxs = []int32{
  912. 0, // 0: template.FindAnswerResp.data:type_name -> template.Question
  913. 0, // 1: template.RecommendAnswerResp.data:type_name -> template.Question
  914. 9, // 2: template.ListData.Data:type_name -> template.KnowledgeEntity
  915. 6, // 3: template.ListResponse.data:type_name -> template.ListData
  916. 9, // 4: template.InfoResponse.data:type_name -> template.KnowledgeEntity
  917. 1, // 5: template.knowledge.KnowledgeAdd:input_type -> template.AddRequest
  918. 7, // 6: template.knowledge.KnowledgeList:input_type -> template.ListRequest
  919. 10, // 7: template.knowledge.KnowledgeEdit:input_type -> template.KnowledgeEditReq
  920. 9, // 8: template.knowledge.KnowledgeInfo:input_type -> template.KnowledgeEntity
  921. 12, // 9: template.knowledge.KnowledgeDel:input_type -> template.KnowledgeDelReq
  922. 3, // 10: template.knowledge.FindAnswer:input_type -> template.FindAnswerReq
  923. 3, // 11: template.knowledge.RecommendAnswer:input_type -> template.FindAnswerReq
  924. 2, // 12: template.knowledge.KnowledgeAdd:output_type -> template.AddResponse
  925. 8, // 13: template.knowledge.KnowledgeList:output_type -> template.ListResponse
  926. 2, // 14: template.knowledge.KnowledgeEdit:output_type -> template.AddResponse
  927. 11, // 15: template.knowledge.KnowledgeInfo:output_type -> template.InfoResponse
  928. 2, // 16: template.knowledge.KnowledgeDel:output_type -> template.AddResponse
  929. 4, // 17: template.knowledge.FindAnswer:output_type -> template.FindAnswerResp
  930. 5, // 18: template.knowledge.RecommendAnswer:output_type -> template.RecommendAnswerResp
  931. 12, // [12:19] is the sub-list for method output_type
  932. 5, // [5:12] is the sub-list for method input_type
  933. 5, // [5:5] is the sub-list for extension type_name
  934. 5, // [5:5] is the sub-list for extension extendee
  935. 0, // [0:5] is the sub-list for field type_name
  936. }
  937. func init() { file_knowledge_proto_init() }
  938. func file_knowledge_proto_init() {
  939. if File_knowledge_proto != nil {
  940. return
  941. }
  942. if !protoimpl.UnsafeEnabled {
  943. file_knowledge_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  944. switch v := v.(*Question); i {
  945. case 0:
  946. return &v.state
  947. case 1:
  948. return &v.sizeCache
  949. case 2:
  950. return &v.unknownFields
  951. default:
  952. return nil
  953. }
  954. }
  955. file_knowledge_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
  956. switch v := v.(*AddRequest); i {
  957. case 0:
  958. return &v.state
  959. case 1:
  960. return &v.sizeCache
  961. case 2:
  962. return &v.unknownFields
  963. default:
  964. return nil
  965. }
  966. }
  967. file_knowledge_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
  968. switch v := v.(*AddResponse); i {
  969. case 0:
  970. return &v.state
  971. case 1:
  972. return &v.sizeCache
  973. case 2:
  974. return &v.unknownFields
  975. default:
  976. return nil
  977. }
  978. }
  979. file_knowledge_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
  980. switch v := v.(*FindAnswerReq); i {
  981. case 0:
  982. return &v.state
  983. case 1:
  984. return &v.sizeCache
  985. case 2:
  986. return &v.unknownFields
  987. default:
  988. return nil
  989. }
  990. }
  991. file_knowledge_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
  992. switch v := v.(*FindAnswerResp); i {
  993. case 0:
  994. return &v.state
  995. case 1:
  996. return &v.sizeCache
  997. case 2:
  998. return &v.unknownFields
  999. default:
  1000. return nil
  1001. }
  1002. }
  1003. file_knowledge_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
  1004. switch v := v.(*RecommendAnswerResp); i {
  1005. case 0:
  1006. return &v.state
  1007. case 1:
  1008. return &v.sizeCache
  1009. case 2:
  1010. return &v.unknownFields
  1011. default:
  1012. return nil
  1013. }
  1014. }
  1015. file_knowledge_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
  1016. switch v := v.(*ListData); i {
  1017. case 0:
  1018. return &v.state
  1019. case 1:
  1020. return &v.sizeCache
  1021. case 2:
  1022. return &v.unknownFields
  1023. default:
  1024. return nil
  1025. }
  1026. }
  1027. file_knowledge_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
  1028. switch v := v.(*ListRequest); i {
  1029. case 0:
  1030. return &v.state
  1031. case 1:
  1032. return &v.sizeCache
  1033. case 2:
  1034. return &v.unknownFields
  1035. default:
  1036. return nil
  1037. }
  1038. }
  1039. file_knowledge_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
  1040. switch v := v.(*ListResponse); i {
  1041. case 0:
  1042. return &v.state
  1043. case 1:
  1044. return &v.sizeCache
  1045. case 2:
  1046. return &v.unknownFields
  1047. default:
  1048. return nil
  1049. }
  1050. }
  1051. file_knowledge_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
  1052. switch v := v.(*KnowledgeEntity); i {
  1053. case 0:
  1054. return &v.state
  1055. case 1:
  1056. return &v.sizeCache
  1057. case 2:
  1058. return &v.unknownFields
  1059. default:
  1060. return nil
  1061. }
  1062. }
  1063. file_knowledge_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
  1064. switch v := v.(*KnowledgeEditReq); i {
  1065. case 0:
  1066. return &v.state
  1067. case 1:
  1068. return &v.sizeCache
  1069. case 2:
  1070. return &v.unknownFields
  1071. default:
  1072. return nil
  1073. }
  1074. }
  1075. file_knowledge_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
  1076. switch v := v.(*InfoResponse); i {
  1077. case 0:
  1078. return &v.state
  1079. case 1:
  1080. return &v.sizeCache
  1081. case 2:
  1082. return &v.unknownFields
  1083. default:
  1084. return nil
  1085. }
  1086. }
  1087. file_knowledge_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
  1088. switch v := v.(*KnowledgeDelReq); i {
  1089. case 0:
  1090. return &v.state
  1091. case 1:
  1092. return &v.sizeCache
  1093. case 2:
  1094. return &v.unknownFields
  1095. default:
  1096. return nil
  1097. }
  1098. }
  1099. }
  1100. type x struct{}
  1101. out := protoimpl.TypeBuilder{
  1102. File: protoimpl.DescBuilder{
  1103. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  1104. RawDescriptor: file_knowledge_proto_rawDesc,
  1105. NumEnums: 0,
  1106. NumMessages: 13,
  1107. NumExtensions: 0,
  1108. NumServices: 1,
  1109. },
  1110. GoTypes: file_knowledge_proto_goTypes,
  1111. DependencyIndexes: file_knowledge_proto_depIdxs,
  1112. MessageInfos: file_knowledge_proto_msgTypes,
  1113. }.Build()
  1114. File_knowledge_proto = out.File
  1115. file_knowledge_proto_rawDesc = nil
  1116. file_knowledge_proto_goTypes = nil
  1117. file_knowledge_proto_depIdxs = nil
  1118. }
  1119. // Reference imports to suppress errors if they are not otherwise used.
  1120. var _ context.Context
  1121. var _ grpc.ClientConnInterface
  1122. // This is a compile-time assertion to ensure that this generated file
  1123. // is compatible with the grpc package it is being compiled against.
  1124. const _ = grpc.SupportPackageIsVersion6
  1125. // KnowledgeClient is the client API for Knowledge service.
  1126. //
  1127. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  1128. type KnowledgeClient interface {
  1129. //知识新增
  1130. KnowledgeAdd(ctx context.Context, in *AddRequest, opts ...grpc.CallOption) (*AddResponse, error)
  1131. //知识列表
  1132. KnowledgeList(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error)
  1133. //知识编辑
  1134. KnowledgeEdit(ctx context.Context, in *KnowledgeEditReq, opts ...grpc.CallOption) (*AddResponse, error)
  1135. //知识详情
  1136. KnowledgeInfo(ctx context.Context, in *KnowledgeEntity, opts ...grpc.CallOption) (*InfoResponse, error)
  1137. //知识删除
  1138. KnowledgeDel(ctx context.Context, in *KnowledgeDelReq, opts ...grpc.CallOption) (*AddResponse, error)
  1139. //根据问题匹配答案
  1140. FindAnswer(ctx context.Context, in *FindAnswerReq, opts ...grpc.CallOption) (*FindAnswerResp, error)
  1141. //推荐答案
  1142. RecommendAnswer(ctx context.Context, in *FindAnswerReq, opts ...grpc.CallOption) (*RecommendAnswerResp, error)
  1143. }
  1144. type knowledgeClient struct {
  1145. cc grpc.ClientConnInterface
  1146. }
  1147. func NewKnowledgeClient(cc grpc.ClientConnInterface) KnowledgeClient {
  1148. return &knowledgeClient{cc}
  1149. }
  1150. func (c *knowledgeClient) KnowledgeAdd(ctx context.Context, in *AddRequest, opts ...grpc.CallOption) (*AddResponse, error) {
  1151. out := new(AddResponse)
  1152. err := c.cc.Invoke(ctx, "/template.knowledge/KnowledgeAdd", in, out, opts...)
  1153. if err != nil {
  1154. return nil, err
  1155. }
  1156. return out, nil
  1157. }
  1158. func (c *knowledgeClient) KnowledgeList(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) {
  1159. out := new(ListResponse)
  1160. err := c.cc.Invoke(ctx, "/template.knowledge/KnowledgeList", in, out, opts...)
  1161. if err != nil {
  1162. return nil, err
  1163. }
  1164. return out, nil
  1165. }
  1166. func (c *knowledgeClient) KnowledgeEdit(ctx context.Context, in *KnowledgeEditReq, opts ...grpc.CallOption) (*AddResponse, error) {
  1167. out := new(AddResponse)
  1168. err := c.cc.Invoke(ctx, "/template.knowledge/KnowledgeEdit", in, out, opts...)
  1169. if err != nil {
  1170. return nil, err
  1171. }
  1172. return out, nil
  1173. }
  1174. func (c *knowledgeClient) KnowledgeInfo(ctx context.Context, in *KnowledgeEntity, opts ...grpc.CallOption) (*InfoResponse, error) {
  1175. out := new(InfoResponse)
  1176. err := c.cc.Invoke(ctx, "/template.knowledge/KnowledgeInfo", in, out, opts...)
  1177. if err != nil {
  1178. return nil, err
  1179. }
  1180. return out, nil
  1181. }
  1182. func (c *knowledgeClient) KnowledgeDel(ctx context.Context, in *KnowledgeDelReq, opts ...grpc.CallOption) (*AddResponse, error) {
  1183. out := new(AddResponse)
  1184. err := c.cc.Invoke(ctx, "/template.knowledge/KnowledgeDel", in, out, opts...)
  1185. if err != nil {
  1186. return nil, err
  1187. }
  1188. return out, nil
  1189. }
  1190. func (c *knowledgeClient) FindAnswer(ctx context.Context, in *FindAnswerReq, opts ...grpc.CallOption) (*FindAnswerResp, error) {
  1191. out := new(FindAnswerResp)
  1192. err := c.cc.Invoke(ctx, "/template.knowledge/FindAnswer", in, out, opts...)
  1193. if err != nil {
  1194. return nil, err
  1195. }
  1196. return out, nil
  1197. }
  1198. func (c *knowledgeClient) RecommendAnswer(ctx context.Context, in *FindAnswerReq, opts ...grpc.CallOption) (*RecommendAnswerResp, error) {
  1199. out := new(RecommendAnswerResp)
  1200. err := c.cc.Invoke(ctx, "/template.knowledge/RecommendAnswer", in, out, opts...)
  1201. if err != nil {
  1202. return nil, err
  1203. }
  1204. return out, nil
  1205. }
  1206. // KnowledgeServer is the server API for Knowledge service.
  1207. type KnowledgeServer interface {
  1208. //知识新增
  1209. KnowledgeAdd(context.Context, *AddRequest) (*AddResponse, error)
  1210. //知识列表
  1211. KnowledgeList(context.Context, *ListRequest) (*ListResponse, error)
  1212. //知识编辑
  1213. KnowledgeEdit(context.Context, *KnowledgeEditReq) (*AddResponse, error)
  1214. //知识详情
  1215. KnowledgeInfo(context.Context, *KnowledgeEntity) (*InfoResponse, error)
  1216. //知识删除
  1217. KnowledgeDel(context.Context, *KnowledgeDelReq) (*AddResponse, error)
  1218. //根据问题匹配答案
  1219. FindAnswer(context.Context, *FindAnswerReq) (*FindAnswerResp, error)
  1220. //推荐答案
  1221. RecommendAnswer(context.Context, *FindAnswerReq) (*RecommendAnswerResp, error)
  1222. }
  1223. // UnimplementedKnowledgeServer can be embedded to have forward compatible implementations.
  1224. type UnimplementedKnowledgeServer struct {
  1225. }
  1226. func (*UnimplementedKnowledgeServer) KnowledgeAdd(context.Context, *AddRequest) (*AddResponse, error) {
  1227. return nil, status.Errorf(codes.Unimplemented, "method KnowledgeAdd not implemented")
  1228. }
  1229. func (*UnimplementedKnowledgeServer) KnowledgeList(context.Context, *ListRequest) (*ListResponse, error) {
  1230. return nil, status.Errorf(codes.Unimplemented, "method KnowledgeList not implemented")
  1231. }
  1232. func (*UnimplementedKnowledgeServer) KnowledgeEdit(context.Context, *KnowledgeEditReq) (*AddResponse, error) {
  1233. return nil, status.Errorf(codes.Unimplemented, "method KnowledgeEdit not implemented")
  1234. }
  1235. func (*UnimplementedKnowledgeServer) KnowledgeInfo(context.Context, *KnowledgeEntity) (*InfoResponse, error) {
  1236. return nil, status.Errorf(codes.Unimplemented, "method KnowledgeInfo not implemented")
  1237. }
  1238. func (*UnimplementedKnowledgeServer) KnowledgeDel(context.Context, *KnowledgeDelReq) (*AddResponse, error) {
  1239. return nil, status.Errorf(codes.Unimplemented, "method KnowledgeDel not implemented")
  1240. }
  1241. func (*UnimplementedKnowledgeServer) FindAnswer(context.Context, *FindAnswerReq) (*FindAnswerResp, error) {
  1242. return nil, status.Errorf(codes.Unimplemented, "method FindAnswer not implemented")
  1243. }
  1244. func (*UnimplementedKnowledgeServer) RecommendAnswer(context.Context, *FindAnswerReq) (*RecommendAnswerResp, error) {
  1245. return nil, status.Errorf(codes.Unimplemented, "method RecommendAnswer not implemented")
  1246. }
  1247. func RegisterKnowledgeServer(s *grpc.Server, srv KnowledgeServer) {
  1248. s.RegisterService(&_Knowledge_serviceDesc, srv)
  1249. }
  1250. func _Knowledge_KnowledgeAdd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1251. in := new(AddRequest)
  1252. if err := dec(in); err != nil {
  1253. return nil, err
  1254. }
  1255. if interceptor == nil {
  1256. return srv.(KnowledgeServer).KnowledgeAdd(ctx, in)
  1257. }
  1258. info := &grpc.UnaryServerInfo{
  1259. Server: srv,
  1260. FullMethod: "/template.knowledge/KnowledgeAdd",
  1261. }
  1262. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1263. return srv.(KnowledgeServer).KnowledgeAdd(ctx, req.(*AddRequest))
  1264. }
  1265. return interceptor(ctx, in, info, handler)
  1266. }
  1267. func _Knowledge_KnowledgeList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1268. in := new(ListRequest)
  1269. if err := dec(in); err != nil {
  1270. return nil, err
  1271. }
  1272. if interceptor == nil {
  1273. return srv.(KnowledgeServer).KnowledgeList(ctx, in)
  1274. }
  1275. info := &grpc.UnaryServerInfo{
  1276. Server: srv,
  1277. FullMethod: "/template.knowledge/KnowledgeList",
  1278. }
  1279. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1280. return srv.(KnowledgeServer).KnowledgeList(ctx, req.(*ListRequest))
  1281. }
  1282. return interceptor(ctx, in, info, handler)
  1283. }
  1284. func _Knowledge_KnowledgeEdit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1285. in := new(KnowledgeEditReq)
  1286. if err := dec(in); err != nil {
  1287. return nil, err
  1288. }
  1289. if interceptor == nil {
  1290. return srv.(KnowledgeServer).KnowledgeEdit(ctx, in)
  1291. }
  1292. info := &grpc.UnaryServerInfo{
  1293. Server: srv,
  1294. FullMethod: "/template.knowledge/KnowledgeEdit",
  1295. }
  1296. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1297. return srv.(KnowledgeServer).KnowledgeEdit(ctx, req.(*KnowledgeEditReq))
  1298. }
  1299. return interceptor(ctx, in, info, handler)
  1300. }
  1301. func _Knowledge_KnowledgeInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1302. in := new(KnowledgeEntity)
  1303. if err := dec(in); err != nil {
  1304. return nil, err
  1305. }
  1306. if interceptor == nil {
  1307. return srv.(KnowledgeServer).KnowledgeInfo(ctx, in)
  1308. }
  1309. info := &grpc.UnaryServerInfo{
  1310. Server: srv,
  1311. FullMethod: "/template.knowledge/KnowledgeInfo",
  1312. }
  1313. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1314. return srv.(KnowledgeServer).KnowledgeInfo(ctx, req.(*KnowledgeEntity))
  1315. }
  1316. return interceptor(ctx, in, info, handler)
  1317. }
  1318. func _Knowledge_KnowledgeDel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1319. in := new(KnowledgeDelReq)
  1320. if err := dec(in); err != nil {
  1321. return nil, err
  1322. }
  1323. if interceptor == nil {
  1324. return srv.(KnowledgeServer).KnowledgeDel(ctx, in)
  1325. }
  1326. info := &grpc.UnaryServerInfo{
  1327. Server: srv,
  1328. FullMethod: "/template.knowledge/KnowledgeDel",
  1329. }
  1330. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1331. return srv.(KnowledgeServer).KnowledgeDel(ctx, req.(*KnowledgeDelReq))
  1332. }
  1333. return interceptor(ctx, in, info, handler)
  1334. }
  1335. func _Knowledge_FindAnswer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1336. in := new(FindAnswerReq)
  1337. if err := dec(in); err != nil {
  1338. return nil, err
  1339. }
  1340. if interceptor == nil {
  1341. return srv.(KnowledgeServer).FindAnswer(ctx, in)
  1342. }
  1343. info := &grpc.UnaryServerInfo{
  1344. Server: srv,
  1345. FullMethod: "/template.knowledge/FindAnswer",
  1346. }
  1347. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1348. return srv.(KnowledgeServer).FindAnswer(ctx, req.(*FindAnswerReq))
  1349. }
  1350. return interceptor(ctx, in, info, handler)
  1351. }
  1352. func _Knowledge_RecommendAnswer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1353. in := new(FindAnswerReq)
  1354. if err := dec(in); err != nil {
  1355. return nil, err
  1356. }
  1357. if interceptor == nil {
  1358. return srv.(KnowledgeServer).RecommendAnswer(ctx, in)
  1359. }
  1360. info := &grpc.UnaryServerInfo{
  1361. Server: srv,
  1362. FullMethod: "/template.knowledge/RecommendAnswer",
  1363. }
  1364. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1365. return srv.(KnowledgeServer).RecommendAnswer(ctx, req.(*FindAnswerReq))
  1366. }
  1367. return interceptor(ctx, in, info, handler)
  1368. }
  1369. var _Knowledge_serviceDesc = grpc.ServiceDesc{
  1370. ServiceName: "template.knowledge",
  1371. HandlerType: (*KnowledgeServer)(nil),
  1372. Methods: []grpc.MethodDesc{
  1373. {
  1374. MethodName: "KnowledgeAdd",
  1375. Handler: _Knowledge_KnowledgeAdd_Handler,
  1376. },
  1377. {
  1378. MethodName: "KnowledgeList",
  1379. Handler: _Knowledge_KnowledgeList_Handler,
  1380. },
  1381. {
  1382. MethodName: "KnowledgeEdit",
  1383. Handler: _Knowledge_KnowledgeEdit_Handler,
  1384. },
  1385. {
  1386. MethodName: "KnowledgeInfo",
  1387. Handler: _Knowledge_KnowledgeInfo_Handler,
  1388. },
  1389. {
  1390. MethodName: "KnowledgeDel",
  1391. Handler: _Knowledge_KnowledgeDel_Handler,
  1392. },
  1393. {
  1394. MethodName: "FindAnswer",
  1395. Handler: _Knowledge_FindAnswer_Handler,
  1396. },
  1397. {
  1398. MethodName: "RecommendAnswer",
  1399. Handler: _Knowledge_RecommendAnswer_Handler,
  1400. },
  1401. },
  1402. Streams: []grpc.StreamDesc{},
  1403. Metadata: "knowledge.proto",
  1404. }