You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

784 lines
23 KiB

  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: defs.proto
  3. /*
  4. Package protodb is a generated protocol buffer package.
  5. It is generated from these files:
  6. defs.proto
  7. It has these top-level messages:
  8. Entity
  9. Nothing
  10. DDomain
  11. Iterator
  12. Stats
  13. Init
  14. */
  15. package protodb
  16. import proto "github.com/golang/protobuf/proto"
  17. import fmt "fmt"
  18. import math "math"
  19. import (
  20. context "golang.org/x/net/context"
  21. grpc "google.golang.org/grpc"
  22. )
  23. // Reference imports to suppress errors if they are not otherwise used.
  24. var _ = proto.Marshal
  25. var _ = fmt.Errorf
  26. var _ = math.Inf
  27. // This is a compile-time assertion to ensure that this generated file
  28. // is compatible with the proto package it is being compiled against.
  29. // A compilation error at this line likely means your copy of the
  30. // proto package needs to be updated.
  31. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  32. type Entity struct {
  33. Id int32 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
  34. Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
  35. Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
  36. Exists bool `protobuf:"varint,4,opt,name=exists" json:"exists,omitempty"`
  37. Start []byte `protobuf:"bytes,5,opt,name=start,proto3" json:"start,omitempty"`
  38. End []byte `protobuf:"bytes,6,opt,name=end,proto3" json:"end,omitempty"`
  39. Err string `protobuf:"bytes,7,opt,name=err" json:"err,omitempty"`
  40. Print string `protobuf:"bytes,8,opt,name=print" json:"print,omitempty"`
  41. TimeAt int64 `protobuf:"varint,9,opt,name=time_at,json=timeAt" json:"time_at,omitempty"`
  42. }
  43. func (m *Entity) Reset() { *m = Entity{} }
  44. func (m *Entity) String() string { return proto.CompactTextString(m) }
  45. func (*Entity) ProtoMessage() {}
  46. func (*Entity) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
  47. func (m *Entity) GetId() int32 {
  48. if m != nil {
  49. return m.Id
  50. }
  51. return 0
  52. }
  53. func (m *Entity) GetKey() []byte {
  54. if m != nil {
  55. return m.Key
  56. }
  57. return nil
  58. }
  59. func (m *Entity) GetValue() []byte {
  60. if m != nil {
  61. return m.Value
  62. }
  63. return nil
  64. }
  65. func (m *Entity) GetExists() bool {
  66. if m != nil {
  67. return m.Exists
  68. }
  69. return false
  70. }
  71. func (m *Entity) GetStart() []byte {
  72. if m != nil {
  73. return m.Start
  74. }
  75. return nil
  76. }
  77. func (m *Entity) GetEnd() []byte {
  78. if m != nil {
  79. return m.End
  80. }
  81. return nil
  82. }
  83. func (m *Entity) GetErr() string {
  84. if m != nil {
  85. return m.Err
  86. }
  87. return ""
  88. }
  89. func (m *Entity) GetPrint() string {
  90. if m != nil {
  91. return m.Print
  92. }
  93. return ""
  94. }
  95. func (m *Entity) GetTimeAt() int64 {
  96. if m != nil {
  97. return m.TimeAt
  98. }
  99. return 0
  100. }
  101. type Nothing struct {
  102. }
  103. func (m *Nothing) Reset() { *m = Nothing{} }
  104. func (m *Nothing) String() string { return proto.CompactTextString(m) }
  105. func (*Nothing) ProtoMessage() {}
  106. func (*Nothing) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
  107. type DDomain struct {
  108. Start []byte `protobuf:"bytes,1,opt,name=start,proto3" json:"start,omitempty"`
  109. End []byte `protobuf:"bytes,2,opt,name=end,proto3" json:"end,omitempty"`
  110. }
  111. func (m *DDomain) Reset() { *m = DDomain{} }
  112. func (m *DDomain) String() string { return proto.CompactTextString(m) }
  113. func (*DDomain) ProtoMessage() {}
  114. func (*DDomain) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
  115. func (m *DDomain) GetStart() []byte {
  116. if m != nil {
  117. return m.Start
  118. }
  119. return nil
  120. }
  121. func (m *DDomain) GetEnd() []byte {
  122. if m != nil {
  123. return m.End
  124. }
  125. return nil
  126. }
  127. type Iterator struct {
  128. Domain *DDomain `protobuf:"bytes,1,opt,name=domain" json:"domain,omitempty"`
  129. Valid bool `protobuf:"varint,2,opt,name=valid" json:"valid,omitempty"`
  130. Key []byte `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"`
  131. Value []byte `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"`
  132. }
  133. func (m *Iterator) Reset() { *m = Iterator{} }
  134. func (m *Iterator) String() string { return proto.CompactTextString(m) }
  135. func (*Iterator) ProtoMessage() {}
  136. func (*Iterator) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
  137. func (m *Iterator) GetDomain() *DDomain {
  138. if m != nil {
  139. return m.Domain
  140. }
  141. return nil
  142. }
  143. func (m *Iterator) GetValid() bool {
  144. if m != nil {
  145. return m.Valid
  146. }
  147. return false
  148. }
  149. func (m *Iterator) GetKey() []byte {
  150. if m != nil {
  151. return m.Key
  152. }
  153. return nil
  154. }
  155. func (m *Iterator) GetValue() []byte {
  156. if m != nil {
  157. return m.Value
  158. }
  159. return nil
  160. }
  161. type Stats struct {
  162. Data map[string]string `protobuf:"bytes,1,rep,name=data" json:"data,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
  163. TimeAt int64 `protobuf:"varint,2,opt,name=time_at,json=timeAt" json:"time_at,omitempty"`
  164. }
  165. func (m *Stats) Reset() { *m = Stats{} }
  166. func (m *Stats) String() string { return proto.CompactTextString(m) }
  167. func (*Stats) ProtoMessage() {}
  168. func (*Stats) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
  169. func (m *Stats) GetData() map[string]string {
  170. if m != nil {
  171. return m.Data
  172. }
  173. return nil
  174. }
  175. func (m *Stats) GetTimeAt() int64 {
  176. if m != nil {
  177. return m.TimeAt
  178. }
  179. return 0
  180. }
  181. type Init struct {
  182. Type string `protobuf:"bytes,1,opt,name=Type" json:"Type,omitempty"`
  183. Name string `protobuf:"bytes,2,opt,name=Name" json:"Name,omitempty"`
  184. Dir string `protobuf:"bytes,3,opt,name=Dir" json:"Dir,omitempty"`
  185. }
  186. func (m *Init) Reset() { *m = Init{} }
  187. func (m *Init) String() string { return proto.CompactTextString(m) }
  188. func (*Init) ProtoMessage() {}
  189. func (*Init) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
  190. func (m *Init) GetType() string {
  191. if m != nil {
  192. return m.Type
  193. }
  194. return ""
  195. }
  196. func (m *Init) GetName() string {
  197. if m != nil {
  198. return m.Name
  199. }
  200. return ""
  201. }
  202. func (m *Init) GetDir() string {
  203. if m != nil {
  204. return m.Dir
  205. }
  206. return ""
  207. }
  208. func init() {
  209. proto.RegisterType((*Entity)(nil), "protodb.Entity")
  210. proto.RegisterType((*Nothing)(nil), "protodb.Nothing")
  211. proto.RegisterType((*DDomain)(nil), "protodb.DDomain")
  212. proto.RegisterType((*Iterator)(nil), "protodb.Iterator")
  213. proto.RegisterType((*Stats)(nil), "protodb.Stats")
  214. proto.RegisterType((*Init)(nil), "protodb.Init")
  215. }
  216. // Reference imports to suppress errors if they are not otherwise used.
  217. var _ context.Context
  218. var _ grpc.ClientConn
  219. // This is a compile-time assertion to ensure that this generated file
  220. // is compatible with the grpc package it is being compiled against.
  221. const _ = grpc.SupportPackageIsVersion4
  222. // Client API for DB service
  223. type DBClient interface {
  224. Init(ctx context.Context, in *Init, opts ...grpc.CallOption) (*Entity, error)
  225. Get(ctx context.Context, in *Entity, opts ...grpc.CallOption) (*Entity, error)
  226. GetStream(ctx context.Context, opts ...grpc.CallOption) (DB_GetStreamClient, error)
  227. Has(ctx context.Context, in *Entity, opts ...grpc.CallOption) (*Entity, error)
  228. Set(ctx context.Context, in *Entity, opts ...grpc.CallOption) (*Nothing, error)
  229. SetSync(ctx context.Context, in *Entity, opts ...grpc.CallOption) (*Nothing, error)
  230. Delete(ctx context.Context, in *Entity, opts ...grpc.CallOption) (*Nothing, error)
  231. DeleteSync(ctx context.Context, in *Entity, opts ...grpc.CallOption) (*Nothing, error)
  232. Iterator(ctx context.Context, in *Entity, opts ...grpc.CallOption) (DB_IteratorClient, error)
  233. ReverseIterator(ctx context.Context, in *Entity, opts ...grpc.CallOption) (DB_ReverseIteratorClient, error)
  234. // rpc print(Nothing) returns (Entity) {}
  235. Stats(ctx context.Context, in *Nothing, opts ...grpc.CallOption) (*Stats, error)
  236. }
  237. type dBClient struct {
  238. cc *grpc.ClientConn
  239. }
  240. func NewDBClient(cc *grpc.ClientConn) DBClient {
  241. return &dBClient{cc}
  242. }
  243. func (c *dBClient) Init(ctx context.Context, in *Init, opts ...grpc.CallOption) (*Entity, error) {
  244. out := new(Entity)
  245. err := grpc.Invoke(ctx, "/protodb.DB/init", in, out, c.cc, opts...)
  246. if err != nil {
  247. return nil, err
  248. }
  249. return out, nil
  250. }
  251. func (c *dBClient) Get(ctx context.Context, in *Entity, opts ...grpc.CallOption) (*Entity, error) {
  252. out := new(Entity)
  253. err := grpc.Invoke(ctx, "/protodb.DB/get", in, out, c.cc, opts...)
  254. if err != nil {
  255. return nil, err
  256. }
  257. return out, nil
  258. }
  259. func (c *dBClient) GetStream(ctx context.Context, opts ...grpc.CallOption) (DB_GetStreamClient, error) {
  260. stream, err := grpc.NewClientStream(ctx, &_DB_serviceDesc.Streams[0], c.cc, "/protodb.DB/getStream", opts...)
  261. if err != nil {
  262. return nil, err
  263. }
  264. x := &dBGetStreamClient{stream}
  265. return x, nil
  266. }
  267. type DB_GetStreamClient interface {
  268. Send(*Entity) error
  269. Recv() (*Entity, error)
  270. grpc.ClientStream
  271. }
  272. type dBGetStreamClient struct {
  273. grpc.ClientStream
  274. }
  275. func (x *dBGetStreamClient) Send(m *Entity) error {
  276. return x.ClientStream.SendMsg(m)
  277. }
  278. func (x *dBGetStreamClient) Recv() (*Entity, error) {
  279. m := new(Entity)
  280. if err := x.ClientStream.RecvMsg(m); err != nil {
  281. return nil, err
  282. }
  283. return m, nil
  284. }
  285. func (c *dBClient) Has(ctx context.Context, in *Entity, opts ...grpc.CallOption) (*Entity, error) {
  286. out := new(Entity)
  287. err := grpc.Invoke(ctx, "/protodb.DB/has", in, out, c.cc, opts...)
  288. if err != nil {
  289. return nil, err
  290. }
  291. return out, nil
  292. }
  293. func (c *dBClient) Set(ctx context.Context, in *Entity, opts ...grpc.CallOption) (*Nothing, error) {
  294. out := new(Nothing)
  295. err := grpc.Invoke(ctx, "/protodb.DB/set", in, out, c.cc, opts...)
  296. if err != nil {
  297. return nil, err
  298. }
  299. return out, nil
  300. }
  301. func (c *dBClient) SetSync(ctx context.Context, in *Entity, opts ...grpc.CallOption) (*Nothing, error) {
  302. out := new(Nothing)
  303. err := grpc.Invoke(ctx, "/protodb.DB/setSync", in, out, c.cc, opts...)
  304. if err != nil {
  305. return nil, err
  306. }
  307. return out, nil
  308. }
  309. func (c *dBClient) Delete(ctx context.Context, in *Entity, opts ...grpc.CallOption) (*Nothing, error) {
  310. out := new(Nothing)
  311. err := grpc.Invoke(ctx, "/protodb.DB/delete", in, out, c.cc, opts...)
  312. if err != nil {
  313. return nil, err
  314. }
  315. return out, nil
  316. }
  317. func (c *dBClient) DeleteSync(ctx context.Context, in *Entity, opts ...grpc.CallOption) (*Nothing, error) {
  318. out := new(Nothing)
  319. err := grpc.Invoke(ctx, "/protodb.DB/deleteSync", in, out, c.cc, opts...)
  320. if err != nil {
  321. return nil, err
  322. }
  323. return out, nil
  324. }
  325. func (c *dBClient) Iterator(ctx context.Context, in *Entity, opts ...grpc.CallOption) (DB_IteratorClient, error) {
  326. stream, err := grpc.NewClientStream(ctx, &_DB_serviceDesc.Streams[1], c.cc, "/protodb.DB/iterator", opts...)
  327. if err != nil {
  328. return nil, err
  329. }
  330. x := &dBIteratorClient{stream}
  331. if err := x.ClientStream.SendMsg(in); err != nil {
  332. return nil, err
  333. }
  334. if err := x.ClientStream.CloseSend(); err != nil {
  335. return nil, err
  336. }
  337. return x, nil
  338. }
  339. type DB_IteratorClient interface {
  340. Recv() (*Iterator, error)
  341. grpc.ClientStream
  342. }
  343. type dBIteratorClient struct {
  344. grpc.ClientStream
  345. }
  346. func (x *dBIteratorClient) Recv() (*Iterator, error) {
  347. m := new(Iterator)
  348. if err := x.ClientStream.RecvMsg(m); err != nil {
  349. return nil, err
  350. }
  351. return m, nil
  352. }
  353. func (c *dBClient) ReverseIterator(ctx context.Context, in *Entity, opts ...grpc.CallOption) (DB_ReverseIteratorClient, error) {
  354. stream, err := grpc.NewClientStream(ctx, &_DB_serviceDesc.Streams[2], c.cc, "/protodb.DB/reverseIterator", opts...)
  355. if err != nil {
  356. return nil, err
  357. }
  358. x := &dBReverseIteratorClient{stream}
  359. if err := x.ClientStream.SendMsg(in); err != nil {
  360. return nil, err
  361. }
  362. if err := x.ClientStream.CloseSend(); err != nil {
  363. return nil, err
  364. }
  365. return x, nil
  366. }
  367. type DB_ReverseIteratorClient interface {
  368. Recv() (*Iterator, error)
  369. grpc.ClientStream
  370. }
  371. type dBReverseIteratorClient struct {
  372. grpc.ClientStream
  373. }
  374. func (x *dBReverseIteratorClient) Recv() (*Iterator, error) {
  375. m := new(Iterator)
  376. if err := x.ClientStream.RecvMsg(m); err != nil {
  377. return nil, err
  378. }
  379. return m, nil
  380. }
  381. func (c *dBClient) Stats(ctx context.Context, in *Nothing, opts ...grpc.CallOption) (*Stats, error) {
  382. out := new(Stats)
  383. err := grpc.Invoke(ctx, "/protodb.DB/stats", in, out, c.cc, opts...)
  384. if err != nil {
  385. return nil, err
  386. }
  387. return out, nil
  388. }
  389. // Server API for DB service
  390. type DBServer interface {
  391. Init(context.Context, *Init) (*Entity, error)
  392. Get(context.Context, *Entity) (*Entity, error)
  393. GetStream(DB_GetStreamServer) error
  394. Has(context.Context, *Entity) (*Entity, error)
  395. Set(context.Context, *Entity) (*Nothing, error)
  396. SetSync(context.Context, *Entity) (*Nothing, error)
  397. Delete(context.Context, *Entity) (*Nothing, error)
  398. DeleteSync(context.Context, *Entity) (*Nothing, error)
  399. Iterator(*Entity, DB_IteratorServer) error
  400. ReverseIterator(*Entity, DB_ReverseIteratorServer) error
  401. // rpc print(Nothing) returns (Entity) {}
  402. Stats(context.Context, *Nothing) (*Stats, error)
  403. }
  404. func RegisterDBServer(s *grpc.Server, srv DBServer) {
  405. s.RegisterService(&_DB_serviceDesc, srv)
  406. }
  407. func _DB_Init_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  408. in := new(Init)
  409. if err := dec(in); err != nil {
  410. return nil, err
  411. }
  412. if interceptor == nil {
  413. return srv.(DBServer).Init(ctx, in)
  414. }
  415. info := &grpc.UnaryServerInfo{
  416. Server: srv,
  417. FullMethod: "/protodb.DB/Init",
  418. }
  419. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  420. return srv.(DBServer).Init(ctx, req.(*Init))
  421. }
  422. return interceptor(ctx, in, info, handler)
  423. }
  424. func _DB_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  425. in := new(Entity)
  426. if err := dec(in); err != nil {
  427. return nil, err
  428. }
  429. if interceptor == nil {
  430. return srv.(DBServer).Get(ctx, in)
  431. }
  432. info := &grpc.UnaryServerInfo{
  433. Server: srv,
  434. FullMethod: "/protodb.DB/Get",
  435. }
  436. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  437. return srv.(DBServer).Get(ctx, req.(*Entity))
  438. }
  439. return interceptor(ctx, in, info, handler)
  440. }
  441. func _DB_GetStream_Handler(srv interface{}, stream grpc.ServerStream) error {
  442. return srv.(DBServer).GetStream(&dBGetStreamServer{stream})
  443. }
  444. type DB_GetStreamServer interface {
  445. Send(*Entity) error
  446. Recv() (*Entity, error)
  447. grpc.ServerStream
  448. }
  449. type dBGetStreamServer struct {
  450. grpc.ServerStream
  451. }
  452. func (x *dBGetStreamServer) Send(m *Entity) error {
  453. return x.ServerStream.SendMsg(m)
  454. }
  455. func (x *dBGetStreamServer) Recv() (*Entity, error) {
  456. m := new(Entity)
  457. if err := x.ServerStream.RecvMsg(m); err != nil {
  458. return nil, err
  459. }
  460. return m, nil
  461. }
  462. func _DB_Has_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  463. in := new(Entity)
  464. if err := dec(in); err != nil {
  465. return nil, err
  466. }
  467. if interceptor == nil {
  468. return srv.(DBServer).Has(ctx, in)
  469. }
  470. info := &grpc.UnaryServerInfo{
  471. Server: srv,
  472. FullMethod: "/protodb.DB/Has",
  473. }
  474. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  475. return srv.(DBServer).Has(ctx, req.(*Entity))
  476. }
  477. return interceptor(ctx, in, info, handler)
  478. }
  479. func _DB_Set_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  480. in := new(Entity)
  481. if err := dec(in); err != nil {
  482. return nil, err
  483. }
  484. if interceptor == nil {
  485. return srv.(DBServer).Set(ctx, in)
  486. }
  487. info := &grpc.UnaryServerInfo{
  488. Server: srv,
  489. FullMethod: "/protodb.DB/Set",
  490. }
  491. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  492. return srv.(DBServer).Set(ctx, req.(*Entity))
  493. }
  494. return interceptor(ctx, in, info, handler)
  495. }
  496. func _DB_SetSync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  497. in := new(Entity)
  498. if err := dec(in); err != nil {
  499. return nil, err
  500. }
  501. if interceptor == nil {
  502. return srv.(DBServer).SetSync(ctx, in)
  503. }
  504. info := &grpc.UnaryServerInfo{
  505. Server: srv,
  506. FullMethod: "/protodb.DB/SetSync",
  507. }
  508. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  509. return srv.(DBServer).SetSync(ctx, req.(*Entity))
  510. }
  511. return interceptor(ctx, in, info, handler)
  512. }
  513. func _DB_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  514. in := new(Entity)
  515. if err := dec(in); err != nil {
  516. return nil, err
  517. }
  518. if interceptor == nil {
  519. return srv.(DBServer).Delete(ctx, in)
  520. }
  521. info := &grpc.UnaryServerInfo{
  522. Server: srv,
  523. FullMethod: "/protodb.DB/Delete",
  524. }
  525. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  526. return srv.(DBServer).Delete(ctx, req.(*Entity))
  527. }
  528. return interceptor(ctx, in, info, handler)
  529. }
  530. func _DB_DeleteSync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  531. in := new(Entity)
  532. if err := dec(in); err != nil {
  533. return nil, err
  534. }
  535. if interceptor == nil {
  536. return srv.(DBServer).DeleteSync(ctx, in)
  537. }
  538. info := &grpc.UnaryServerInfo{
  539. Server: srv,
  540. FullMethod: "/protodb.DB/DeleteSync",
  541. }
  542. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  543. return srv.(DBServer).DeleteSync(ctx, req.(*Entity))
  544. }
  545. return interceptor(ctx, in, info, handler)
  546. }
  547. func _DB_Iterator_Handler(srv interface{}, stream grpc.ServerStream) error {
  548. m := new(Entity)
  549. if err := stream.RecvMsg(m); err != nil {
  550. return err
  551. }
  552. return srv.(DBServer).Iterator(m, &dBIteratorServer{stream})
  553. }
  554. type DB_IteratorServer interface {
  555. Send(*Iterator) error
  556. grpc.ServerStream
  557. }
  558. type dBIteratorServer struct {
  559. grpc.ServerStream
  560. }
  561. func (x *dBIteratorServer) Send(m *Iterator) error {
  562. return x.ServerStream.SendMsg(m)
  563. }
  564. func _DB_ReverseIterator_Handler(srv interface{}, stream grpc.ServerStream) error {
  565. m := new(Entity)
  566. if err := stream.RecvMsg(m); err != nil {
  567. return err
  568. }
  569. return srv.(DBServer).ReverseIterator(m, &dBReverseIteratorServer{stream})
  570. }
  571. type DB_ReverseIteratorServer interface {
  572. Send(*Iterator) error
  573. grpc.ServerStream
  574. }
  575. type dBReverseIteratorServer struct {
  576. grpc.ServerStream
  577. }
  578. func (x *dBReverseIteratorServer) Send(m *Iterator) error {
  579. return x.ServerStream.SendMsg(m)
  580. }
  581. func _DB_Stats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  582. in := new(Nothing)
  583. if err := dec(in); err != nil {
  584. return nil, err
  585. }
  586. if interceptor == nil {
  587. return srv.(DBServer).Stats(ctx, in)
  588. }
  589. info := &grpc.UnaryServerInfo{
  590. Server: srv,
  591. FullMethod: "/protodb.DB/Stats",
  592. }
  593. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  594. return srv.(DBServer).Stats(ctx, req.(*Nothing))
  595. }
  596. return interceptor(ctx, in, info, handler)
  597. }
  598. var _DB_serviceDesc = grpc.ServiceDesc{
  599. ServiceName: "protodb.DB",
  600. HandlerType: (*DBServer)(nil),
  601. Methods: []grpc.MethodDesc{
  602. {
  603. MethodName: "init",
  604. Handler: _DB_Init_Handler,
  605. },
  606. {
  607. MethodName: "get",
  608. Handler: _DB_Get_Handler,
  609. },
  610. {
  611. MethodName: "has",
  612. Handler: _DB_Has_Handler,
  613. },
  614. {
  615. MethodName: "set",
  616. Handler: _DB_Set_Handler,
  617. },
  618. {
  619. MethodName: "setSync",
  620. Handler: _DB_SetSync_Handler,
  621. },
  622. {
  623. MethodName: "delete",
  624. Handler: _DB_Delete_Handler,
  625. },
  626. {
  627. MethodName: "deleteSync",
  628. Handler: _DB_DeleteSync_Handler,
  629. },
  630. {
  631. MethodName: "stats",
  632. Handler: _DB_Stats_Handler,
  633. },
  634. },
  635. Streams: []grpc.StreamDesc{
  636. {
  637. StreamName: "getStream",
  638. Handler: _DB_GetStream_Handler,
  639. ServerStreams: true,
  640. ClientStreams: true,
  641. },
  642. {
  643. StreamName: "iterator",
  644. Handler: _DB_Iterator_Handler,
  645. ServerStreams: true,
  646. },
  647. {
  648. StreamName: "reverseIterator",
  649. Handler: _DB_ReverseIterator_Handler,
  650. ServerStreams: true,
  651. },
  652. },
  653. Metadata: "defs.proto",
  654. }
  655. func init() { proto.RegisterFile("defs.proto", fileDescriptor0) }
  656. var fileDescriptor0 = []byte{
  657. // 498 bytes of a gzipped FileDescriptorProto
  658. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0xcd, 0x72, 0xd3, 0x4c,
  659. 0x10, 0xf4, 0x4a, 0xb2, 0x64, 0x4d, 0xbe, 0x2f, 0x09, 0x5b, 0x14, 0x6c, 0xf9, 0xa4, 0xd2, 0x49,
  660. 0xfc, 0xb9, 0x12, 0xe7, 0xc0, 0xcf, 0x09, 0x28, 0xe7, 0xe0, 0x4b, 0x0e, 0x32, 0x77, 0x6a, 0x83,
  661. 0x06, 0x67, 0x8b, 0x58, 0x72, 0xed, 0x0e, 0x29, 0xf4, 0x04, 0x3c, 0x00, 0x4f, 0xc4, 0x9b, 0x51,
  662. 0xbb, 0xfa, 0xb1, 0x43, 0x7c, 0x10, 0x27, 0x4d, 0xef, 0x76, 0xf7, 0x8c, 0x5a, 0x23, 0x80, 0x02,
  663. 0xbf, 0x9a, 0xd9, 0x56, 0x57, 0x54, 0xf1, 0xc8, 0x3d, 0x8a, 0xeb, 0xf4, 0x37, 0x83, 0xf0, 0xb2,
  664. 0x24, 0x45, 0x35, 0x3f, 0x06, 0x4f, 0x15, 0x82, 0x25, 0x2c, 0x1b, 0xe7, 0x9e, 0x2a, 0xf8, 0x29,
  665. 0xf8, 0xdf, 0xb0, 0x16, 0x5e, 0xc2, 0xb2, 0xff, 0x72, 0x5b, 0xf2, 0xc7, 0x30, 0xbe, 0x93, 0xb7,
  666. 0xdf, 0x51, 0xf8, 0xee, 0xac, 0x01, 0xfc, 0x09, 0x84, 0xf8, 0x43, 0x19, 0x32, 0x22, 0x48, 0x58,
  667. 0x36, 0xc9, 0x5b, 0x64, 0xd9, 0x86, 0xa4, 0x26, 0x31, 0x6e, 0xd8, 0x0e, 0x58, 0x57, 0x2c, 0x0b,
  668. 0x11, 0x36, 0xae, 0x58, 0xba, 0x3e, 0xa8, 0xb5, 0x88, 0x12, 0x96, 0xc5, 0xb9, 0x2d, 0xad, 0x72,
  669. 0xab, 0x55, 0x49, 0x62, 0xe2, 0xce, 0x1a, 0xc0, 0x9f, 0x42, 0x44, 0x6a, 0x83, 0x9f, 0x25, 0x89,
  670. 0x38, 0x61, 0x99, 0x9f, 0x87, 0x16, 0x7e, 0xa0, 0x34, 0x86, 0xe8, 0xaa, 0xa2, 0x1b, 0x55, 0xae,
  671. 0xd3, 0x73, 0x88, 0x16, 0x8b, 0x6a, 0x23, 0x55, 0xb9, 0x6b, 0xcf, 0x0e, 0xb4, 0xf7, 0xfa, 0xf6,
  672. 0xa9, 0x86, 0xc9, 0x92, 0x50, 0x4b, 0xaa, 0x34, 0xcf, 0x20, 0x2c, 0x9c, 0xda, 0x89, 0x8e, 0xe6,
  673. 0xa7, 0xb3, 0x36, 0xa7, 0x59, 0xeb, 0x9a, 0xb7, 0xf7, 0x6d, 0x14, 0xaa, 0x71, 0x9a, 0xe4, 0x0d,
  674. 0xe8, 0x22, 0xf3, 0x0f, 0x44, 0x16, 0xec, 0x45, 0x96, 0xfe, 0x64, 0x30, 0x5e, 0x91, 0x24, 0xc3,
  675. 0x5f, 0x42, 0x50, 0x48, 0x92, 0x82, 0x25, 0x7e, 0x76, 0x34, 0x17, 0x7d, 0x3f, 0x77, 0x3b, 0x5b,
  676. 0x48, 0x92, 0x97, 0x25, 0xe9, 0x3a, 0x77, 0xac, 0xfd, 0x08, 0xbc, 0xfd, 0x08, 0xa6, 0xaf, 0x21,
  677. 0xee, 0xb9, 0xdd, 0x14, 0xac, 0x09, 0xf4, 0xde, 0x14, 0x5e, 0x13, 0xa8, 0x03, 0xef, 0xbc, 0x37,
  678. 0x2c, 0x7d, 0x0f, 0xc1, 0xb2, 0x54, 0xc4, 0x39, 0x04, 0x9f, 0xea, 0x2d, 0xb6, 0x22, 0x57, 0xdb,
  679. 0xb3, 0x2b, 0xb9, 0xe9, 0x44, 0xae, 0xb6, 0xde, 0x0b, 0xa5, 0xdd, 0x1b, 0xc6, 0xb9, 0x2d, 0xe7,
  680. 0xbf, 0x02, 0xf0, 0x16, 0x1f, 0x79, 0x06, 0x81, 0xb2, 0x46, 0xff, 0xf7, 0xaf, 0x60, 0x7d, 0xa7,
  681. 0x27, 0x3d, 0x6c, 0xb6, 0x2c, 0x1d, 0xf1, 0x67, 0xe0, 0xaf, 0x91, 0xf8, 0xdf, 0x37, 0x87, 0xa8,
  682. 0x17, 0x10, 0xaf, 0x91, 0x56, 0xa4, 0x51, 0x6e, 0x86, 0x08, 0x32, 0x76, 0xc6, 0xac, 0xff, 0x8d,
  683. 0x34, 0x83, 0xfc, 0x9f, 0x83, 0x6f, 0x0e, 0x8d, 0xb2, 0xfb, 0xee, 0xdd, 0x62, 0x8d, 0xf8, 0x0c,
  684. 0x22, 0x83, 0xb4, 0xaa, 0xcb, 0x2f, 0xc3, 0xf8, 0xaf, 0x20, 0x2c, 0xf0, 0x16, 0x09, 0x87, 0xd1,
  685. 0xcf, 0xed, 0xff, 0x69, 0xe9, 0xc3, 0x3b, 0xcc, 0x61, 0xa2, 0xba, 0xcd, 0x7d, 0x20, 0x78, 0xb4,
  686. 0xfb, 0x0e, 0x2d, 0x27, 0x1d, 0x9d, 0x31, 0xfe, 0x16, 0x4e, 0x34, 0xde, 0xa1, 0x36, 0xb8, 0xfc,
  687. 0x57, 0xe9, 0x0b, 0xf7, 0x43, 0x91, 0xe1, 0x0f, 0x66, 0x99, 0x1e, 0xdf, 0xdf, 0xdb, 0x74, 0x74,
  688. 0x1d, 0xba, 0x83, 0x8b, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xf4, 0x2e, 0x77, 0x07, 0x75, 0x04,
  689. 0x00, 0x00,
  690. }