-
Notifications
You must be signed in to change notification settings - Fork 402
/
piecestore2.pb.go
815 lines (725 loc) · 29 KB
/
piecestore2.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
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: piecestore2.proto
package pb
import (
context "context"
fmt "fmt"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
_ "github.com/golang/protobuf/ptypes/timestamp"
grpc "google.golang.org/grpc"
math "math"
time "time"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
var _ = time.Kitchen
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
// Expected order of messages from uplink:
// OrderLimit ->
// repeated
// Order ->
// Chunk ->
// PieceHash signed by uplink ->
// <- PieceHash signed by storage node
//
type PieceUploadRequest struct {
// first message to show that we are allowed to upload
Limit *OrderLimit `protobuf:"bytes,1,opt,name=limit,proto3" json:"limit,omitempty"`
// order for uploading
Order *Order `protobuf:"bytes,2,opt,name=order,proto3" json:"order,omitempty"`
Chunk *PieceUploadRequest_Chunk `protobuf:"bytes,3,opt,name=chunk,proto3" json:"chunk,omitempty"`
// final message
Done *PieceHash `protobuf:"bytes,4,opt,name=done,proto3" json:"done,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *PieceUploadRequest) Reset() { *m = PieceUploadRequest{} }
func (m *PieceUploadRequest) String() string { return proto.CompactTextString(m) }
func (*PieceUploadRequest) ProtoMessage() {}
func (*PieceUploadRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_23ff32dd550c2439, []int{0}
}
func (m *PieceUploadRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PieceUploadRequest.Unmarshal(m, b)
}
func (m *PieceUploadRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PieceUploadRequest.Marshal(b, m, deterministic)
}
func (m *PieceUploadRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_PieceUploadRequest.Merge(m, src)
}
func (m *PieceUploadRequest) XXX_Size() int {
return xxx_messageInfo_PieceUploadRequest.Size(m)
}
func (m *PieceUploadRequest) XXX_DiscardUnknown() {
xxx_messageInfo_PieceUploadRequest.DiscardUnknown(m)
}
var xxx_messageInfo_PieceUploadRequest proto.InternalMessageInfo
func (m *PieceUploadRequest) GetLimit() *OrderLimit {
if m != nil {
return m.Limit
}
return nil
}
func (m *PieceUploadRequest) GetOrder() *Order {
if m != nil {
return m.Order
}
return nil
}
func (m *PieceUploadRequest) GetChunk() *PieceUploadRequest_Chunk {
if m != nil {
return m.Chunk
}
return nil
}
func (m *PieceUploadRequest) GetDone() *PieceHash {
if m != nil {
return m.Done
}
return nil
}
// data message
type PieceUploadRequest_Chunk struct {
Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"`
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *PieceUploadRequest_Chunk) Reset() { *m = PieceUploadRequest_Chunk{} }
func (m *PieceUploadRequest_Chunk) String() string { return proto.CompactTextString(m) }
func (*PieceUploadRequest_Chunk) ProtoMessage() {}
func (*PieceUploadRequest_Chunk) Descriptor() ([]byte, []int) {
return fileDescriptor_23ff32dd550c2439, []int{0, 0}
}
func (m *PieceUploadRequest_Chunk) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PieceUploadRequest_Chunk.Unmarshal(m, b)
}
func (m *PieceUploadRequest_Chunk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PieceUploadRequest_Chunk.Marshal(b, m, deterministic)
}
func (m *PieceUploadRequest_Chunk) XXX_Merge(src proto.Message) {
xxx_messageInfo_PieceUploadRequest_Chunk.Merge(m, src)
}
func (m *PieceUploadRequest_Chunk) XXX_Size() int {
return xxx_messageInfo_PieceUploadRequest_Chunk.Size(m)
}
func (m *PieceUploadRequest_Chunk) XXX_DiscardUnknown() {
xxx_messageInfo_PieceUploadRequest_Chunk.DiscardUnknown(m)
}
var xxx_messageInfo_PieceUploadRequest_Chunk proto.InternalMessageInfo
func (m *PieceUploadRequest_Chunk) GetOffset() int64 {
if m != nil {
return m.Offset
}
return 0
}
func (m *PieceUploadRequest_Chunk) GetData() []byte {
if m != nil {
return m.Data
}
return nil
}
type PieceUploadResponse struct {
Done *PieceHash `protobuf:"bytes,1,opt,name=done,proto3" json:"done,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *PieceUploadResponse) Reset() { *m = PieceUploadResponse{} }
func (m *PieceUploadResponse) String() string { return proto.CompactTextString(m) }
func (*PieceUploadResponse) ProtoMessage() {}
func (*PieceUploadResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_23ff32dd550c2439, []int{1}
}
func (m *PieceUploadResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PieceUploadResponse.Unmarshal(m, b)
}
func (m *PieceUploadResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PieceUploadResponse.Marshal(b, m, deterministic)
}
func (m *PieceUploadResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_PieceUploadResponse.Merge(m, src)
}
func (m *PieceUploadResponse) XXX_Size() int {
return xxx_messageInfo_PieceUploadResponse.Size(m)
}
func (m *PieceUploadResponse) XXX_DiscardUnknown() {
xxx_messageInfo_PieceUploadResponse.DiscardUnknown(m)
}
var xxx_messageInfo_PieceUploadResponse proto.InternalMessageInfo
func (m *PieceUploadResponse) GetDone() *PieceHash {
if m != nil {
return m.Done
}
return nil
}
// Expected order of messages from uplink:
// {OrderLimit, Chunk} ->
// go repeated
// Order -> (async)
// go repeated
// <- PieceDownloadResponse.Chunk
type PieceDownloadRequest struct {
// first message to show that we are allowed to upload
Limit *OrderLimit `protobuf:"bytes,1,opt,name=limit,proto3" json:"limit,omitempty"`
// order for downloading
Order *Order `protobuf:"bytes,2,opt,name=order,proto3" json:"order,omitempty"`
// request for the chunk
Chunk *PieceDownloadRequest_Chunk `protobuf:"bytes,3,opt,name=chunk,proto3" json:"chunk,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *PieceDownloadRequest) Reset() { *m = PieceDownloadRequest{} }
func (m *PieceDownloadRequest) String() string { return proto.CompactTextString(m) }
func (*PieceDownloadRequest) ProtoMessage() {}
func (*PieceDownloadRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_23ff32dd550c2439, []int{2}
}
func (m *PieceDownloadRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PieceDownloadRequest.Unmarshal(m, b)
}
func (m *PieceDownloadRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PieceDownloadRequest.Marshal(b, m, deterministic)
}
func (m *PieceDownloadRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_PieceDownloadRequest.Merge(m, src)
}
func (m *PieceDownloadRequest) XXX_Size() int {
return xxx_messageInfo_PieceDownloadRequest.Size(m)
}
func (m *PieceDownloadRequest) XXX_DiscardUnknown() {
xxx_messageInfo_PieceDownloadRequest.DiscardUnknown(m)
}
var xxx_messageInfo_PieceDownloadRequest proto.InternalMessageInfo
func (m *PieceDownloadRequest) GetLimit() *OrderLimit {
if m != nil {
return m.Limit
}
return nil
}
func (m *PieceDownloadRequest) GetOrder() *Order {
if m != nil {
return m.Order
}
return nil
}
func (m *PieceDownloadRequest) GetChunk() *PieceDownloadRequest_Chunk {
if m != nil {
return m.Chunk
}
return nil
}
// Chunk that we wish to download
type PieceDownloadRequest_Chunk struct {
Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"`
ChunkSize int64 `protobuf:"varint,2,opt,name=chunk_size,json=chunkSize,proto3" json:"chunk_size,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *PieceDownloadRequest_Chunk) Reset() { *m = PieceDownloadRequest_Chunk{} }
func (m *PieceDownloadRequest_Chunk) String() string { return proto.CompactTextString(m) }
func (*PieceDownloadRequest_Chunk) ProtoMessage() {}
func (*PieceDownloadRequest_Chunk) Descriptor() ([]byte, []int) {
return fileDescriptor_23ff32dd550c2439, []int{2, 0}
}
func (m *PieceDownloadRequest_Chunk) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PieceDownloadRequest_Chunk.Unmarshal(m, b)
}
func (m *PieceDownloadRequest_Chunk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PieceDownloadRequest_Chunk.Marshal(b, m, deterministic)
}
func (m *PieceDownloadRequest_Chunk) XXX_Merge(src proto.Message) {
xxx_messageInfo_PieceDownloadRequest_Chunk.Merge(m, src)
}
func (m *PieceDownloadRequest_Chunk) XXX_Size() int {
return xxx_messageInfo_PieceDownloadRequest_Chunk.Size(m)
}
func (m *PieceDownloadRequest_Chunk) XXX_DiscardUnknown() {
xxx_messageInfo_PieceDownloadRequest_Chunk.DiscardUnknown(m)
}
var xxx_messageInfo_PieceDownloadRequest_Chunk proto.InternalMessageInfo
func (m *PieceDownloadRequest_Chunk) GetOffset() int64 {
if m != nil {
return m.Offset
}
return 0
}
func (m *PieceDownloadRequest_Chunk) GetChunkSize() int64 {
if m != nil {
return m.ChunkSize
}
return 0
}
type PieceDownloadResponse struct {
Chunk *PieceDownloadResponse_Chunk `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *PieceDownloadResponse) Reset() { *m = PieceDownloadResponse{} }
func (m *PieceDownloadResponse) String() string { return proto.CompactTextString(m) }
func (*PieceDownloadResponse) ProtoMessage() {}
func (*PieceDownloadResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_23ff32dd550c2439, []int{3}
}
func (m *PieceDownloadResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PieceDownloadResponse.Unmarshal(m, b)
}
func (m *PieceDownloadResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PieceDownloadResponse.Marshal(b, m, deterministic)
}
func (m *PieceDownloadResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_PieceDownloadResponse.Merge(m, src)
}
func (m *PieceDownloadResponse) XXX_Size() int {
return xxx_messageInfo_PieceDownloadResponse.Size(m)
}
func (m *PieceDownloadResponse) XXX_DiscardUnknown() {
xxx_messageInfo_PieceDownloadResponse.DiscardUnknown(m)
}
var xxx_messageInfo_PieceDownloadResponse proto.InternalMessageInfo
func (m *PieceDownloadResponse) GetChunk() *PieceDownloadResponse_Chunk {
if m != nil {
return m.Chunk
}
return nil
}
// Chunk response for download request
type PieceDownloadResponse_Chunk struct {
Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"`
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *PieceDownloadResponse_Chunk) Reset() { *m = PieceDownloadResponse_Chunk{} }
func (m *PieceDownloadResponse_Chunk) String() string { return proto.CompactTextString(m) }
func (*PieceDownloadResponse_Chunk) ProtoMessage() {}
func (*PieceDownloadResponse_Chunk) Descriptor() ([]byte, []int) {
return fileDescriptor_23ff32dd550c2439, []int{3, 0}
}
func (m *PieceDownloadResponse_Chunk) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PieceDownloadResponse_Chunk.Unmarshal(m, b)
}
func (m *PieceDownloadResponse_Chunk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PieceDownloadResponse_Chunk.Marshal(b, m, deterministic)
}
func (m *PieceDownloadResponse_Chunk) XXX_Merge(src proto.Message) {
xxx_messageInfo_PieceDownloadResponse_Chunk.Merge(m, src)
}
func (m *PieceDownloadResponse_Chunk) XXX_Size() int {
return xxx_messageInfo_PieceDownloadResponse_Chunk.Size(m)
}
func (m *PieceDownloadResponse_Chunk) XXX_DiscardUnknown() {
xxx_messageInfo_PieceDownloadResponse_Chunk.DiscardUnknown(m)
}
var xxx_messageInfo_PieceDownloadResponse_Chunk proto.InternalMessageInfo
func (m *PieceDownloadResponse_Chunk) GetOffset() int64 {
if m != nil {
return m.Offset
}
return 0
}
func (m *PieceDownloadResponse_Chunk) GetData() []byte {
if m != nil {
return m.Data
}
return nil
}
type PieceDeleteRequest struct {
Limit *OrderLimit `protobuf:"bytes,1,opt,name=limit,proto3" json:"limit,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *PieceDeleteRequest) Reset() { *m = PieceDeleteRequest{} }
func (m *PieceDeleteRequest) String() string { return proto.CompactTextString(m) }
func (*PieceDeleteRequest) ProtoMessage() {}
func (*PieceDeleteRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_23ff32dd550c2439, []int{4}
}
func (m *PieceDeleteRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PieceDeleteRequest.Unmarshal(m, b)
}
func (m *PieceDeleteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PieceDeleteRequest.Marshal(b, m, deterministic)
}
func (m *PieceDeleteRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_PieceDeleteRequest.Merge(m, src)
}
func (m *PieceDeleteRequest) XXX_Size() int {
return xxx_messageInfo_PieceDeleteRequest.Size(m)
}
func (m *PieceDeleteRequest) XXX_DiscardUnknown() {
xxx_messageInfo_PieceDeleteRequest.DiscardUnknown(m)
}
var xxx_messageInfo_PieceDeleteRequest proto.InternalMessageInfo
func (m *PieceDeleteRequest) GetLimit() *OrderLimit {
if m != nil {
return m.Limit
}
return nil
}
type PieceDeleteResponse struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *PieceDeleteResponse) Reset() { *m = PieceDeleteResponse{} }
func (m *PieceDeleteResponse) String() string { return proto.CompactTextString(m) }
func (*PieceDeleteResponse) ProtoMessage() {}
func (*PieceDeleteResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_23ff32dd550c2439, []int{5}
}
func (m *PieceDeleteResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PieceDeleteResponse.Unmarshal(m, b)
}
func (m *PieceDeleteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PieceDeleteResponse.Marshal(b, m, deterministic)
}
func (m *PieceDeleteResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_PieceDeleteResponse.Merge(m, src)
}
func (m *PieceDeleteResponse) XXX_Size() int {
return xxx_messageInfo_PieceDeleteResponse.Size(m)
}
func (m *PieceDeleteResponse) XXX_DiscardUnknown() {
xxx_messageInfo_PieceDeleteResponse.DiscardUnknown(m)
}
var xxx_messageInfo_PieceDeleteResponse proto.InternalMessageInfo
type RetainRequest struct {
CreationDate time.Time `protobuf:"bytes,1,opt,name=creation_date,json=creationDate,proto3,stdtime" json:"creation_date"`
Filter []byte `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *RetainRequest) Reset() { *m = RetainRequest{} }
func (m *RetainRequest) String() string { return proto.CompactTextString(m) }
func (*RetainRequest) ProtoMessage() {}
func (*RetainRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_23ff32dd550c2439, []int{6}
}
func (m *RetainRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RetainRequest.Unmarshal(m, b)
}
func (m *RetainRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RetainRequest.Marshal(b, m, deterministic)
}
func (m *RetainRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_RetainRequest.Merge(m, src)
}
func (m *RetainRequest) XXX_Size() int {
return xxx_messageInfo_RetainRequest.Size(m)
}
func (m *RetainRequest) XXX_DiscardUnknown() {
xxx_messageInfo_RetainRequest.DiscardUnknown(m)
}
var xxx_messageInfo_RetainRequest proto.InternalMessageInfo
func (m *RetainRequest) GetCreationDate() time.Time {
if m != nil {
return m.CreationDate
}
return time.Time{}
}
func (m *RetainRequest) GetFilter() []byte {
if m != nil {
return m.Filter
}
return nil
}
type RetainResponse struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *RetainResponse) Reset() { *m = RetainResponse{} }
func (m *RetainResponse) String() string { return proto.CompactTextString(m) }
func (*RetainResponse) ProtoMessage() {}
func (*RetainResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_23ff32dd550c2439, []int{7}
}
func (m *RetainResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RetainResponse.Unmarshal(m, b)
}
func (m *RetainResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RetainResponse.Marshal(b, m, deterministic)
}
func (m *RetainResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_RetainResponse.Merge(m, src)
}
func (m *RetainResponse) XXX_Size() int {
return xxx_messageInfo_RetainResponse.Size(m)
}
func (m *RetainResponse) XXX_DiscardUnknown() {
xxx_messageInfo_RetainResponse.DiscardUnknown(m)
}
var xxx_messageInfo_RetainResponse proto.InternalMessageInfo
func init() {
proto.RegisterType((*PieceUploadRequest)(nil), "piecestore.PieceUploadRequest")
proto.RegisterType((*PieceUploadRequest_Chunk)(nil), "piecestore.PieceUploadRequest.Chunk")
proto.RegisterType((*PieceUploadResponse)(nil), "piecestore.PieceUploadResponse")
proto.RegisterType((*PieceDownloadRequest)(nil), "piecestore.PieceDownloadRequest")
proto.RegisterType((*PieceDownloadRequest_Chunk)(nil), "piecestore.PieceDownloadRequest.Chunk")
proto.RegisterType((*PieceDownloadResponse)(nil), "piecestore.PieceDownloadResponse")
proto.RegisterType((*PieceDownloadResponse_Chunk)(nil), "piecestore.PieceDownloadResponse.Chunk")
proto.RegisterType((*PieceDeleteRequest)(nil), "piecestore.PieceDeleteRequest")
proto.RegisterType((*PieceDeleteResponse)(nil), "piecestore.PieceDeleteResponse")
proto.RegisterType((*RetainRequest)(nil), "piecestore.RetainRequest")
proto.RegisterType((*RetainResponse)(nil), "piecestore.RetainResponse")
}
func init() { proto.RegisterFile("piecestore2.proto", fileDescriptor_23ff32dd550c2439) }
var fileDescriptor_23ff32dd550c2439 = []byte{
// 513 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x53, 0xcd, 0x6e, 0x13, 0x3d,
0x14, 0xcd, 0xe4, 0x67, 0xd4, 0xef, 0x7e, 0x09, 0xa2, 0x86, 0xa2, 0x60, 0x09, 0x52, 0x86, 0xbf,
0xac, 0xa6, 0x28, 0xdd, 0xa1, 0x52, 0xa4, 0x92, 0x05, 0x08, 0x10, 0x95, 0xa1, 0x1b, 0x36, 0x95,
0x93, 0xb9, 0x49, 0x2d, 0x26, 0xe3, 0x61, 0xec, 0x08, 0xa9, 0xaf, 0xc0, 0x86, 0x47, 0x62, 0xc9,
0x53, 0xc0, 0x82, 0xc7, 0x60, 0x83, 0xc6, 0x3f, 0x2d, 0x93, 0x86, 0x44, 0x20, 0xb1, 0x9a, 0xb1,
0xef, 0x39, 0xf7, 0x1e, 0x9f, 0x63, 0xc3, 0x66, 0x2e, 0x70, 0x8c, 0x4a, 0xcb, 0x02, 0x07, 0x71,
0x5e, 0x48, 0x2d, 0x09, 0x9c, 0x6f, 0x51, 0x98, 0xca, 0xa9, 0xb4, 0xfb, 0xb4, 0x37, 0x95, 0x72,
0x9a, 0xe2, 0x8e, 0x59, 0x8d, 0xe6, 0x93, 0x1d, 0x2d, 0x66, 0xa8, 0x34, 0x9f, 0xe5, 0x0e, 0xd0,
0x96, 0x45, 0x82, 0x85, 0xb2, 0xab, 0xe8, 0x47, 0x00, 0xe4, 0xb0, 0xec, 0x74, 0x94, 0xa7, 0x92,
0x27, 0x0c, 0xdf, 0xcf, 0x51, 0x69, 0xd2, 0x87, 0x56, 0x2a, 0x66, 0x42, 0x77, 0x83, 0xed, 0xa0,
0xff, 0xff, 0x80, 0xc4, 0x8e, 0xf4, 0xaa, 0xfc, 0xbc, 0x28, 0x2b, 0xcc, 0x02, 0xc8, 0x6d, 0x68,
0x99, 0x5a, 0xb7, 0x6e, 0x90, 0x9d, 0x0a, 0x92, 0xd9, 0x1a, 0x79, 0x08, 0xad, 0xf1, 0xc9, 0x3c,
0x7b, 0xd7, 0x6d, 0x18, 0xd0, 0x9d, 0xf8, 0x5c, 0x7c, 0x7c, 0x71, 0x7a, 0xfc, 0xa4, 0xc4, 0x32,
0x4b, 0x21, 0x77, 0xa1, 0x99, 0xc8, 0x0c, 0xbb, 0x4d, 0x43, 0xdd, 0xf4, 0xfd, 0x0d, 0xed, 0x29,
0x57, 0x27, 0xcc, 0x94, 0xe9, 0x2e, 0xb4, 0x0c, 0x8d, 0x5c, 0x83, 0x50, 0x4e, 0x26, 0x0a, 0xad,
0xf6, 0x06, 0x73, 0x2b, 0x42, 0xa0, 0x99, 0x70, 0xcd, 0x8d, 0xce, 0x36, 0x33, 0xff, 0xd1, 0x1e,
0x5c, 0xa9, 0x8c, 0x57, 0xb9, 0xcc, 0x14, 0x9e, 0x8d, 0x0c, 0x56, 0x8e, 0x8c, 0xbe, 0x07, 0x70,
0xd5, 0xec, 0x0d, 0xe5, 0x87, 0xec, 0x1f, 0xba, 0xb7, 0x57, 0x75, 0xef, 0xde, 0x05, 0xf7, 0x16,
0xe6, 0x57, 0xfc, 0xa3, 0xfb, 0xeb, 0x8c, 0xb9, 0x01, 0x60, 0x90, 0xc7, 0x4a, 0x9c, 0xa2, 0x11,
0xd2, 0x60, 0xff, 0x99, 0x9d, 0xd7, 0xe2, 0x14, 0xa3, 0x8f, 0x01, 0x6c, 0x2d, 0x4c, 0x71, 0x36,
0x3d, 0xf2, 0xba, 0xec, 0x31, 0xef, 0xaf, 0xd0, 0x65, 0x19, 0x55, 0x61, 0x7f, 0x95, 0xd8, 0xbe,
0xbb, 0xae, 0x43, 0x4c, 0x51, 0xe3, 0x1f, 0x1b, 0x1e, 0x6d, 0xb9, 0xc4, 0x3d, 0xdf, 0x0a, 0x8b,
0x0a, 0xe8, 0x30, 0xd4, 0x5c, 0x64, 0xbe, 0xe3, 0x33, 0xe8, 0x8c, 0x0b, 0xe4, 0x5a, 0xc8, 0xec,
0x38, 0xe1, 0xda, 0xdf, 0x05, 0x1a, 0xdb, 0xe7, 0x15, 0xfb, 0xe7, 0x15, 0xbf, 0xf1, 0xcf, 0xeb,
0x60, 0xe3, 0xcb, 0xd7, 0x5e, 0xed, 0xd3, 0xb7, 0x5e, 0xc0, 0xda, 0x9e, 0x3a, 0xe4, 0x1a, 0xcb,
0xe3, 0x4d, 0x44, 0xaa, 0x5d, 0xc8, 0x6d, 0xe6, 0x56, 0xd1, 0x65, 0xb8, 0xe4, 0x67, 0x5a, 0x15,
0x83, 0xcf, 0x75, 0x80, 0xc3, 0x33, 0x0f, 0xc9, 0x4b, 0x08, 0xed, 0xc5, 0x24, 0x37, 0x57, 0x3f,
0x18, 0xda, 0xfb, 0x6d, 0xdd, 0x9d, 0xaf, 0xd6, 0x0f, 0xc8, 0x11, 0x6c, 0xf8, 0x40, 0xc8, 0xf6,
0xba, 0x3b, 0x44, 0x6f, 0xad, 0x4d, 0xb3, 0x6c, 0xfa, 0x20, 0x20, 0xcf, 0x21, 0xb4, 0x66, 0x2e,
0x51, 0x59, 0x49, 0x69, 0x89, 0xca, 0x85, 0x14, 0x6a, 0xe4, 0x31, 0x84, 0xd6, 0x13, 0x72, 0xfd,
0x57, 0x70, 0x25, 0x1b, 0x4a, 0x97, 0x95, 0x6c, 0x8b, 0x83, 0xe6, 0xdb, 0x7a, 0x3e, 0x1a, 0x85,
0x26, 0x9e, 0xdd, 0x9f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x1c, 0xd5, 0x7e, 0x72, 0x38, 0x05, 0x00,
0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// 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.SupportPackageIsVersion4
// PiecestoreClient is the client API for Piecestore service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type PiecestoreClient interface {
Upload(ctx context.Context, opts ...grpc.CallOption) (Piecestore_UploadClient, error)
Download(ctx context.Context, opts ...grpc.CallOption) (Piecestore_DownloadClient, error)
Delete(ctx context.Context, in *PieceDeleteRequest, opts ...grpc.CallOption) (*PieceDeleteResponse, error)
Retain(ctx context.Context, in *RetainRequest, opts ...grpc.CallOption) (*RetainResponse, error)
}
type piecestoreClient struct {
cc *grpc.ClientConn
}
func NewPiecestoreClient(cc *grpc.ClientConn) PiecestoreClient {
return &piecestoreClient{cc}
}
func (c *piecestoreClient) Upload(ctx context.Context, opts ...grpc.CallOption) (Piecestore_UploadClient, error) {
stream, err := c.cc.NewStream(ctx, &_Piecestore_serviceDesc.Streams[0], "/piecestore.Piecestore/Upload", opts...)
if err != nil {
return nil, err
}
x := &piecestoreUploadClient{stream}
return x, nil
}
type Piecestore_UploadClient interface {
Send(*PieceUploadRequest) error
CloseAndRecv() (*PieceUploadResponse, error)
grpc.ClientStream
}
type piecestoreUploadClient struct {
grpc.ClientStream
}
func (x *piecestoreUploadClient) Send(m *PieceUploadRequest) error {
return x.ClientStream.SendMsg(m)
}
func (x *piecestoreUploadClient) CloseAndRecv() (*PieceUploadResponse, error) {
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
m := new(PieceUploadResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *piecestoreClient) Download(ctx context.Context, opts ...grpc.CallOption) (Piecestore_DownloadClient, error) {
stream, err := c.cc.NewStream(ctx, &_Piecestore_serviceDesc.Streams[1], "/piecestore.Piecestore/Download", opts...)
if err != nil {
return nil, err
}
x := &piecestoreDownloadClient{stream}
return x, nil
}
type Piecestore_DownloadClient interface {
Send(*PieceDownloadRequest) error
Recv() (*PieceDownloadResponse, error)
grpc.ClientStream
}
type piecestoreDownloadClient struct {
grpc.ClientStream
}
func (x *piecestoreDownloadClient) Send(m *PieceDownloadRequest) error {
return x.ClientStream.SendMsg(m)
}
func (x *piecestoreDownloadClient) Recv() (*PieceDownloadResponse, error) {
m := new(PieceDownloadResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *piecestoreClient) Delete(ctx context.Context, in *PieceDeleteRequest, opts ...grpc.CallOption) (*PieceDeleteResponse, error) {
out := new(PieceDeleteResponse)
err := c.cc.Invoke(ctx, "/piecestore.Piecestore/Delete", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *piecestoreClient) Retain(ctx context.Context, in *RetainRequest, opts ...grpc.CallOption) (*RetainResponse, error) {
out := new(RetainResponse)
err := c.cc.Invoke(ctx, "/piecestore.Piecestore/Retain", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// PiecestoreServer is the server API for Piecestore service.
type PiecestoreServer interface {
Upload(Piecestore_UploadServer) error
Download(Piecestore_DownloadServer) error
Delete(context.Context, *PieceDeleteRequest) (*PieceDeleteResponse, error)
Retain(context.Context, *RetainRequest) (*RetainResponse, error)
}
func RegisterPiecestoreServer(s *grpc.Server, srv PiecestoreServer) {
s.RegisterService(&_Piecestore_serviceDesc, srv)
}
func _Piecestore_Upload_Handler(srv interface{}, stream grpc.ServerStream) error {
return srv.(PiecestoreServer).Upload(&piecestoreUploadServer{stream})
}
type Piecestore_UploadServer interface {
SendAndClose(*PieceUploadResponse) error
Recv() (*PieceUploadRequest, error)
grpc.ServerStream
}
type piecestoreUploadServer struct {
grpc.ServerStream
}
func (x *piecestoreUploadServer) SendAndClose(m *PieceUploadResponse) error {
return x.ServerStream.SendMsg(m)
}
func (x *piecestoreUploadServer) Recv() (*PieceUploadRequest, error) {
m := new(PieceUploadRequest)
if err := x.ServerStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func _Piecestore_Download_Handler(srv interface{}, stream grpc.ServerStream) error {
return srv.(PiecestoreServer).Download(&piecestoreDownloadServer{stream})
}
type Piecestore_DownloadServer interface {
Send(*PieceDownloadResponse) error
Recv() (*PieceDownloadRequest, error)
grpc.ServerStream
}
type piecestoreDownloadServer struct {
grpc.ServerStream
}
func (x *piecestoreDownloadServer) Send(m *PieceDownloadResponse) error {
return x.ServerStream.SendMsg(m)
}
func (x *piecestoreDownloadServer) Recv() (*PieceDownloadRequest, error) {
m := new(PieceDownloadRequest)
if err := x.ServerStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func _Piecestore_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PieceDeleteRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PiecestoreServer).Delete(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/piecestore.Piecestore/Delete",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PiecestoreServer).Delete(ctx, req.(*PieceDeleteRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Piecestore_Retain_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RetainRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PiecestoreServer).Retain(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/piecestore.Piecestore/Retain",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PiecestoreServer).Retain(ctx, req.(*RetainRequest))
}
return interceptor(ctx, in, info, handler)
}
var _Piecestore_serviceDesc = grpc.ServiceDesc{
ServiceName: "piecestore.Piecestore",
HandlerType: (*PiecestoreServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Delete",
Handler: _Piecestore_Delete_Handler,
},
{
MethodName: "Retain",
Handler: _Piecestore_Retain_Handler,
},
},
Streams: []grpc.StreamDesc{
{
StreamName: "Upload",
Handler: _Piecestore_Upload_Handler,
ClientStreams: true,
},
{
StreamName: "Download",
Handler: _Piecestore_Download_Handler,
ServerStreams: true,
ClientStreams: true,
},
},
Metadata: "piecestore2.proto",
}