1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573 |
- // Code generated by protoc-gen-go. DO NOT EDIT.
- // versions:
- // protoc-gen-go v1.27.1
- // protoc v3.19.4
- // source: knowledge.proto
- package knowledge
- import (
- context "context"
- grpc "google.golang.org/grpc"
- codes "google.golang.org/grpc/codes"
- status "google.golang.org/grpc/status"
- protoreflect "google.golang.org/protobuf/reflect/protoreflect"
- protoimpl "google.golang.org/protobuf/runtime/protoimpl"
- reflect "reflect"
- sync "sync"
- )
- const (
- // Verify that this generated code is sufficiently up-to-date.
- _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
- // Verify that runtime/protoimpl is sufficiently up-to-date.
- _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
- )
- type Question struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
- XId string `protobuf:"bytes,1,opt,name=_id,json=Id,proto3" json:"_id,omitempty"`
- Question string `protobuf:"bytes,2,opt,name=question,proto3" json:"question,omitempty"`
- Answer string `protobuf:"bytes,3,opt,name=answer,proto3" json:"answer,omitempty"`
- }
- func (x *Question) Reset() {
- *x = Question{}
- if protoimpl.UnsafeEnabled {
- mi := &file_knowledge_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- }
- func (x *Question) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*Question) ProtoMessage() {}
- func (x *Question) ProtoReflect() protoreflect.Message {
- mi := &file_knowledge_proto_msgTypes[0]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
- }
- // Deprecated: Use Question.ProtoReflect.Descriptor instead.
- func (*Question) Descriptor() ([]byte, []int) {
- return file_knowledge_proto_rawDescGZIP(), []int{0}
- }
- func (x *Question) GetXId() string {
- if x != nil {
- return x.XId
- }
- return ""
- }
- func (x *Question) GetQuestion() string {
- if x != nil {
- return x.Question
- }
- return ""
- }
- func (x *Question) GetAnswer() string {
- if x != nil {
- return x.Answer
- }
- return ""
- }
- type AddRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
- Question string `protobuf:"bytes,1,opt,name=question,proto3" json:"question,omitempty"`
- Answer string `protobuf:"bytes,2,opt,name=answer,proto3" json:"answer,omitempty"`
- EntId int64 `protobuf:"varint,3,opt,name=entId,proto3" json:"entId,omitempty"`
- AppId string `protobuf:"bytes,4,opt,name=appId,proto3" json:"appId,omitempty"`
- EntUserId int64 `protobuf:"varint,5,opt,name=entUserId,proto3" json:"entUserId,omitempty"`
- }
- func (x *AddRequest) Reset() {
- *x = AddRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_knowledge_proto_msgTypes[1]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- }
- func (x *AddRequest) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*AddRequest) ProtoMessage() {}
- func (x *AddRequest) ProtoReflect() protoreflect.Message {
- mi := &file_knowledge_proto_msgTypes[1]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
- }
- // Deprecated: Use AddRequest.ProtoReflect.Descriptor instead.
- func (*AddRequest) Descriptor() ([]byte, []int) {
- return file_knowledge_proto_rawDescGZIP(), []int{1}
- }
- func (x *AddRequest) GetQuestion() string {
- if x != nil {
- return x.Question
- }
- return ""
- }
- func (x *AddRequest) GetAnswer() string {
- if x != nil {
- return x.Answer
- }
- return ""
- }
- func (x *AddRequest) GetEntId() int64 {
- if x != nil {
- return x.EntId
- }
- return 0
- }
- func (x *AddRequest) GetAppId() string {
- if x != nil {
- return x.AppId
- }
- return ""
- }
- func (x *AddRequest) GetEntUserId() int64 {
- if x != nil {
- return x.EntUserId
- }
- return 0
- }
- type AddResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
- ErrorCode int64 `protobuf:"varint,1,opt,name=error_code,json=errorCode,proto3" json:"error_code,omitempty"` //响应代码
- ErrorMsg string `protobuf:"bytes,2,opt,name=error_msg,json=errorMsg,proto3" json:"error_msg,omitempty"` //响应消息
- Data string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` //响应内容
- }
- func (x *AddResponse) Reset() {
- *x = AddResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_knowledge_proto_msgTypes[2]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- }
- func (x *AddResponse) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*AddResponse) ProtoMessage() {}
- func (x *AddResponse) ProtoReflect() protoreflect.Message {
- mi := &file_knowledge_proto_msgTypes[2]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
- }
- // Deprecated: Use AddResponse.ProtoReflect.Descriptor instead.
- func (*AddResponse) Descriptor() ([]byte, []int) {
- return file_knowledge_proto_rawDescGZIP(), []int{2}
- }
- func (x *AddResponse) GetErrorCode() int64 {
- if x != nil {
- return x.ErrorCode
- }
- return 0
- }
- func (x *AddResponse) GetErrorMsg() string {
- if x != nil {
- return x.ErrorMsg
- }
- return ""
- }
- func (x *AddResponse) GetData() string {
- if x != nil {
- return x.Data
- }
- return ""
- }
- type FindAnswerReq struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
- Question string `protobuf:"bytes,1,opt,name=question,proto3" json:"question,omitempty"`
- RobotEntId string `protobuf:"bytes,2,opt,name=robotEntId,proto3" json:"robotEntId,omitempty"` //机器人的企业id
- Type int64 `protobuf:"varint,3,opt,name=type,proto3" json:"type,omitempty"` // 1文字 2语音
- }
- func (x *FindAnswerReq) Reset() {
- *x = FindAnswerReq{}
- if protoimpl.UnsafeEnabled {
- mi := &file_knowledge_proto_msgTypes[3]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- }
- func (x *FindAnswerReq) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*FindAnswerReq) ProtoMessage() {}
- func (x *FindAnswerReq) ProtoReflect() protoreflect.Message {
- mi := &file_knowledge_proto_msgTypes[3]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
- }
- // Deprecated: Use FindAnswerReq.ProtoReflect.Descriptor instead.
- func (*FindAnswerReq) Descriptor() ([]byte, []int) {
- return file_knowledge_proto_rawDescGZIP(), []int{3}
- }
- func (x *FindAnswerReq) GetQuestion() string {
- if x != nil {
- return x.Question
- }
- return ""
- }
- func (x *FindAnswerReq) GetRobotEntId() string {
- if x != nil {
- return x.RobotEntId
- }
- return ""
- }
- func (x *FindAnswerReq) GetType() int64 {
- if x != nil {
- return x.Type
- }
- return 0
- }
- type FindAnswerResp struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
- ErrorCode int64 `protobuf:"varint,1,opt,name=error_code,json=errorCode,proto3" json:"error_code,omitempty"` //响应代码
- ErrorMsg string `protobuf:"bytes,2,opt,name=error_msg,json=errorMsg,proto3" json:"error_msg,omitempty"` //响应消息
- Data *Question `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` //响应内容
- }
- func (x *FindAnswerResp) Reset() {
- *x = FindAnswerResp{}
- if protoimpl.UnsafeEnabled {
- mi := &file_knowledge_proto_msgTypes[4]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- }
- func (x *FindAnswerResp) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*FindAnswerResp) ProtoMessage() {}
- func (x *FindAnswerResp) ProtoReflect() protoreflect.Message {
- mi := &file_knowledge_proto_msgTypes[4]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
- }
- // Deprecated: Use FindAnswerResp.ProtoReflect.Descriptor instead.
- func (*FindAnswerResp) Descriptor() ([]byte, []int) {
- return file_knowledge_proto_rawDescGZIP(), []int{4}
- }
- func (x *FindAnswerResp) GetErrorCode() int64 {
- if x != nil {
- return x.ErrorCode
- }
- return 0
- }
- func (x *FindAnswerResp) GetErrorMsg() string {
- if x != nil {
- return x.ErrorMsg
- }
- return ""
- }
- func (x *FindAnswerResp) GetData() *Question {
- if x != nil {
- return x.Data
- }
- return nil
- }
- type RecommendAnswerResp struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
- ErrorCode int64 `protobuf:"varint,1,opt,name=error_code,json=errorCode,proto3" json:"error_code,omitempty"` //响应代码
- ErrorMsg string `protobuf:"bytes,2,opt,name=error_msg,json=errorMsg,proto3" json:"error_msg,omitempty"` //响应消息
- Data []*Question `protobuf:"bytes,3,rep,name=data,proto3" json:"data,omitempty"` //响应内容
- }
- func (x *RecommendAnswerResp) Reset() {
- *x = RecommendAnswerResp{}
- if protoimpl.UnsafeEnabled {
- mi := &file_knowledge_proto_msgTypes[5]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- }
- func (x *RecommendAnswerResp) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*RecommendAnswerResp) ProtoMessage() {}
- func (x *RecommendAnswerResp) ProtoReflect() protoreflect.Message {
- mi := &file_knowledge_proto_msgTypes[5]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
- }
- // Deprecated: Use RecommendAnswerResp.ProtoReflect.Descriptor instead.
- func (*RecommendAnswerResp) Descriptor() ([]byte, []int) {
- return file_knowledge_proto_rawDescGZIP(), []int{5}
- }
- func (x *RecommendAnswerResp) GetErrorCode() int64 {
- if x != nil {
- return x.ErrorCode
- }
- return 0
- }
- func (x *RecommendAnswerResp) GetErrorMsg() string {
- if x != nil {
- return x.ErrorMsg
- }
- return ""
- }
- func (x *RecommendAnswerResp) GetData() []*Question {
- if x != nil {
- return x.Data
- }
- return nil
- }
- type ListData struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
- Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"`
- Data []*KnowledgeEntity `protobuf:"bytes,2,rep,name=Data,proto3" json:"Data,omitempty"`
- }
- func (x *ListData) Reset() {
- *x = ListData{}
- if protoimpl.UnsafeEnabled {
- mi := &file_knowledge_proto_msgTypes[6]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- }
- func (x *ListData) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*ListData) ProtoMessage() {}
- func (x *ListData) ProtoReflect() protoreflect.Message {
- mi := &file_knowledge_proto_msgTypes[6]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
- }
- // Deprecated: Use ListData.ProtoReflect.Descriptor instead.
- func (*ListData) Descriptor() ([]byte, []int) {
- return file_knowledge_proto_rawDescGZIP(), []int{6}
- }
- func (x *ListData) GetTotal() int64 {
- if x != nil {
- return x.Total
- }
- return 0
- }
- func (x *ListData) GetData() []*KnowledgeEntity {
- if x != nil {
- return x.Data
- }
- return nil
- }
- type ListRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
- PageSize int64 `protobuf:"varint,1,opt,name=pageSize,proto3" json:"pageSize,omitempty"` //每页数据量,默认10
- PageIndex int64 `protobuf:"varint,2,opt,name=pageIndex,proto3" json:"pageIndex,omitempty"` //页码;默认第一页
- EntId int64 `protobuf:"varint,3,opt,name=entId,proto3" json:"entId,omitempty"` //租户id
- }
- func (x *ListRequest) Reset() {
- *x = ListRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_knowledge_proto_msgTypes[7]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- }
- func (x *ListRequest) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*ListRequest) ProtoMessage() {}
- func (x *ListRequest) ProtoReflect() protoreflect.Message {
- mi := &file_knowledge_proto_msgTypes[7]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
- }
- // Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.
- func (*ListRequest) Descriptor() ([]byte, []int) {
- return file_knowledge_proto_rawDescGZIP(), []int{7}
- }
- func (x *ListRequest) GetPageSize() int64 {
- if x != nil {
- return x.PageSize
- }
- return 0
- }
- func (x *ListRequest) GetPageIndex() int64 {
- if x != nil {
- return x.PageIndex
- }
- return 0
- }
- func (x *ListRequest) GetEntId() int64 {
- if x != nil {
- return x.EntId
- }
- return 0
- }
- type ListResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
- ErrorCode int64 `protobuf:"varint,1,opt,name=error_code,json=errorCode,proto3" json:"error_code,omitempty"` //响应代码
- ErrorMsg string `protobuf:"bytes,2,opt,name=error_msg,json=errorMsg,proto3" json:"error_msg,omitempty"` //响应消息
- Data *ListData `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` //响应内容
- }
- func (x *ListResponse) Reset() {
- *x = ListResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_knowledge_proto_msgTypes[8]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- }
- func (x *ListResponse) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*ListResponse) ProtoMessage() {}
- func (x *ListResponse) ProtoReflect() protoreflect.Message {
- mi := &file_knowledge_proto_msgTypes[8]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
- }
- // Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.
- func (*ListResponse) Descriptor() ([]byte, []int) {
- return file_knowledge_proto_rawDescGZIP(), []int{8}
- }
- func (x *ListResponse) GetErrorCode() int64 {
- if x != nil {
- return x.ErrorCode
- }
- return 0
- }
- func (x *ListResponse) GetErrorMsg() string {
- if x != nil {
- return x.ErrorMsg
- }
- return ""
- }
- func (x *ListResponse) GetData() *ListData {
- if x != nil {
- return x.Data
- }
- return nil
- }
- type KnowledgeEntity struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
- Question string `protobuf:"bytes,1,opt,name=question,proto3" json:"question,omitempty"` //问题
- Answer string `protobuf:"bytes,2,opt,name=answer,proto3" json:"answer,omitempty"` //答案
- AnswerId int64 `protobuf:"varint,3,opt,name=answerId,proto3" json:"answerId,omitempty"` //答案标识
- State int64 `protobuf:"varint,4,opt,name=state,proto3" json:"state,omitempty"` //知识状态0无效1有效
- Person string `protobuf:"bytes,5,opt,name=person,proto3" json:"person,omitempty"` //人员姓名
- KnowledgeId int64 `protobuf:"varint,6,opt,name=knowledgeId,proto3" json:"knowledgeId,omitempty"`
- }
- func (x *KnowledgeEntity) Reset() {
- *x = KnowledgeEntity{}
- if protoimpl.UnsafeEnabled {
- mi := &file_knowledge_proto_msgTypes[9]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- }
- func (x *KnowledgeEntity) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*KnowledgeEntity) ProtoMessage() {}
- func (x *KnowledgeEntity) ProtoReflect() protoreflect.Message {
- mi := &file_knowledge_proto_msgTypes[9]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
- }
- // Deprecated: Use KnowledgeEntity.ProtoReflect.Descriptor instead.
- func (*KnowledgeEntity) Descriptor() ([]byte, []int) {
- return file_knowledge_proto_rawDescGZIP(), []int{9}
- }
- func (x *KnowledgeEntity) GetQuestion() string {
- if x != nil {
- return x.Question
- }
- return ""
- }
- func (x *KnowledgeEntity) GetAnswer() string {
- if x != nil {
- return x.Answer
- }
- return ""
- }
- func (x *KnowledgeEntity) GetAnswerId() int64 {
- if x != nil {
- return x.AnswerId
- }
- return 0
- }
- func (x *KnowledgeEntity) GetState() int64 {
- if x != nil {
- return x.State
- }
- return 0
- }
- func (x *KnowledgeEntity) GetPerson() string {
- if x != nil {
- return x.Person
- }
- return ""
- }
- func (x *KnowledgeEntity) GetKnowledgeId() int64 {
- if x != nil {
- return x.KnowledgeId
- }
- return 0
- }
- type KnowledgeEditReq struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
- Question string `protobuf:"bytes,1,opt,name=question,proto3" json:"question,omitempty"` //问题
- Answer string `protobuf:"bytes,2,opt,name=answer,proto3" json:"answer,omitempty"` //答案
- AnswerId int64 `protobuf:"varint,3,opt,name=answerId,proto3" json:"answerId,omitempty"` //答案标识
- EntUserId int64 `protobuf:"varint,5,opt,name=entUserId,proto3" json:"entUserId,omitempty"`
- EntId int64 `protobuf:"varint,6,opt,name=entId,proto3" json:"entId,omitempty"` //租户id
- KnowledgeId int64 `protobuf:"varint,7,opt,name=knowledgeId,proto3" json:"knowledgeId,omitempty"` //知识库id
- AppId string `protobuf:"bytes,8,opt,name=appId,proto3" json:"appId,omitempty"`
- }
- func (x *KnowledgeEditReq) Reset() {
- *x = KnowledgeEditReq{}
- if protoimpl.UnsafeEnabled {
- mi := &file_knowledge_proto_msgTypes[10]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- }
- func (x *KnowledgeEditReq) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*KnowledgeEditReq) ProtoMessage() {}
- func (x *KnowledgeEditReq) ProtoReflect() protoreflect.Message {
- mi := &file_knowledge_proto_msgTypes[10]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
- }
- // Deprecated: Use KnowledgeEditReq.ProtoReflect.Descriptor instead.
- func (*KnowledgeEditReq) Descriptor() ([]byte, []int) {
- return file_knowledge_proto_rawDescGZIP(), []int{10}
- }
- func (x *KnowledgeEditReq) GetQuestion() string {
- if x != nil {
- return x.Question
- }
- return ""
- }
- func (x *KnowledgeEditReq) GetAnswer() string {
- if x != nil {
- return x.Answer
- }
- return ""
- }
- func (x *KnowledgeEditReq) GetAnswerId() int64 {
- if x != nil {
- return x.AnswerId
- }
- return 0
- }
- func (x *KnowledgeEditReq) GetEntUserId() int64 {
- if x != nil {
- return x.EntUserId
- }
- return 0
- }
- func (x *KnowledgeEditReq) GetEntId() int64 {
- if x != nil {
- return x.EntId
- }
- return 0
- }
- func (x *KnowledgeEditReq) GetKnowledgeId() int64 {
- if x != nil {
- return x.KnowledgeId
- }
- return 0
- }
- func (x *KnowledgeEditReq) GetAppId() string {
- if x != nil {
- return x.AppId
- }
- return ""
- }
- type InfoResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
- ErrorCode int64 `protobuf:"varint,1,opt,name=error_code,json=errorCode,proto3" json:"error_code,omitempty"` //响应代码
- ErrorMsg string `protobuf:"bytes,2,opt,name=error_msg,json=errorMsg,proto3" json:"error_msg,omitempty"` //响应消息
- Data *KnowledgeEntity `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` //响应内容
- }
- func (x *InfoResponse) Reset() {
- *x = InfoResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_knowledge_proto_msgTypes[11]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- }
- func (x *InfoResponse) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*InfoResponse) ProtoMessage() {}
- func (x *InfoResponse) ProtoReflect() protoreflect.Message {
- mi := &file_knowledge_proto_msgTypes[11]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
- }
- // Deprecated: Use InfoResponse.ProtoReflect.Descriptor instead.
- func (*InfoResponse) Descriptor() ([]byte, []int) {
- return file_knowledge_proto_rawDescGZIP(), []int{11}
- }
- func (x *InfoResponse) GetErrorCode() int64 {
- if x != nil {
- return x.ErrorCode
- }
- return 0
- }
- func (x *InfoResponse) GetErrorMsg() string {
- if x != nil {
- return x.ErrorMsg
- }
- return ""
- }
- func (x *InfoResponse) GetData() *KnowledgeEntity {
- if x != nil {
- return x.Data
- }
- return nil
- }
- type KnowledgeDelReq struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
- AnswerId int64 `protobuf:"varint,1,opt,name=answerId,proto3" json:"answerId,omitempty"`
- }
- func (x *KnowledgeDelReq) Reset() {
- *x = KnowledgeDelReq{}
- if protoimpl.UnsafeEnabled {
- mi := &file_knowledge_proto_msgTypes[12]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- }
- func (x *KnowledgeDelReq) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*KnowledgeDelReq) ProtoMessage() {}
- func (x *KnowledgeDelReq) ProtoReflect() protoreflect.Message {
- mi := &file_knowledge_proto_msgTypes[12]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
- }
- // Deprecated: Use KnowledgeDelReq.ProtoReflect.Descriptor instead.
- func (*KnowledgeDelReq) Descriptor() ([]byte, []int) {
- return file_knowledge_proto_rawDescGZIP(), []int{12}
- }
- func (x *KnowledgeDelReq) GetAnswerId() int64 {
- if x != nil {
- return x.AnswerId
- }
- return 0
- }
- var File_knowledge_proto protoreflect.FileDescriptor
- var file_knowledge_proto_rawDesc = []byte{
- 0x0a, 0x0f, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x12, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x4f, 0x0a, 0x08, 0x51,
- 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0f, 0x0a, 0x03, 0x5f, 0x69, 0x64, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x71, 0x75, 0x65, 0x73,
- 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x71, 0x75, 0x65, 0x73,
- 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x18, 0x03,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x22, 0x8a, 0x01, 0x0a,
- 0x0a, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x71,
- 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x71,
- 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6e, 0x73, 0x77, 0x65,
- 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x12,
- 0x14, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05,
- 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x18, 0x04,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x65,
- 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09,
- 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x5d, 0x0a, 0x0b, 0x41, 0x64, 0x64,
- 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f,
- 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x72,
- 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72,
- 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f,
- 0x72, 0x4d, 0x73, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x5f, 0x0a, 0x0d, 0x46, 0x69, 0x6e, 0x64,
- 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x71, 0x75, 0x65,
- 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x71, 0x75, 0x65,
- 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x6f, 0x62, 0x6f, 0x74, 0x45, 0x6e,
- 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x6f, 0x62, 0x6f, 0x74,
- 0x45, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20,
- 0x01, 0x28, 0x03, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x74, 0x0a, 0x0e, 0x46, 0x69, 0x6e,
- 0x64, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x65,
- 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
- 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x72,
- 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65,
- 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x26, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18,
- 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65,
- 0x2e, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22,
- 0x79, 0x0a, 0x13, 0x52, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x41, 0x6e, 0x73, 0x77,
- 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f,
- 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f,
- 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d,
- 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d,
- 0x73, 0x67, 0x12, 0x26, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b,
- 0x32, 0x12, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x73,
- 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x4f, 0x0a, 0x08, 0x4c, 0x69,
- 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18,
- 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x2d, 0x0a, 0x04,
- 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x74, 0x65, 0x6d,
- 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x4b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x45,
- 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x04, 0x44, 0x61, 0x74, 0x61, 0x22, 0x5d, 0x0a, 0x0b, 0x4c,
- 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61,
- 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x61,
- 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e,
- 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x49,
- 0x6e, 0x64, 0x65, 0x78, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x03, 0x20,
- 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x72, 0x0a, 0x0c, 0x4c, 0x69,
- 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72,
- 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09,
- 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x72, 0x72,
- 0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72,
- 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x26, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03,
- 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e,
- 0x4c, 0x69, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xb1,
- 0x01, 0x0a, 0x0f, 0x4b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x69,
- 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16,
- 0x0a, 0x06, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
- 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72,
- 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72,
- 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
- 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x73,
- 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e,
- 0x12, 0x20, 0x0a, 0x0b, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x49, 0x64, 0x18,
- 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65,
- 0x49, 0x64, 0x22, 0xce, 0x01, 0x0a, 0x10, 0x4b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65,
- 0x45, 0x64, 0x69, 0x74, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x71, 0x75, 0x65, 0x73, 0x74,
- 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x71, 0x75, 0x65, 0x73, 0x74,
- 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x18, 0x02, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x61,
- 0x6e, 0x73, 0x77, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x61,
- 0x6e, 0x73, 0x77, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73,
- 0x65, 0x72, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x6e, 0x74, 0x55,
- 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x06,
- 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x6b,
- 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03,
- 0x52, 0x0b, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x49, 0x64, 0x12, 0x14, 0x0a,
- 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70,
- 0x70, 0x49, 0x64, 0x22, 0x79, 0x0a, 0x0c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f,
- 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64,
- 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f,
- 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18,
- 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x12,
- 0x2d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e,
- 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x4b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64,
- 0x67, 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x2d,
- 0x0a, 0x0f, 0x4b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x44, 0x65, 0x6c, 0x52, 0x65,
- 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20,
- 0x01, 0x28, 0x03, 0x52, 0x08, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x49, 0x64, 0x32, 0xde, 0x03,
- 0x0a, 0x09, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x12, 0x3b, 0x0a, 0x0c, 0x4b,
- 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x41, 0x64, 0x64, 0x12, 0x14, 0x2e, 0x74, 0x65,
- 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
- 0x74, 0x1a, 0x15, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x41, 0x64, 0x64,
- 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0d, 0x4b, 0x6e, 0x6f, 0x77,
- 0x6c, 0x65, 0x64, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x15, 0x2e, 0x74, 0x65, 0x6d, 0x70,
- 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
- 0x1a, 0x16, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74,
- 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x0d, 0x4b, 0x6e, 0x6f, 0x77,
- 0x6c, 0x65, 0x64, 0x67, 0x65, 0x45, 0x64, 0x69, 0x74, 0x12, 0x1a, 0x2e, 0x74, 0x65, 0x6d, 0x70,
- 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x4b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x45, 0x64,
- 0x69, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65,
- 0x2e, 0x41, 0x64, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x0d,
- 0x4b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x19, 0x2e,
- 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x4b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64,
- 0x67, 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c,
- 0x61, 0x74, 0x65, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
- 0x12, 0x40, 0x0a, 0x0c, 0x4b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x44, 0x65, 0x6c,
- 0x12, 0x19, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x4b, 0x6e, 0x6f, 0x77,
- 0x6c, 0x65, 0x64, 0x67, 0x65, 0x44, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x74, 0x65,
- 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
- 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x0a, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72,
- 0x12, 0x17, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x46, 0x69, 0x6e, 0x64,
- 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x74, 0x65, 0x6d, 0x70,
- 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x52,
- 0x65, 0x73, 0x70, 0x12, 0x49, 0x0a, 0x0f, 0x52, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64,
- 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x12, 0x17, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74,
- 0x65, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a,
- 0x1d, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x6d,
- 0x6d, 0x65, 0x6e, 0x64, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x42, 0x0d,
- 0x5a, 0x0b, 0x2e, 0x2f, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x62, 0x06, 0x70,
- 0x72, 0x6f, 0x74, 0x6f, 0x33,
- }
- var (
- file_knowledge_proto_rawDescOnce sync.Once
- file_knowledge_proto_rawDescData = file_knowledge_proto_rawDesc
- )
- func file_knowledge_proto_rawDescGZIP() []byte {
- file_knowledge_proto_rawDescOnce.Do(func() {
- file_knowledge_proto_rawDescData = protoimpl.X.CompressGZIP(file_knowledge_proto_rawDescData)
- })
- return file_knowledge_proto_rawDescData
- }
- var file_knowledge_proto_msgTypes = make([]protoimpl.MessageInfo, 13)
- var file_knowledge_proto_goTypes = []interface{}{
- (*Question)(nil), // 0: template.Question
- (*AddRequest)(nil), // 1: template.AddRequest
- (*AddResponse)(nil), // 2: template.AddResponse
- (*FindAnswerReq)(nil), // 3: template.FindAnswerReq
- (*FindAnswerResp)(nil), // 4: template.FindAnswerResp
- (*RecommendAnswerResp)(nil), // 5: template.RecommendAnswerResp
- (*ListData)(nil), // 6: template.ListData
- (*ListRequest)(nil), // 7: template.ListRequest
- (*ListResponse)(nil), // 8: template.ListResponse
- (*KnowledgeEntity)(nil), // 9: template.KnowledgeEntity
- (*KnowledgeEditReq)(nil), // 10: template.KnowledgeEditReq
- (*InfoResponse)(nil), // 11: template.InfoResponse
- (*KnowledgeDelReq)(nil), // 12: template.KnowledgeDelReq
- }
- var file_knowledge_proto_depIdxs = []int32{
- 0, // 0: template.FindAnswerResp.data:type_name -> template.Question
- 0, // 1: template.RecommendAnswerResp.data:type_name -> template.Question
- 9, // 2: template.ListData.Data:type_name -> template.KnowledgeEntity
- 6, // 3: template.ListResponse.data:type_name -> template.ListData
- 9, // 4: template.InfoResponse.data:type_name -> template.KnowledgeEntity
- 1, // 5: template.knowledge.KnowledgeAdd:input_type -> template.AddRequest
- 7, // 6: template.knowledge.KnowledgeList:input_type -> template.ListRequest
- 10, // 7: template.knowledge.KnowledgeEdit:input_type -> template.KnowledgeEditReq
- 9, // 8: template.knowledge.KnowledgeInfo:input_type -> template.KnowledgeEntity
- 12, // 9: template.knowledge.KnowledgeDel:input_type -> template.KnowledgeDelReq
- 3, // 10: template.knowledge.FindAnswer:input_type -> template.FindAnswerReq
- 3, // 11: template.knowledge.RecommendAnswer:input_type -> template.FindAnswerReq
- 2, // 12: template.knowledge.KnowledgeAdd:output_type -> template.AddResponse
- 8, // 13: template.knowledge.KnowledgeList:output_type -> template.ListResponse
- 2, // 14: template.knowledge.KnowledgeEdit:output_type -> template.AddResponse
- 11, // 15: template.knowledge.KnowledgeInfo:output_type -> template.InfoResponse
- 2, // 16: template.knowledge.KnowledgeDel:output_type -> template.AddResponse
- 4, // 17: template.knowledge.FindAnswer:output_type -> template.FindAnswerResp
- 5, // 18: template.knowledge.RecommendAnswer:output_type -> template.RecommendAnswerResp
- 12, // [12:19] is the sub-list for method output_type
- 5, // [5:12] is the sub-list for method input_type
- 5, // [5:5] is the sub-list for extension type_name
- 5, // [5:5] is the sub-list for extension extendee
- 0, // [0:5] is the sub-list for field type_name
- }
- func init() { file_knowledge_proto_init() }
- func file_knowledge_proto_init() {
- if File_knowledge_proto != nil {
- return
- }
- if !protoimpl.UnsafeEnabled {
- file_knowledge_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Question); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_knowledge_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*AddRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_knowledge_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*AddResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_knowledge_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*FindAnswerReq); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_knowledge_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*FindAnswerResp); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_knowledge_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*RecommendAnswerResp); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_knowledge_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ListData); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_knowledge_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ListRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_knowledge_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ListResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_knowledge_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*KnowledgeEntity); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_knowledge_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*KnowledgeEditReq); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_knowledge_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*InfoResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_knowledge_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*KnowledgeDelReq); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- }
- type x struct{}
- out := protoimpl.TypeBuilder{
- File: protoimpl.DescBuilder{
- GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_knowledge_proto_rawDesc,
- NumEnums: 0,
- NumMessages: 13,
- NumExtensions: 0,
- NumServices: 1,
- },
- GoTypes: file_knowledge_proto_goTypes,
- DependencyIndexes: file_knowledge_proto_depIdxs,
- MessageInfos: file_knowledge_proto_msgTypes,
- }.Build()
- File_knowledge_proto = out.File
- file_knowledge_proto_rawDesc = nil
- file_knowledge_proto_goTypes = nil
- file_knowledge_proto_depIdxs = nil
- }
- // Reference imports to suppress errors if they are not otherwise used.
- var _ context.Context
- var _ grpc.ClientConnInterface
- // This is a compile-time assertion to ensure that this generated file
- // is compatible with the grpc package it is being compiled against.
- const _ = grpc.SupportPackageIsVersion6
- // KnowledgeClient is the client API for Knowledge service.
- //
- // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
- type KnowledgeClient interface {
- //知识新增
- KnowledgeAdd(ctx context.Context, in *AddRequest, opts ...grpc.CallOption) (*AddResponse, error)
- //知识列表
- KnowledgeList(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error)
- //知识编辑
- KnowledgeEdit(ctx context.Context, in *KnowledgeEditReq, opts ...grpc.CallOption) (*AddResponse, error)
- //知识详情
- KnowledgeInfo(ctx context.Context, in *KnowledgeEntity, opts ...grpc.CallOption) (*InfoResponse, error)
- //知识删除
- KnowledgeDel(ctx context.Context, in *KnowledgeDelReq, opts ...grpc.CallOption) (*AddResponse, error)
- //根据问题匹配答案
- FindAnswer(ctx context.Context, in *FindAnswerReq, opts ...grpc.CallOption) (*FindAnswerResp, error)
- //推荐答案
- RecommendAnswer(ctx context.Context, in *FindAnswerReq, opts ...grpc.CallOption) (*RecommendAnswerResp, error)
- }
- type knowledgeClient struct {
- cc grpc.ClientConnInterface
- }
- func NewKnowledgeClient(cc grpc.ClientConnInterface) KnowledgeClient {
- return &knowledgeClient{cc}
- }
- func (c *knowledgeClient) KnowledgeAdd(ctx context.Context, in *AddRequest, opts ...grpc.CallOption) (*AddResponse, error) {
- out := new(AddResponse)
- err := c.cc.Invoke(ctx, "/template.knowledge/KnowledgeAdd", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *knowledgeClient) KnowledgeList(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) {
- out := new(ListResponse)
- err := c.cc.Invoke(ctx, "/template.knowledge/KnowledgeList", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *knowledgeClient) KnowledgeEdit(ctx context.Context, in *KnowledgeEditReq, opts ...grpc.CallOption) (*AddResponse, error) {
- out := new(AddResponse)
- err := c.cc.Invoke(ctx, "/template.knowledge/KnowledgeEdit", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *knowledgeClient) KnowledgeInfo(ctx context.Context, in *KnowledgeEntity, opts ...grpc.CallOption) (*InfoResponse, error) {
- out := new(InfoResponse)
- err := c.cc.Invoke(ctx, "/template.knowledge/KnowledgeInfo", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *knowledgeClient) KnowledgeDel(ctx context.Context, in *KnowledgeDelReq, opts ...grpc.CallOption) (*AddResponse, error) {
- out := new(AddResponse)
- err := c.cc.Invoke(ctx, "/template.knowledge/KnowledgeDel", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *knowledgeClient) FindAnswer(ctx context.Context, in *FindAnswerReq, opts ...grpc.CallOption) (*FindAnswerResp, error) {
- out := new(FindAnswerResp)
- err := c.cc.Invoke(ctx, "/template.knowledge/FindAnswer", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *knowledgeClient) RecommendAnswer(ctx context.Context, in *FindAnswerReq, opts ...grpc.CallOption) (*RecommendAnswerResp, error) {
- out := new(RecommendAnswerResp)
- err := c.cc.Invoke(ctx, "/template.knowledge/RecommendAnswer", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- // KnowledgeServer is the server API for Knowledge service.
- type KnowledgeServer interface {
- //知识新增
- KnowledgeAdd(context.Context, *AddRequest) (*AddResponse, error)
- //知识列表
- KnowledgeList(context.Context, *ListRequest) (*ListResponse, error)
- //知识编辑
- KnowledgeEdit(context.Context, *KnowledgeEditReq) (*AddResponse, error)
- //知识详情
- KnowledgeInfo(context.Context, *KnowledgeEntity) (*InfoResponse, error)
- //知识删除
- KnowledgeDel(context.Context, *KnowledgeDelReq) (*AddResponse, error)
- //根据问题匹配答案
- FindAnswer(context.Context, *FindAnswerReq) (*FindAnswerResp, error)
- //推荐答案
- RecommendAnswer(context.Context, *FindAnswerReq) (*RecommendAnswerResp, error)
- }
- // UnimplementedKnowledgeServer can be embedded to have forward compatible implementations.
- type UnimplementedKnowledgeServer struct {
- }
- func (*UnimplementedKnowledgeServer) KnowledgeAdd(context.Context, *AddRequest) (*AddResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method KnowledgeAdd not implemented")
- }
- func (*UnimplementedKnowledgeServer) KnowledgeList(context.Context, *ListRequest) (*ListResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method KnowledgeList not implemented")
- }
- func (*UnimplementedKnowledgeServer) KnowledgeEdit(context.Context, *KnowledgeEditReq) (*AddResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method KnowledgeEdit not implemented")
- }
- func (*UnimplementedKnowledgeServer) KnowledgeInfo(context.Context, *KnowledgeEntity) (*InfoResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method KnowledgeInfo not implemented")
- }
- func (*UnimplementedKnowledgeServer) KnowledgeDel(context.Context, *KnowledgeDelReq) (*AddResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method KnowledgeDel not implemented")
- }
- func (*UnimplementedKnowledgeServer) FindAnswer(context.Context, *FindAnswerReq) (*FindAnswerResp, error) {
- return nil, status.Errorf(codes.Unimplemented, "method FindAnswer not implemented")
- }
- func (*UnimplementedKnowledgeServer) RecommendAnswer(context.Context, *FindAnswerReq) (*RecommendAnswerResp, error) {
- return nil, status.Errorf(codes.Unimplemented, "method RecommendAnswer not implemented")
- }
- func RegisterKnowledgeServer(s *grpc.Server, srv KnowledgeServer) {
- s.RegisterService(&_Knowledge_serviceDesc, srv)
- }
- func _Knowledge_KnowledgeAdd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(AddRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(KnowledgeServer).KnowledgeAdd(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/template.knowledge/KnowledgeAdd",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(KnowledgeServer).KnowledgeAdd(ctx, req.(*AddRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Knowledge_KnowledgeList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(ListRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(KnowledgeServer).KnowledgeList(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/template.knowledge/KnowledgeList",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(KnowledgeServer).KnowledgeList(ctx, req.(*ListRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Knowledge_KnowledgeEdit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(KnowledgeEditReq)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(KnowledgeServer).KnowledgeEdit(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/template.knowledge/KnowledgeEdit",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(KnowledgeServer).KnowledgeEdit(ctx, req.(*KnowledgeEditReq))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Knowledge_KnowledgeInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(KnowledgeEntity)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(KnowledgeServer).KnowledgeInfo(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/template.knowledge/KnowledgeInfo",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(KnowledgeServer).KnowledgeInfo(ctx, req.(*KnowledgeEntity))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Knowledge_KnowledgeDel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(KnowledgeDelReq)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(KnowledgeServer).KnowledgeDel(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/template.knowledge/KnowledgeDel",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(KnowledgeServer).KnowledgeDel(ctx, req.(*KnowledgeDelReq))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Knowledge_FindAnswer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(FindAnswerReq)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(KnowledgeServer).FindAnswer(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/template.knowledge/FindAnswer",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(KnowledgeServer).FindAnswer(ctx, req.(*FindAnswerReq))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Knowledge_RecommendAnswer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(FindAnswerReq)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(KnowledgeServer).RecommendAnswer(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/template.knowledge/RecommendAnswer",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(KnowledgeServer).RecommendAnswer(ctx, req.(*FindAnswerReq))
- }
- return interceptor(ctx, in, info, handler)
- }
- var _Knowledge_serviceDesc = grpc.ServiceDesc{
- ServiceName: "template.knowledge",
- HandlerType: (*KnowledgeServer)(nil),
- Methods: []grpc.MethodDesc{
- {
- MethodName: "KnowledgeAdd",
- Handler: _Knowledge_KnowledgeAdd_Handler,
- },
- {
- MethodName: "KnowledgeList",
- Handler: _Knowledge_KnowledgeList_Handler,
- },
- {
- MethodName: "KnowledgeEdit",
- Handler: _Knowledge_KnowledgeEdit_Handler,
- },
- {
- MethodName: "KnowledgeInfo",
- Handler: _Knowledge_KnowledgeInfo_Handler,
- },
- {
- MethodName: "KnowledgeDel",
- Handler: _Knowledge_KnowledgeDel_Handler,
- },
- {
- MethodName: "FindAnswer",
- Handler: _Knowledge_FindAnswer_Handler,
- },
- {
- MethodName: "RecommendAnswer",
- Handler: _Knowledge_RecommendAnswer_Handler,
- },
- },
- Streams: []grpc.StreamDesc{},
- Metadata: "knowledge.proto",
- }
|