stdlib.pb.go 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // versions:
  3. // protoc-gen-go v1.25.0
  4. // protoc v3.15.5
  5. // source: stdlib.proto
  6. package stdlib
  7. import (
  8. context "context"
  9. reflect "reflect"
  10. sync "sync"
  11. proto "github.com/golang/protobuf/proto"
  12. grpc "google.golang.org/grpc"
  13. codes "google.golang.org/grpc/codes"
  14. status "google.golang.org/grpc/status"
  15. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  16. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  17. )
  18. const (
  19. // Verify that this generated code is sufficiently up-to-date.
  20. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  21. // Verify that runtime/protoimpl is sufficiently up-to-date.
  22. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  23. )
  24. // This is a compile-time assertion that a sufficiently up-to-date version
  25. // of the legacy proto package is being used.
  26. const _ = proto.ProtoPackageIsVersion4
  27. type DocQueryRequest struct {
  28. state protoimpl.MessageState
  29. sizeCache protoimpl.SizeCache
  30. unknownFields protoimpl.UnknownFields
  31. KeyWords string `protobuf:"bytes,1,opt,name=keyWords,proto3" json:"keyWords,omitempty"`
  32. }
  33. func (x *DocQueryRequest) Reset() {
  34. *x = DocQueryRequest{}
  35. if protoimpl.UnsafeEnabled {
  36. mi := &file_stdlib_proto_msgTypes[0]
  37. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  38. ms.StoreMessageInfo(mi)
  39. }
  40. }
  41. func (x *DocQueryRequest) String() string {
  42. return protoimpl.X.MessageStringOf(x)
  43. }
  44. func (*DocQueryRequest) ProtoMessage() {}
  45. func (x *DocQueryRequest) ProtoReflect() protoreflect.Message {
  46. mi := &file_stdlib_proto_msgTypes[0]
  47. if protoimpl.UnsafeEnabled && x != nil {
  48. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  49. if ms.LoadMessageInfo() == nil {
  50. ms.StoreMessageInfo(mi)
  51. }
  52. return ms
  53. }
  54. return mi.MessageOf(x)
  55. }
  56. // Deprecated: Use DocQueryRequest.ProtoReflect.Descriptor instead.
  57. func (*DocQueryRequest) Descriptor() ([]byte, []int) {
  58. return file_stdlib_proto_rawDescGZIP(), []int{0}
  59. }
  60. func (x *DocQueryRequest) GetKeyWords() string {
  61. if x != nil {
  62. return x.KeyWords
  63. }
  64. return ""
  65. }
  66. type DocQueryResponse struct {
  67. state protoimpl.MessageState
  68. sizeCache protoimpl.SizeCache
  69. unknownFields protoimpl.UnknownFields
  70. Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` //响应代码
  71. Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` //响应消息
  72. Docs []*Doc `protobuf:"bytes,3,rep,name=docs,proto3" json:"docs,omitempty"` //文档列表集合,没有分页参数
  73. }
  74. func (x *DocQueryResponse) Reset() {
  75. *x = DocQueryResponse{}
  76. if protoimpl.UnsafeEnabled {
  77. mi := &file_stdlib_proto_msgTypes[1]
  78. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  79. ms.StoreMessageInfo(mi)
  80. }
  81. }
  82. func (x *DocQueryResponse) String() string {
  83. return protoimpl.X.MessageStringOf(x)
  84. }
  85. func (*DocQueryResponse) ProtoMessage() {}
  86. func (x *DocQueryResponse) ProtoReflect() protoreflect.Message {
  87. mi := &file_stdlib_proto_msgTypes[1]
  88. if protoimpl.UnsafeEnabled && x != nil {
  89. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  90. if ms.LoadMessageInfo() == nil {
  91. ms.StoreMessageInfo(mi)
  92. }
  93. return ms
  94. }
  95. return mi.MessageOf(x)
  96. }
  97. // Deprecated: Use DocQueryResponse.ProtoReflect.Descriptor instead.
  98. func (*DocQueryResponse) Descriptor() ([]byte, []int) {
  99. return file_stdlib_proto_rawDescGZIP(), []int{1}
  100. }
  101. func (x *DocQueryResponse) GetCode() int32 {
  102. if x != nil {
  103. return x.Code
  104. }
  105. return 0
  106. }
  107. func (x *DocQueryResponse) GetMessage() string {
  108. if x != nil {
  109. return x.Message
  110. }
  111. return ""
  112. }
  113. func (x *DocQueryResponse) GetDocs() []*Doc {
  114. if x != nil {
  115. return x.Docs
  116. }
  117. return nil
  118. }
  119. type Doc struct {
  120. state protoimpl.MessageState
  121. sizeCache protoimpl.SizeCache
  122. unknownFields protoimpl.UnknownFields
  123. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` //文档id
  124. Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` //文档名称
  125. Type int32 `protobuf:"varint,3,opt,name=type,proto3" json:"type,omitempty"` //文档类型
  126. FileSize int32 `protobuf:"varint,4,opt,name=fileSize,proto3" json:"fileSize,omitempty"` //文档大小
  127. PageSize int32 `protobuf:"varint,5,opt,name=pageSize,proto3" json:"pageSize,omitempty"` //文档页码数
  128. Tags string `protobuf:"bytes,6,opt,name=tags,proto3" json:"tags,omitempty"` //文档标签
  129. UserId string `protobuf:"bytes,7,opt,name=userId,proto3" json:"userId,omitempty"` //上传人id
  130. }
  131. func (x *Doc) Reset() {
  132. *x = Doc{}
  133. if protoimpl.UnsafeEnabled {
  134. mi := &file_stdlib_proto_msgTypes[2]
  135. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  136. ms.StoreMessageInfo(mi)
  137. }
  138. }
  139. func (x *Doc) String() string {
  140. return protoimpl.X.MessageStringOf(x)
  141. }
  142. func (*Doc) ProtoMessage() {}
  143. func (x *Doc) ProtoReflect() protoreflect.Message {
  144. mi := &file_stdlib_proto_msgTypes[2]
  145. if protoimpl.UnsafeEnabled && x != nil {
  146. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  147. if ms.LoadMessageInfo() == nil {
  148. ms.StoreMessageInfo(mi)
  149. }
  150. return ms
  151. }
  152. return mi.MessageOf(x)
  153. }
  154. // Deprecated: Use Doc.ProtoReflect.Descriptor instead.
  155. func (*Doc) Descriptor() ([]byte, []int) {
  156. return file_stdlib_proto_rawDescGZIP(), []int{2}
  157. }
  158. func (x *Doc) GetId() string {
  159. if x != nil {
  160. return x.Id
  161. }
  162. return ""
  163. }
  164. func (x *Doc) GetName() string {
  165. if x != nil {
  166. return x.Name
  167. }
  168. return ""
  169. }
  170. func (x *Doc) GetType() int32 {
  171. if x != nil {
  172. return x.Type
  173. }
  174. return 0
  175. }
  176. func (x *Doc) GetFileSize() int32 {
  177. if x != nil {
  178. return x.FileSize
  179. }
  180. return 0
  181. }
  182. func (x *Doc) GetPageSize() int32 {
  183. if x != nil {
  184. return x.PageSize
  185. }
  186. return 0
  187. }
  188. func (x *Doc) GetTags() string {
  189. if x != nil {
  190. return x.Tags
  191. }
  192. return ""
  193. }
  194. func (x *Doc) GetUserId() string {
  195. if x != nil {
  196. return x.UserId
  197. }
  198. return ""
  199. }
  200. var File_stdlib_proto protoreflect.FileDescriptor
  201. var file_stdlib_proto_rawDesc = []byte{
  202. 0x0a, 0x0c, 0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06,
  203. 0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x22, 0x2d, 0x0a, 0x0f, 0x44, 0x6f, 0x63, 0x51, 0x75, 0x65,
  204. 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79,
  205. 0x57, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79,
  206. 0x57, 0x6f, 0x72, 0x64, 0x73, 0x22, 0x61, 0x0a, 0x10, 0x44, 0x6f, 0x63, 0x51, 0x75, 0x65, 0x72,
  207. 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64,
  208. 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a,
  209. 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
  210. 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1f, 0x0a, 0x04, 0x64, 0x6f, 0x63, 0x73, 0x18,
  211. 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x2e, 0x44,
  212. 0x6f, 0x63, 0x52, 0x04, 0x64, 0x6f, 0x63, 0x73, 0x22, 0xa1, 0x01, 0x0a, 0x03, 0x44, 0x6f, 0x63,
  213. 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64,
  214. 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
  215. 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01,
  216. 0x28, 0x05, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65,
  217. 0x53, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65,
  218. 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65,
  219. 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65,
  220. 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
  221. 0x74, 0x61, 0x67, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x07,
  222. 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x32, 0x47, 0x0a, 0x06,
  223. 0x53, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x12, 0x3d, 0x0a, 0x08, 0x44, 0x6f, 0x63, 0x51, 0x75, 0x65,
  224. 0x72, 0x79, 0x12, 0x17, 0x2e, 0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x2e, 0x44, 0x6f, 0x63, 0x51,
  225. 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x73, 0x74,
  226. 0x64, 0x6c, 0x69, 0x62, 0x2e, 0x44, 0x6f, 0x63, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73,
  227. 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
  228. }
  229. var (
  230. file_stdlib_proto_rawDescOnce sync.Once
  231. file_stdlib_proto_rawDescData = file_stdlib_proto_rawDesc
  232. )
  233. func file_stdlib_proto_rawDescGZIP() []byte {
  234. file_stdlib_proto_rawDescOnce.Do(func() {
  235. file_stdlib_proto_rawDescData = protoimpl.X.CompressGZIP(file_stdlib_proto_rawDescData)
  236. })
  237. return file_stdlib_proto_rawDescData
  238. }
  239. var file_stdlib_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
  240. var file_stdlib_proto_goTypes = []interface{}{
  241. (*DocQueryRequest)(nil), // 0: stdlib.DocQueryRequest
  242. (*DocQueryResponse)(nil), // 1: stdlib.DocQueryResponse
  243. (*Doc)(nil), // 2: stdlib.Doc
  244. }
  245. var file_stdlib_proto_depIdxs = []int32{
  246. 2, // 0: stdlib.DocQueryResponse.docs:type_name -> stdlib.Doc
  247. 0, // 1: stdlib.Stdlib.DocQuery:input_type -> stdlib.DocQueryRequest
  248. 1, // 2: stdlib.Stdlib.DocQuery:output_type -> stdlib.DocQueryResponse
  249. 2, // [2:3] is the sub-list for method output_type
  250. 1, // [1:2] is the sub-list for method input_type
  251. 1, // [1:1] is the sub-list for extension type_name
  252. 1, // [1:1] is the sub-list for extension extendee
  253. 0, // [0:1] is the sub-list for field type_name
  254. }
  255. func init() { file_stdlib_proto_init() }
  256. func file_stdlib_proto_init() {
  257. if File_stdlib_proto != nil {
  258. return
  259. }
  260. if !protoimpl.UnsafeEnabled {
  261. file_stdlib_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  262. switch v := v.(*DocQueryRequest); i {
  263. case 0:
  264. return &v.state
  265. case 1:
  266. return &v.sizeCache
  267. case 2:
  268. return &v.unknownFields
  269. default:
  270. return nil
  271. }
  272. }
  273. file_stdlib_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
  274. switch v := v.(*DocQueryResponse); i {
  275. case 0:
  276. return &v.state
  277. case 1:
  278. return &v.sizeCache
  279. case 2:
  280. return &v.unknownFields
  281. default:
  282. return nil
  283. }
  284. }
  285. file_stdlib_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
  286. switch v := v.(*Doc); i {
  287. case 0:
  288. return &v.state
  289. case 1:
  290. return &v.sizeCache
  291. case 2:
  292. return &v.unknownFields
  293. default:
  294. return nil
  295. }
  296. }
  297. }
  298. type x struct{}
  299. out := protoimpl.TypeBuilder{
  300. File: protoimpl.DescBuilder{
  301. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  302. RawDescriptor: file_stdlib_proto_rawDesc,
  303. NumEnums: 0,
  304. NumMessages: 3,
  305. NumExtensions: 0,
  306. NumServices: 1,
  307. },
  308. GoTypes: file_stdlib_proto_goTypes,
  309. DependencyIndexes: file_stdlib_proto_depIdxs,
  310. MessageInfos: file_stdlib_proto_msgTypes,
  311. }.Build()
  312. File_stdlib_proto = out.File
  313. file_stdlib_proto_rawDesc = nil
  314. file_stdlib_proto_goTypes = nil
  315. file_stdlib_proto_depIdxs = nil
  316. }
  317. // Reference imports to suppress errors if they are not otherwise used.
  318. var _ context.Context
  319. var _ grpc.ClientConnInterface
  320. // This is a compile-time assertion to ensure that this generated file
  321. // is compatible with the grpc package it is being compiled against.
  322. const _ = grpc.SupportPackageIsVersion6
  323. // StdlibClient is the client API for Stdlib service.
  324. //
  325. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  326. type StdlibClient interface {
  327. DocQuery(ctx context.Context, in *DocQueryRequest, opts ...grpc.CallOption) (*DocQueryResponse, error)
  328. }
  329. type stdlibClient struct {
  330. cc grpc.ClientConnInterface
  331. }
  332. func NewStdlibClient(cc grpc.ClientConnInterface) StdlibClient {
  333. return &stdlibClient{cc}
  334. }
  335. func (c *stdlibClient) DocQuery(ctx context.Context, in *DocQueryRequest, opts ...grpc.CallOption) (*DocQueryResponse, error) {
  336. out := new(DocQueryResponse)
  337. err := c.cc.Invoke(ctx, "/stdlib.Stdlib/DocQuery", in, out, opts...)
  338. if err != nil {
  339. return nil, err
  340. }
  341. return out, nil
  342. }
  343. // StdlibServer is the server API for Stdlib service.
  344. type StdlibServer interface {
  345. DocQuery(context.Context, *DocQueryRequest) (*DocQueryResponse, error)
  346. }
  347. // UnimplementedStdlibServer can be embedded to have forward compatible implementations.
  348. type UnimplementedStdlibServer struct {
  349. }
  350. func (*UnimplementedStdlibServer) DocQuery(context.Context, *DocQueryRequest) (*DocQueryResponse, error) {
  351. return nil, status.Errorf(codes.Unimplemented, "method DocQuery not implemented")
  352. }
  353. func RegisterStdlibServer(s *grpc.Server, srv StdlibServer) {
  354. s.RegisterService(&_Stdlib_serviceDesc, srv)
  355. }
  356. func _Stdlib_DocQuery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  357. in := new(DocQueryRequest)
  358. if err := dec(in); err != nil {
  359. return nil, err
  360. }
  361. if interceptor == nil {
  362. return srv.(StdlibServer).DocQuery(ctx, in)
  363. }
  364. info := &grpc.UnaryServerInfo{
  365. Server: srv,
  366. FullMethod: "/stdlib.Stdlib/DocQuery",
  367. }
  368. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  369. return srv.(StdlibServer).DocQuery(ctx, req.(*DocQueryRequest))
  370. }
  371. return interceptor(ctx, in, info, handler)
  372. }
  373. var _Stdlib_serviceDesc = grpc.ServiceDesc{
  374. ServiceName: "stdlib.Stdlib",
  375. HandlerType: (*StdlibServer)(nil),
  376. Methods: []grpc.MethodDesc{
  377. {
  378. MethodName: "DocQuery",
  379. Handler: _Stdlib_DocQuery_Handler,
  380. },
  381. },
  382. Streams: []grpc.StreamDesc{},
  383. Metadata: "stdlib.proto",
  384. }