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.

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