-
Notifications
You must be signed in to change notification settings - Fork 0
/
stark.pb.go
964 lines (859 loc) · 34.8 KB
/
stark.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
// Schema for STARK database
// -------------------------
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.24.0
// protoc v3.12.3
// source: stark.proto
package stark
import (
context "context"
proto "github.com/golang/protobuf/proto"
empty "github.com/golang/protobuf/ptypes/empty"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
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)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
//
//Status is currently un-used.
type Status int32
const (
Status_UN_INITIALIZED Status = 0
Status_untagged Status = 1
Status_tagged Status = 2
)
// Enum value maps for Status.
var (
Status_name = map[int32]string{
0: "UN_INITIALIZED",
1: "untagged",
2: "tagged",
}
Status_value = map[string]int32{
"UN_INITIALIZED": 0,
"untagged": 1,
"tagged": 2,
}
)
func (x Status) Enum() *Status {
p := new(Status)
*p = x
return p
}
func (x Status) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Status) Descriptor() protoreflect.EnumDescriptor {
return file_stark_proto_enumTypes[0].Descriptor()
}
func (Status) Type() protoreflect.EnumType {
return &file_stark_proto_enumTypes[0]
}
func (x Status) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Status.Descriptor instead.
func (Status) EnumDescriptor() ([]byte, []int) {
return file_stark_proto_rawDescGZIP(), []int{0}
}
type KeyRecordPair struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Record *Record `protobuf:"bytes,2,opt,name=record,proto3" json:"record,omitempty"`
}
func (x *KeyRecordPair) Reset() {
*x = KeyRecordPair{}
if protoimpl.UnsafeEnabled {
mi := &file_stark_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *KeyRecordPair) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*KeyRecordPair) ProtoMessage() {}
func (x *KeyRecordPair) ProtoReflect() protoreflect.Message {
mi := &file_stark_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 KeyRecordPair.ProtoReflect.Descriptor instead.
func (*KeyRecordPair) Descriptor() ([]byte, []int) {
return file_stark_proto_rawDescGZIP(), []int{0}
}
func (x *KeyRecordPair) GetKey() string {
if x != nil {
return x.Key
}
return ""
}
func (x *KeyRecordPair) GetRecord() *Record {
if x != nil {
return x.Record
}
return nil
}
type Key struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
}
func (x *Key) Reset() {
*x = Key{}
if protoimpl.UnsafeEnabled {
mi := &file_stark_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Key) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Key) ProtoMessage() {}
func (x *Key) ProtoReflect() protoreflect.Message {
mi := &file_stark_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 Key.ProtoReflect.Descriptor instead.
func (*Key) Descriptor() ([]byte, []int) {
return file_stark_proto_rawDescGZIP(), []int{1}
}
func (x *Key) GetKey() string {
if x != nil {
return x.Key
}
return ""
}
type Response struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
Record *Record `protobuf:"bytes,2,opt,name=record,proto3" json:"record,omitempty"`
}
func (x *Response) Reset() {
*x = Response{}
if protoimpl.UnsafeEnabled {
mi := &file_stark_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Response) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Response) ProtoMessage() {}
func (x *Response) ProtoReflect() protoreflect.Message {
mi := &file_stark_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 Response.ProtoReflect.Descriptor instead.
func (*Response) Descriptor() ([]byte, []int) {
return file_stark_proto_rawDescGZIP(), []int{2}
}
func (x *Response) GetSuccess() bool {
if x != nil {
return x.Success
}
return false
}
func (x *Response) GetRecord() *Record {
if x != nil {
return x.Record
}
return nil
}
//
//Record.
//
//This message is used to describe a sequencing metadata.
//Record's will be able to encode runs, samples and libraries.
//WIP.
type Record struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// reserved:
Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` // universally unique id for the record
PreviousCID string `protobuf:"bytes,2,opt,name=previousCID,proto3" json:"previousCID,omitempty"` // the last known CID this record was pulled from (set during a Get operation)
History []*RecordComment `protobuf:"bytes,3,rep,name=history,proto3" json:"history,omitempty"` // describes the history of the record - can be used to get timestamps for creation and last updated
Encrypted bool `protobuf:"varint,4,opt,name=encrypted,proto3" json:"encrypted,omitempty"` // set true to indicate if fields have been encrypted
Status Status `protobuf:"varint,5,opt,name=status,proto3,enum=stark.Status" json:"status,omitempty"` // describes if untagged/tagged/etc.
// user updateable:
Alias string `protobuf:"bytes,6,opt,name=alias,proto3" json:"alias,omitempty"` // the record name / human readable id (used as the default RecordKey ID)
Description string `protobuf:"bytes,7,opt,name=description,proto3" json:"description,omitempty"` // a short description of the record
LocalSequencerOutputDir string `protobuf:"bytes,9,opt,name=localSequencerOutputDir,proto3" json:"localSequencerOutputDir,omitempty"` // where the sequencer is outputing data for this record
LinkedSamples map[string]string `protobuf:"bytes,10,rep,name=linkedSamples,proto3" json:"linkedSamples,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // all samples linked to this record (map relates sample UUIDs to a metadata location (e.g. a CID))
LinkedLibraries map[string]string `protobuf:"bytes,11,rep,name=linkedLibraries,proto3" json:"linkedLibraries,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // all libraries linked to this record (map relates library UUIDs to a metadata location (e.g. a CID))
Barcodes map[string]int32 `protobuf:"bytes,12,rep,name=barcodes,proto3" json:"barcodes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // all barcodes used by this record (map links library UUID to barcode for that library)
}
func (x *Record) Reset() {
*x = Record{}
if protoimpl.UnsafeEnabled {
mi := &file_stark_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Record) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Record) ProtoMessage() {}
func (x *Record) ProtoReflect() protoreflect.Message {
mi := &file_stark_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 Record.ProtoReflect.Descriptor instead.
func (*Record) Descriptor() ([]byte, []int) {
return file_stark_proto_rawDescGZIP(), []int{3}
}
func (x *Record) GetUuid() string {
if x != nil {
return x.Uuid
}
return ""
}
func (x *Record) GetPreviousCID() string {
if x != nil {
return x.PreviousCID
}
return ""
}
func (x *Record) GetHistory() []*RecordComment {
if x != nil {
return x.History
}
return nil
}
func (x *Record) GetEncrypted() bool {
if x != nil {
return x.Encrypted
}
return false
}
func (x *Record) GetStatus() Status {
if x != nil {
return x.Status
}
return Status_UN_INITIALIZED
}
func (x *Record) GetAlias() string {
if x != nil {
return x.Alias
}
return ""
}
func (x *Record) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *Record) GetLocalSequencerOutputDir() string {
if x != nil {
return x.LocalSequencerOutputDir
}
return ""
}
func (x *Record) GetLinkedSamples() map[string]string {
if x != nil {
return x.LinkedSamples
}
return nil
}
func (x *Record) GetLinkedLibraries() map[string]string {
if x != nil {
return x.LinkedLibraries
}
return nil
}
func (x *Record) GetBarcodes() map[string]int32 {
if x != nil {
return x.Barcodes
}
return nil
}
//
//DbMeta.
//
//This message is used to encode runtime
//information for a stark database.
type DbMeta struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Project string `protobuf:"bytes,1,opt,name=Project,proto3" json:"Project,omitempty"` // project name for the current database
Snapshot string `protobuf:"bytes,2,opt,name=Snapshot,proto3" json:"Snapshot,omitempty"` // CID for the current database state
NodeAddress string `protobuf:"bytes,3,opt,name=NodeAddress,proto3" json:"NodeAddress,omitempty"` // the IPFS node address for the database
Peers []string `protobuf:"bytes,4,rep,name=Peers,proto3" json:"Peers,omitempty"` // the IPFS peers in the swarm
Pinning bool `protobuf:"varint,5,opt,name=Pinning,proto3" json:"Pinning,omitempty"` // if true, database is pinning entries
Announcing bool `protobuf:"varint,6,opt,name=Announcing,proto3" json:"Announcing,omitempty"` // if true, database is announcing entries on PubSub
CurrEntries int32 `protobuf:"varint,7,opt,name=CurrEntries,proto3" json:"CurrEntries,omitempty"` // current number of entries in the database
Pairs map[string]string `protobuf:"bytes,8,rep,name=Pairs,proto3" json:"Pairs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // pairs of Keys -> Record CIDs held in the database
}
func (x *DbMeta) Reset() {
*x = DbMeta{}
if protoimpl.UnsafeEnabled {
mi := &file_stark_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DbMeta) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DbMeta) ProtoMessage() {}
func (x *DbMeta) ProtoReflect() protoreflect.Message {
mi := &file_stark_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 DbMeta.ProtoReflect.Descriptor instead.
func (*DbMeta) Descriptor() ([]byte, []int) {
return file_stark_proto_rawDescGZIP(), []int{4}
}
func (x *DbMeta) GetProject() string {
if x != nil {
return x.Project
}
return ""
}
func (x *DbMeta) GetSnapshot() string {
if x != nil {
return x.Snapshot
}
return ""
}
func (x *DbMeta) GetNodeAddress() string {
if x != nil {
return x.NodeAddress
}
return ""
}
func (x *DbMeta) GetPeers() []string {
if x != nil {
return x.Peers
}
return nil
}
func (x *DbMeta) GetPinning() bool {
if x != nil {
return x.Pinning
}
return false
}
func (x *DbMeta) GetAnnouncing() bool {
if x != nil {
return x.Announcing
}
return false
}
func (x *DbMeta) GetCurrEntries() int32 {
if x != nil {
return x.CurrEntries
}
return 0
}
func (x *DbMeta) GetPairs() map[string]string {
if x != nil {
return x.Pairs
}
return nil
}
//
//RecordComment.
//
//This message is used to describe message history.
type RecordComment struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Timestamp *timestamp.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // timestamp for change
Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"` // description of the change
PreviousCID string `protobuf:"bytes,3,opt,name=previousCID,proto3" json:"previousCID,omitempty"` // last known CID for a Record (used to rollback the Record and undo the newly commented change)
}
func (x *RecordComment) Reset() {
*x = RecordComment{}
if protoimpl.UnsafeEnabled {
mi := &file_stark_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RecordComment) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RecordComment) ProtoMessage() {}
func (x *RecordComment) ProtoReflect() protoreflect.Message {
mi := &file_stark_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 RecordComment.ProtoReflect.Descriptor instead.
func (*RecordComment) Descriptor() ([]byte, []int) {
return file_stark_proto_rawDescGZIP(), []int{5}
}
func (x *RecordComment) GetTimestamp() *timestamp.Timestamp {
if x != nil {
return x.Timestamp
}
return nil
}
func (x *RecordComment) GetText() string {
if x != nil {
return x.Text
}
return ""
}
func (x *RecordComment) GetPreviousCID() string {
if x != nil {
return x.PreviousCID
}
return ""
}
var File_stark_proto protoreflect.FileDescriptor
var file_stark_proto_rawDesc = []byte{
0x0a, 0x0b, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x73,
0x74, 0x61, 0x72, 0x6b, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x22, 0x48, 0x0a, 0x0d, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x50,
0x61, 0x69, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x25, 0x0a, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18,
0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x2e, 0x52, 0x65,
0x63, 0x6f, 0x72, 0x64, 0x52, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x22, 0x17, 0x0a, 0x03,
0x4b, 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x4b, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01,
0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x25, 0x0a, 0x06, 0x72,
0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x74,
0x61, 0x72, 0x6b, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x06, 0x72, 0x65, 0x63, 0x6f,
0x72, 0x64, 0x22, 0xb7, 0x05, 0x0a, 0x06, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x12, 0x0a,
0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69,
0x64, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x43, 0x49, 0x44,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73,
0x43, 0x49, 0x44, 0x12, 0x2e, 0x0a, 0x07, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x03,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x2e, 0x52, 0x65, 0x63,
0x6f, 0x72, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x07, 0x68, 0x69, 0x73, 0x74,
0x6f, 0x72, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64,
0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65,
0x64, 0x12, 0x25, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28,
0x0e, 0x32, 0x0d, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61,
0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x20,
0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20,
0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e,
0x12, 0x38, 0x0a, 0x17, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63,
0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x44, 0x69, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28,
0x09, 0x52, 0x17, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65,
0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x44, 0x69, 0x72, 0x12, 0x46, 0x0a, 0x0d, 0x6c, 0x69,
0x6e, 0x6b, 0x65, 0x64, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x20, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64,
0x2e, 0x4c, 0x69, 0x6e, 0x6b, 0x65, 0x64, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x45, 0x6e,
0x74, 0x72, 0x79, 0x52, 0x0d, 0x6c, 0x69, 0x6e, 0x6b, 0x65, 0x64, 0x53, 0x61, 0x6d, 0x70, 0x6c,
0x65, 0x73, 0x12, 0x4c, 0x0a, 0x0f, 0x6c, 0x69, 0x6e, 0x6b, 0x65, 0x64, 0x4c, 0x69, 0x62, 0x72,
0x61, 0x72, 0x69, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x73, 0x74,
0x61, 0x72, 0x6b, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x4c, 0x69, 0x6e, 0x6b, 0x65,
0x64, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52,
0x0f, 0x6c, 0x69, 0x6e, 0x6b, 0x65, 0x64, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73,
0x12, 0x37, 0x0a, 0x08, 0x62, 0x61, 0x72, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x72,
0x64, 0x2e, 0x42, 0x61, 0x72, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52,
0x08, 0x62, 0x61, 0x72, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x1a, 0x40, 0x0a, 0x12, 0x4c, 0x69, 0x6e,
0x6b, 0x65, 0x64, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12,
0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65,
0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x42, 0x0a, 0x14, 0x4c,
0x69, 0x6e, 0x6b, 0x65, 0x64, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x45, 0x6e,
0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a,
0x3b, 0x0a, 0x0d, 0x42, 0x61, 0x72, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79,
0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b,
0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xbc, 0x02, 0x0a,
0x06, 0x44, 0x62, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x50, 0x72, 0x6f, 0x6a, 0x65,
0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63,
0x74, 0x12, 0x1a, 0x0a, 0x08, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x08, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x20, 0x0a,
0x0b, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0b, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12,
0x14, 0x0a, 0x05, 0x50, 0x65, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05,
0x50, 0x65, 0x65, 0x72, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x50, 0x69, 0x6e, 0x6e, 0x69, 0x6e, 0x67,
0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x50, 0x69, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x12,
0x1e, 0x0a, 0x0a, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x18, 0x06, 0x20,
0x01, 0x28, 0x08, 0x52, 0x0a, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x12,
0x20, 0x0a, 0x0b, 0x43, 0x75, 0x72, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x07,
0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x43, 0x75, 0x72, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65,
0x73, 0x12, 0x2e, 0x0a, 0x05, 0x50, 0x61, 0x69, 0x72, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x18, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x2e, 0x44, 0x62, 0x4d, 0x65, 0x74, 0x61, 0x2e,
0x50, 0x61, 0x69, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x50, 0x61, 0x69, 0x72,
0x73, 0x1a, 0x38, 0x0a, 0x0a, 0x50, 0x61, 0x69, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12,
0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65,
0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x7f, 0x0a, 0x0d, 0x52,
0x65, 0x63, 0x6f, 0x72, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x38, 0x0a, 0x09,
0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d,
0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72,
0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x43, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0b, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x43, 0x49, 0x44, 0x2a, 0x36, 0x0a, 0x06,
0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x0e, 0x55, 0x4e, 0x5f, 0x49, 0x4e, 0x49,
0x54, 0x49, 0x41, 0x4c, 0x49, 0x5a, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x75, 0x6e,
0x74, 0x61, 0x67, 0x67, 0x65, 0x64, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x74, 0x61, 0x67, 0x67,
0x65, 0x64, 0x10, 0x02, 0x32, 0x90, 0x01, 0x0a, 0x07, 0x53, 0x74, 0x61, 0x72, 0x6b, 0x44, 0x62,
0x12, 0x2e, 0x0a, 0x03, 0x53, 0x65, 0x74, 0x12, 0x14, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x2e,
0x4b, 0x65, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x50, 0x61, 0x69, 0x72, 0x1a, 0x0f, 0x2e,
0x73, 0x74, 0x61, 0x72, 0x6b, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
0x12, 0x24, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x0a, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x2e,
0x4b, 0x65, 0x79, 0x1a, 0x0f, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x2e, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x2f, 0x0a, 0x04, 0x44, 0x75, 0x6d, 0x70, 0x12, 0x16,
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x0d, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x2e, 0x44,
0x62, 0x4d, 0x65, 0x74, 0x61, 0x22, 0x00, 0x42, 0x09, 0x5a, 0x07, 0x2e, 0x3b, 0x73, 0x74, 0x61,
0x72, 0x6b, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_stark_proto_rawDescOnce sync.Once
file_stark_proto_rawDescData = file_stark_proto_rawDesc
)
func file_stark_proto_rawDescGZIP() []byte {
file_stark_proto_rawDescOnce.Do(func() {
file_stark_proto_rawDescData = protoimpl.X.CompressGZIP(file_stark_proto_rawDescData)
})
return file_stark_proto_rawDescData
}
var file_stark_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_stark_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
var file_stark_proto_goTypes = []interface{}{
(Status)(0), // 0: stark.Status
(*KeyRecordPair)(nil), // 1: stark.KeyRecordPair
(*Key)(nil), // 2: stark.Key
(*Response)(nil), // 3: stark.Response
(*Record)(nil), // 4: stark.Record
(*DbMeta)(nil), // 5: stark.DbMeta
(*RecordComment)(nil), // 6: stark.RecordComment
nil, // 7: stark.Record.LinkedSamplesEntry
nil, // 8: stark.Record.LinkedLibrariesEntry
nil, // 9: stark.Record.BarcodesEntry
nil, // 10: stark.DbMeta.PairsEntry
(*timestamp.Timestamp)(nil), // 11: google.protobuf.Timestamp
(*empty.Empty)(nil), // 12: google.protobuf.Empty
}
var file_stark_proto_depIdxs = []int32{
4, // 0: stark.KeyRecordPair.record:type_name -> stark.Record
4, // 1: stark.Response.record:type_name -> stark.Record
6, // 2: stark.Record.history:type_name -> stark.RecordComment
0, // 3: stark.Record.status:type_name -> stark.Status
7, // 4: stark.Record.linkedSamples:type_name -> stark.Record.LinkedSamplesEntry
8, // 5: stark.Record.linkedLibraries:type_name -> stark.Record.LinkedLibrariesEntry
9, // 6: stark.Record.barcodes:type_name -> stark.Record.BarcodesEntry
10, // 7: stark.DbMeta.Pairs:type_name -> stark.DbMeta.PairsEntry
11, // 8: stark.RecordComment.timestamp:type_name -> google.protobuf.Timestamp
1, // 9: stark.StarkDb.Set:input_type -> stark.KeyRecordPair
2, // 10: stark.StarkDb.Get:input_type -> stark.Key
12, // 11: stark.StarkDb.Dump:input_type -> google.protobuf.Empty
3, // 12: stark.StarkDb.Set:output_type -> stark.Response
3, // 13: stark.StarkDb.Get:output_type -> stark.Response
5, // 14: stark.StarkDb.Dump:output_type -> stark.DbMeta
12, // [12:15] is the sub-list for method output_type
9, // [9:12] is the sub-list for method input_type
9, // [9:9] is the sub-list for extension type_name
9, // [9:9] is the sub-list for extension extendee
0, // [0:9] is the sub-list for field type_name
}
func init() { file_stark_proto_init() }
func file_stark_proto_init() {
if File_stark_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_stark_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*KeyRecordPair); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_stark_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Key); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_stark_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Response); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_stark_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Record); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_stark_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DbMeta); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_stark_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RecordComment); 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_stark_proto_rawDesc,
NumEnums: 1,
NumMessages: 10,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_stark_proto_goTypes,
DependencyIndexes: file_stark_proto_depIdxs,
EnumInfos: file_stark_proto_enumTypes,
MessageInfos: file_stark_proto_msgTypes,
}.Build()
File_stark_proto = out.File
file_stark_proto_rawDesc = nil
file_stark_proto_goTypes = nil
file_stark_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
// StarkDbClient is the client API for StarkDb service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type StarkDbClient interface {
Set(ctx context.Context, in *KeyRecordPair, opts ...grpc.CallOption) (*Response, error)
Get(ctx context.Context, in *Key, opts ...grpc.CallOption) (*Response, error)
Dump(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*DbMeta, error)
}
type starkDbClient struct {
cc grpc.ClientConnInterface
}
func NewStarkDbClient(cc grpc.ClientConnInterface) StarkDbClient {
return &starkDbClient{cc}
}
func (c *starkDbClient) Set(ctx context.Context, in *KeyRecordPair, opts ...grpc.CallOption) (*Response, error) {
out := new(Response)
err := c.cc.Invoke(ctx, "/stark.StarkDb/Set", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *starkDbClient) Get(ctx context.Context, in *Key, opts ...grpc.CallOption) (*Response, error) {
out := new(Response)
err := c.cc.Invoke(ctx, "/stark.StarkDb/Get", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *starkDbClient) Dump(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*DbMeta, error) {
out := new(DbMeta)
err := c.cc.Invoke(ctx, "/stark.StarkDb/Dump", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// StarkDbServer is the server API for StarkDb service.
type StarkDbServer interface {
Set(context.Context, *KeyRecordPair) (*Response, error)
Get(context.Context, *Key) (*Response, error)
Dump(context.Context, *empty.Empty) (*DbMeta, error)
}
// UnimplementedStarkDbServer can be embedded to have forward compatible implementations.
type UnimplementedStarkDbServer struct {
}
func (*UnimplementedStarkDbServer) Set(context.Context, *KeyRecordPair) (*Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method Set not implemented")
}
func (*UnimplementedStarkDbServer) Get(context.Context, *Key) (*Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (*UnimplementedStarkDbServer) Dump(context.Context, *empty.Empty) (*DbMeta, error) {
return nil, status.Errorf(codes.Unimplemented, "method Dump not implemented")
}
func RegisterStarkDbServer(s *grpc.Server, srv StarkDbServer) {
s.RegisterService(&_StarkDb_serviceDesc, srv)
}
func _StarkDb_Set_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(KeyRecordPair)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(StarkDbServer).Set(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/stark.StarkDb/Set",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(StarkDbServer).Set(ctx, req.(*KeyRecordPair))
}
return interceptor(ctx, in, info, handler)
}
func _StarkDb_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Key)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(StarkDbServer).Get(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/stark.StarkDb/Get",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(StarkDbServer).Get(ctx, req.(*Key))
}
return interceptor(ctx, in, info, handler)
}
func _StarkDb_Dump_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(empty.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(StarkDbServer).Dump(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/stark.StarkDb/Dump",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(StarkDbServer).Dump(ctx, req.(*empty.Empty))
}
return interceptor(ctx, in, info, handler)
}
var _StarkDb_serviceDesc = grpc.ServiceDesc{
ServiceName: "stark.StarkDb",
HandlerType: (*StarkDbServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Set",
Handler: _StarkDb_Set_Handler,
},
{
MethodName: "Get",
Handler: _StarkDb_Get_Handler,
},
{
MethodName: "Dump",
Handler: _StarkDb_Dump_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "stark.proto",
}