-
Notifications
You must be signed in to change notification settings - Fork 1
/
node.pb.go
7661 lines (7336 loc) · 186 KB
/
node.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
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: node.proto
package pb
import (
context "context"
fmt "fmt"
io "io"
math "math"
math_bits "math/bits"
proto "github.com/gogo/protobuf/proto"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package
// P2PREQTYPE denotes the particular type of request being used in the p2p rpc
type P2PREQTYPE int32
const (
// equivalent of ipfs p2p close
P2PREQTYPE_CLOSE P2PREQTYPE = 0
// equivalent of ipfs p2p forward
P2PREQTYPE_FORWARD P2PREQTYPE = 1
// equivalent of ipfs p2p listen
P2PREQTYPE_LISTEN P2PREQTYPE = 2
// equivalent of ipfs p2p ls
P2PREQTYPE_LS P2PREQTYPE = 3
)
var P2PREQTYPE_name = map[int32]string{
0: "CLOSE",
1: "FORWARD",
2: "LISTEN",
3: "LS",
}
var P2PREQTYPE_value = map[string]int32{
"CLOSE": 0,
"FORWARD": 1,
"LISTEN": 2,
"LS": 3,
}
func (x P2PREQTYPE) String() string {
return proto.EnumName(P2PREQTYPE_name, int32(x))
}
func (P2PREQTYPE) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_0c843d59d2d938e7, []int{0}
}
// CONNMGMTREQTYPE indicates the particular ConnMgmt request being performed
type CONNMGMTREQTYPE int32
const (
// CM_CONNECT is used to connect to a libp2p peer
CONNMGMTREQTYPE_CM_CONNECT CONNMGMTREQTYPE = 0
// CM_DISCONNECT is used to disconnect from a libp2p peer
CONNMGMTREQTYPE_CM_DISCONNECT CONNMGMTREQTYPE = 1
// CM_STATUS is used to return status information about libp2p peer connections
// useful for determining whether or not we are connected to someone
CONNMGMTREQTYPE_CM_STATUS CONNMGMTREQTYPE = 2
//CM_GET_PEERS is used to return all known peers
CONNMGMTREQTYPE_CM_GET_PEERS CONNMGMTREQTYPE = 3
)
var CONNMGMTREQTYPE_name = map[int32]string{
0: "CM_CONNECT",
1: "CM_DISCONNECT",
2: "CM_STATUS",
3: "CM_GET_PEERS",
}
var CONNMGMTREQTYPE_value = map[string]int32{
"CM_CONNECT": 0,
"CM_DISCONNECT": 1,
"CM_STATUS": 2,
"CM_GET_PEERS": 3,
}
func (x CONNMGMTREQTYPE) String() string {
return proto.EnumName(CONNMGMTREQTYPE_name, int32(x))
}
func (CONNMGMTREQTYPE) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_0c843d59d2d938e7, []int{1}
}
// EXTRASREQTYPE indicates the particular Extras request being performed
type EXTRASREQTYPE int32
const (
// EX_ENABLE is used to enable a particular node extras feature
EXTRASREQTYPE_EX_ENABLE EXTRASREQTYPE = 0
// EX_DISABLE is used to disable a particular node extras feature
EXTRASREQTYPE_EX_DISABLE EXTRASREQTYPE = 1
)
var EXTRASREQTYPE_name = map[int32]string{
0: "EX_ENABLE",
1: "EX_DISABLE",
}
var EXTRASREQTYPE_value = map[string]int32{
"EX_ENABLE": 0,
"EX_DISABLE": 1,
}
func (x EXTRASREQTYPE) String() string {
return proto.EnumName(EXTRASREQTYPE_name, int32(x))
}
func (EXTRASREQTYPE) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_0c843d59d2d938e7, []int{2}
}
// EXTRASTYPE denotes a particular extras type
type EXTRASTYPE int32
const (
// IDENTIFY is the identify service
EXTRASTYPE_IDENTIFY EXTRASTYPE = 0
// PUBSUB is the libp2p pubsub system
EXTRASTYPE_PUBSUB EXTRASTYPE = 1
// DISCOVERY is a libp2p discovery service
EXTRASTYPE_DISCOVERY EXTRASTYPE = 2
// MDNS is used to discover libp2p hosts over mdns
EXTRASTYPE_MDNS EXTRASTYPE = 3
)
var EXTRASTYPE_name = map[int32]string{
0: "IDENTIFY",
1: "PUBSUB",
2: "DISCOVERY",
3: "MDNS",
}
var EXTRASTYPE_value = map[string]int32{
"IDENTIFY": 0,
"PUBSUB": 1,
"DISCOVERY": 2,
"MDNS": 3,
}
func (x EXTRASTYPE) String() string {
return proto.EnumName(EXTRASTYPE_name, int32(x))
}
func (EXTRASTYPE) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_0c843d59d2d938e7, []int{3}
}
// BSREQTYPE is a particular blockstore request type
type BSREQTYPE int32
const (
// BS_DELETE is used to delete a block from the store
BSREQTYPE_BS_DELETE BSREQTYPE = 0
// BS_PUT is used to put a single block in the store
BSREQTYPE_BS_PUT BSREQTYPE = 1
// BS_PUT_MANY is used to put many blocks in the store
BSREQTYPE_BS_PUT_MANY BSREQTYPE = 2
// BS_GET is used to get a block from the store
BSREQTYPE_BS_GET BSREQTYPE = 3
// BS_GET_MANY is used to get many blocks from the store
BSREQTYPE_BS_GET_MANY BSREQTYPE = 4
// BS_GET_ALL is used to retrieve all blocks from the store
// It is the gRPC equivalent of Blockstore::AllKeysChan
BSREQTYPE_BS_GET_ALL BSREQTYPE = 5
// BS_GET_STATS is used to retrieve statistics about individual blocks
BSREQTYPE_BS_GET_STATS BSREQTYPE = 6
// BS_HAS is used to retrieve whether or not we have the block
BSREQTYPE_BS_HAS BSREQTYPE = 7
// BS_HASH_ON_READ_ENABLE is used to enable hash on read
BSREQTYPE_BS_HASH_ON_READ_ENABLE BSREQTYPE = 8
// BS_HASH_ON_READ_DISABLE is used to disable hash on read
BSREQTYPE_BS_HASH_ON_READ_DISABLE BSREQTYPE = 9
)
var BSREQTYPE_name = map[int32]string{
0: "BS_DELETE",
1: "BS_PUT",
2: "BS_PUT_MANY",
3: "BS_GET",
4: "BS_GET_MANY",
5: "BS_GET_ALL",
6: "BS_GET_STATS",
7: "BS_HAS",
8: "BS_HASH_ON_READ_ENABLE",
9: "BS_HASH_ON_READ_DISABLE",
}
var BSREQTYPE_value = map[string]int32{
"BS_DELETE": 0,
"BS_PUT": 1,
"BS_PUT_MANY": 2,
"BS_GET": 3,
"BS_GET_MANY": 4,
"BS_GET_ALL": 5,
"BS_GET_STATS": 6,
"BS_HAS": 7,
"BS_HASH_ON_READ_ENABLE": 8,
"BS_HASH_ON_READ_DISABLE": 9,
}
func (x BSREQTYPE) String() string {
return proto.EnumName(BSREQTYPE_name, int32(x))
}
func (BSREQTYPE) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_0c843d59d2d938e7, []int{4}
}
// BSREQOPTS are options for blockstore requests
type BSREQOPTS int32
const (
// DEFAULT indicates to use the default settings
BSREQOPTS_DEFAULT BSREQOPTS = 0
// BS_FORCE indicates to force the request regardless of any possible issues
BSREQOPTS_BS_FORCE BSREQOPTS = 1
)
var BSREQOPTS_name = map[int32]string{
0: "DEFAULT",
1: "BS_FORCE",
}
var BSREQOPTS_value = map[string]int32{
"DEFAULT": 0,
"BS_FORCE": 1,
}
func (x BSREQOPTS) String() string {
return proto.EnumName(BSREQOPTS_name, int32(x))
}
func (BSREQOPTS) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_0c843d59d2d938e7, []int{5}
}
// DAGREQTYPE indicates the particular DagAPI request being performed
type DAGREQTYPE int32
const (
// DAG_PUT is used to add new IPLD objects
DAGREQTYPE_DAG_PUT DAGREQTYPE = 0
// DAG_GET is used to retrieve IPLD object data
DAGREQTYPE_DAG_GET DAGREQTYPE = 1
// DAG_NEW_NODE is used to create a new IPLD node object
DAGREQTYPE_DAG_NEW_NODE DAGREQTYPE = 2
// DAG_ADD_LINKS is used to add links to an IPLD node object
DAGREQTYPE_DAG_ADD_LINKS DAGREQTYPE = 3
// DAG_GET_LINKS is used to retrieve all links contained in an IPLD node object
DAGREQTYPE_DAG_GET_LINKS DAGREQTYPE = 4
// DAG_STAT is used to retrieve ipld.NodeStats information
DAGREQTYPE_DAG_STAT DAGREQTYPE = 5
)
var DAGREQTYPE_name = map[int32]string{
0: "DAG_PUT",
1: "DAG_GET",
2: "DAG_NEW_NODE",
3: "DAG_ADD_LINKS",
4: "DAG_GET_LINKS",
5: "DAG_STAT",
}
var DAGREQTYPE_value = map[string]int32{
"DAG_PUT": 0,
"DAG_GET": 1,
"DAG_NEW_NODE": 2,
"DAG_ADD_LINKS": 3,
"DAG_GET_LINKS": 4,
"DAG_STAT": 5,
}
func (x DAGREQTYPE) String() string {
return proto.EnumName(DAGREQTYPE_name, int32(x))
}
func (DAGREQTYPE) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_0c843d59d2d938e7, []int{6}
}
// KSREQTYPE indicates the particular KeystoreAPI request being performed
type KSREQTYPE int32
const (
// KS_HAS is used to check if the key exists in our keystore
KSREQTYPE_KS_HAS KSREQTYPE = 0
// KS_GET is used to retrieve private key bytes from our keystore
KSREQTYPE_KS_GET KSREQTYPE = 1
// KS_PUT is used to store private key bytes in our keystore
KSREQTYPE_KS_PUT KSREQTYPE = 2
// KS_DELETE is used to delete private keys from our keystore
KSREQTYPE_KS_DELETE KSREQTYPE = 3
// KS_LIST is used to list all keys in our keystore by their name
KSREQTYPE_KS_LIST KSREQTYPE = 4
)
var KSREQTYPE_name = map[int32]string{
0: "KS_HAS",
1: "KS_GET",
2: "KS_PUT",
3: "KS_DELETE",
4: "KS_LIST",
}
var KSREQTYPE_value = map[string]int32{
"KS_HAS": 0,
"KS_GET": 1,
"KS_PUT": 2,
"KS_DELETE": 3,
"KS_LIST": 4,
}
func (x KSREQTYPE) String() string {
return proto.EnumName(KSREQTYPE_name, int32(x))
}
func (KSREQTYPE) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_0c843d59d2d938e7, []int{7}
}
// P2PRequest is a request message holding the details of a particular P2P rpc call
type P2PRequest struct {
// indicates the request type
RequestType P2PREQTYPE `protobuf:"varint,1,opt,name=requestType,proto3,enum=pb.P2PREQTYPE" json:"requestType,omitempty"`
// used by: P2PREQTYPE.CLOSE
All bool `protobuf:"varint,2,opt,name=all,proto3" json:"all,omitempty"`
// used by: P2PREQTYPE.LS
Verbose bool `protobuf:"varint,3,opt,name=verbose,proto3" json:"verbose,omitempty"`
// used by: P2PREQTYPE.CLOSE, P2PREQTYPE.FORWARD, P2PREQTYPE.LISTEN
ProtocolName string `protobuf:"bytes,4,opt,name=protocolName,proto3" json:"protocolName,omitempty"`
// used by: P2PREQTYPE.CLOSE, P2PREQTYPE.FORWARD
// must be specified as a multiaddr
ListenAddress string `protobuf:"bytes,5,opt,name=listenAddress,proto3" json:"listenAddress,omitempty"`
// used by: P2PREQTYPE.CLOSE, P2PREQTYPE.FORWARD
// must be specified as a multiaddr
TargetAddress string `protobuf:"bytes,6,opt,name=targetAddress,proto3" json:"targetAddress,omitempty"`
// used by: P2PREQTYPE.LISTEN
// must be specified as a multiaddr
RemoteAddress string `protobuf:"bytes,7,opt,name=remoteAddress,proto3" json:"remoteAddress,omitempty"`
// used by: P2PREQTYPE.LISTEN, P2PREQTYPE.FORWARD
AllowCustomProtocols bool `protobuf:"varint,8,opt,name=allowCustomProtocols,proto3" json:"allowCustomProtocols,omitempty"`
// used by: P2PREQTYPE.LISTEN
ReportPeerID bool `protobuf:"varint,9,opt,name=reportPeerID,proto3" json:"reportPeerID,omitempty"`
}
func (m *P2PRequest) Reset() { *m = P2PRequest{} }
func (m *P2PRequest) String() string { return proto.CompactTextString(m) }
func (*P2PRequest) ProtoMessage() {}
func (*P2PRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_0c843d59d2d938e7, []int{0}
}
func (m *P2PRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *P2PRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_P2PRequest.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *P2PRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_P2PRequest.Merge(m, src)
}
func (m *P2PRequest) XXX_Size() int {
return m.Size()
}
func (m *P2PRequest) XXX_DiscardUnknown() {
xxx_messageInfo_P2PRequest.DiscardUnknown(m)
}
var xxx_messageInfo_P2PRequest proto.InternalMessageInfo
func (m *P2PRequest) GetRequestType() P2PREQTYPE {
if m != nil {
return m.RequestType
}
return P2PREQTYPE_CLOSE
}
func (m *P2PRequest) GetAll() bool {
if m != nil {
return m.All
}
return false
}
func (m *P2PRequest) GetVerbose() bool {
if m != nil {
return m.Verbose
}
return false
}
func (m *P2PRequest) GetProtocolName() string {
if m != nil {
return m.ProtocolName
}
return ""
}
func (m *P2PRequest) GetListenAddress() string {
if m != nil {
return m.ListenAddress
}
return ""
}
func (m *P2PRequest) GetTargetAddress() string {
if m != nil {
return m.TargetAddress
}
return ""
}
func (m *P2PRequest) GetRemoteAddress() string {
if m != nil {
return m.RemoteAddress
}
return ""
}
func (m *P2PRequest) GetAllowCustomProtocols() bool {
if m != nil {
return m.AllowCustomProtocols
}
return false
}
func (m *P2PRequest) GetReportPeerID() bool {
if m != nil {
return m.ReportPeerID
}
return false
}
// P2PResponse is a response message sent in response to a P2PRequest message
type P2PResponse struct {
RequestType P2PREQTYPE `protobuf:"varint,1,opt,name=requestType,proto3,enum=pb.P2PREQTYPE" json:"requestType,omitempty"`
// sent by: P2PREQTYPE.LISTEN
Names []string `protobuf:"bytes,2,rep,name=names,proto3" json:"names,omitempty"`
// sent by: P2PREQTYPE.CLOSE to indicate the number of connections closed
ConnsClosed int32 `protobuf:"varint,3,opt,name=connsClosed,proto3" json:"connsClosed,omitempty"`
// sent by: P2PREQTYPE.LS and contains all known stream information
StreamInfos []*P2PLsInfo `protobuf:"bytes,4,rep,name=streamInfos,proto3" json:"streamInfos,omitempty"`
}
func (m *P2PResponse) Reset() { *m = P2PResponse{} }
func (m *P2PResponse) String() string { return proto.CompactTextString(m) }
func (*P2PResponse) ProtoMessage() {}
func (*P2PResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_0c843d59d2d938e7, []int{1}
}
func (m *P2PResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *P2PResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_P2PResponse.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *P2PResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_P2PResponse.Merge(m, src)
}
func (m *P2PResponse) XXX_Size() int {
return m.Size()
}
func (m *P2PResponse) XXX_DiscardUnknown() {
xxx_messageInfo_P2PResponse.DiscardUnknown(m)
}
var xxx_messageInfo_P2PResponse proto.InternalMessageInfo
func (m *P2PResponse) GetRequestType() P2PREQTYPE {
if m != nil {
return m.RequestType
}
return P2PREQTYPE_CLOSE
}
func (m *P2PResponse) GetNames() []string {
if m != nil {
return m.Names
}
return nil
}
func (m *P2PResponse) GetConnsClosed() int32 {
if m != nil {
return m.ConnsClosed
}
return 0
}
func (m *P2PResponse) GetStreamInfos() []*P2PLsInfo {
if m != nil {
return m.StreamInfos
}
return nil
}
// P2PLsInfo contains information about a single p2p stream
type P2PLsInfo struct {
ProtocolName string `protobuf:"bytes,1,opt,name=protocolName,proto3" json:"protocolName,omitempty"`
ListenAddress string `protobuf:"bytes,2,opt,name=listenAddress,proto3" json:"listenAddress,omitempty"`
TargetAddress string `protobuf:"bytes,3,opt,name=targetAddress,proto3" json:"targetAddress,omitempty"`
// indicates whether or not this is a p2p listener or local listener
Local bool `protobuf:"varint,4,opt,name=local,proto3" json:"local,omitempty"`
}
func (m *P2PLsInfo) Reset() { *m = P2PLsInfo{} }
func (m *P2PLsInfo) String() string { return proto.CompactTextString(m) }
func (*P2PLsInfo) ProtoMessage() {}
func (*P2PLsInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_0c843d59d2d938e7, []int{2}
}
func (m *P2PLsInfo) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *P2PLsInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_P2PLsInfo.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *P2PLsInfo) XXX_Merge(src proto.Message) {
xxx_messageInfo_P2PLsInfo.Merge(m, src)
}
func (m *P2PLsInfo) XXX_Size() int {
return m.Size()
}
func (m *P2PLsInfo) XXX_DiscardUnknown() {
xxx_messageInfo_P2PLsInfo.DiscardUnknown(m)
}
var xxx_messageInfo_P2PLsInfo proto.InternalMessageInfo
func (m *P2PLsInfo) GetProtocolName() string {
if m != nil {
return m.ProtocolName
}
return ""
}
func (m *P2PLsInfo) GetListenAddress() string {
if m != nil {
return m.ListenAddress
}
return ""
}
func (m *P2PLsInfo) GetTargetAddress() string {
if m != nil {
return m.TargetAddress
}
return ""
}
func (m *P2PLsInfo) GetLocal() bool {
if m != nil {
return m.Local
}
return false
}
// GetPeersResponse is a response to GetPeers containing a slice of peer IDs
type GetPeersResponse struct {
// a slice of peer IDs
PeerIDs []string `protobuf:"bytes,1,rep,name=peerIDs,proto3" json:"peerIDs,omitempty"`
}
func (m *GetPeersResponse) Reset() { *m = GetPeersResponse{} }
func (m *GetPeersResponse) String() string { return proto.CompactTextString(m) }
func (*GetPeersResponse) ProtoMessage() {}
func (*GetPeersResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_0c843d59d2d938e7, []int{3}
}
func (m *GetPeersResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *GetPeersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_GetPeersResponse.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *GetPeersResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetPeersResponse.Merge(m, src)
}
func (m *GetPeersResponse) XXX_Size() int {
return m.Size()
}
func (m *GetPeersResponse) XXX_DiscardUnknown() {
xxx_messageInfo_GetPeersResponse.DiscardUnknown(m)
}
var xxx_messageInfo_GetPeersResponse proto.InternalMessageInfo
func (m *GetPeersResponse) GetPeerIDs() []string {
if m != nil {
return m.PeerIDs
}
return nil
}
type ConnMgmtRequest struct {
// indicates the particular connection management request being performed
RequestType CONNMGMTREQTYPE `protobuf:"varint,1,opt,name=requestType,proto3,enum=pb.CONNMGMTREQTYPE" json:"requestType,omitempty"`
// a list of multiaddrs
// sent by: CM_CONNECT
MultiAddrs []string `protobuf:"bytes,2,rep,name=multiAddrs,proto3" json:"multiAddrs,omitempty"`
// a list of peer IDs
// sent by: CM_DISCONNECT, CM_STATUS, CM_GET_PEERS
PeerIDs []string `protobuf:"bytes,3,rep,name=peerIDs,proto3" json:"peerIDs,omitempty"`
}
func (m *ConnMgmtRequest) Reset() { *m = ConnMgmtRequest{} }
func (m *ConnMgmtRequest) String() string { return proto.CompactTextString(m) }
func (*ConnMgmtRequest) ProtoMessage() {}
func (*ConnMgmtRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_0c843d59d2d938e7, []int{4}
}
func (m *ConnMgmtRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ConnMgmtRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ConnMgmtRequest.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *ConnMgmtRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ConnMgmtRequest.Merge(m, src)
}
func (m *ConnMgmtRequest) XXX_Size() int {
return m.Size()
}
func (m *ConnMgmtRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ConnMgmtRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ConnMgmtRequest proto.InternalMessageInfo
func (m *ConnMgmtRequest) GetRequestType() CONNMGMTREQTYPE {
if m != nil {
return m.RequestType
}
return CONNMGMTREQTYPE_CM_CONNECT
}
func (m *ConnMgmtRequest) GetMultiAddrs() []string {
if m != nil {
return m.MultiAddrs
}
return nil
}
func (m *ConnMgmtRequest) GetPeerIDs() []string {
if m != nil {
return m.PeerIDs
}
return nil
}
type ConnMgmtResponse struct {
// indicates the particular connection management request being performed
RequestType CONNMGMTREQTYPE `protobuf:"varint,1,opt,name=requestType,proto3,enum=pb.CONNMGMTREQTYPE" json:"requestType,omitempty"`
Connected map[string]bool `protobuf:"bytes,2,rep,name=connected,proto3" json:"connected,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
// a map of the peer id, and a custom message indicating success, or why there was a failure
Status map[string]*ConnMgmtStatus `protobuf:"bytes,3,rep,name=status,proto3" json:"status,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
PeerIDs []string `protobuf:"bytes,4,rep,name=peerIDs,proto3" json:"peerIDs,omitempty"`
}
func (m *ConnMgmtResponse) Reset() { *m = ConnMgmtResponse{} }
func (m *ConnMgmtResponse) String() string { return proto.CompactTextString(m) }
func (*ConnMgmtResponse) ProtoMessage() {}
func (*ConnMgmtResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_0c843d59d2d938e7, []int{5}
}
func (m *ConnMgmtResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ConnMgmtResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ConnMgmtResponse.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *ConnMgmtResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ConnMgmtResponse.Merge(m, src)
}
func (m *ConnMgmtResponse) XXX_Size() int {
return m.Size()
}
func (m *ConnMgmtResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ConnMgmtResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ConnMgmtResponse proto.InternalMessageInfo
func (m *ConnMgmtResponse) GetRequestType() CONNMGMTREQTYPE {
if m != nil {
return m.RequestType
}
return CONNMGMTREQTYPE_CM_CONNECT
}
func (m *ConnMgmtResponse) GetConnected() map[string]bool {
if m != nil {
return m.Connected
}
return nil
}
func (m *ConnMgmtResponse) GetStatus() map[string]*ConnMgmtStatus {
if m != nil {
return m.Status
}
return nil
}
func (m *ConnMgmtResponse) GetPeerIDs() []string {
if m != nil {
return m.PeerIDs
}
return nil
}
// Contains status information about a particular disconnect attempt
type ConnMgmtStatus struct {
// indicate whether or not we actually disconnected
Disconnected bool `protobuf:"varint,1,opt,name=disconnected,proto3" json:"disconnected,omitempty"`
// if disconnected is false, the reason why it is false
Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"`
}
func (m *ConnMgmtStatus) Reset() { *m = ConnMgmtStatus{} }
func (m *ConnMgmtStatus) String() string { return proto.CompactTextString(m) }
func (*ConnMgmtStatus) ProtoMessage() {}
func (*ConnMgmtStatus) Descriptor() ([]byte, []int) {
return fileDescriptor_0c843d59d2d938e7, []int{6}
}
func (m *ConnMgmtStatus) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ConnMgmtStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ConnMgmtStatus.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *ConnMgmtStatus) XXX_Merge(src proto.Message) {
xxx_messageInfo_ConnMgmtStatus.Merge(m, src)
}
func (m *ConnMgmtStatus) XXX_Size() int {
return m.Size()
}
func (m *ConnMgmtStatus) XXX_DiscardUnknown() {
xxx_messageInfo_ConnMgmtStatus.DiscardUnknown(m)
}
var xxx_messageInfo_ConnMgmtStatus proto.InternalMessageInfo
func (m *ConnMgmtStatus) GetDisconnected() bool {
if m != nil {
return m.Disconnected
}
return false
}
func (m *ConnMgmtStatus) GetReason() string {
if m != nil {
return m.Reason
}
return ""
}
type ExtrasRequest struct {
// indicates the request being performed
RequestType EXTRASREQTYPE `protobuf:"varint,1,opt,name=requestType,proto3,enum=pb.EXTRASREQTYPE" json:"requestType,omitempty"`
// indicates the extras feature this request applies to
ExtrasFeature EXTRASTYPE `protobuf:"varint,2,opt,name=extrasFeature,proto3,enum=pb.EXTRASTYPE" json:"extrasFeature,omitempty"`
}
func (m *ExtrasRequest) Reset() { *m = ExtrasRequest{} }
func (m *ExtrasRequest) String() string { return proto.CompactTextString(m) }
func (*ExtrasRequest) ProtoMessage() {}
func (*ExtrasRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_0c843d59d2d938e7, []int{7}
}
func (m *ExtrasRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ExtrasRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ExtrasRequest.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *ExtrasRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ExtrasRequest.Merge(m, src)
}
func (m *ExtrasRequest) XXX_Size() int {
return m.Size()
}
func (m *ExtrasRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ExtrasRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ExtrasRequest proto.InternalMessageInfo
func (m *ExtrasRequest) GetRequestType() EXTRASREQTYPE {
if m != nil {
return m.RequestType
}
return EXTRASREQTYPE_EX_ENABLE
}
func (m *ExtrasRequest) GetExtrasFeature() EXTRASTYPE {
if m != nil {
return m.ExtrasFeature
}
return EXTRASTYPE_IDENTIFY
}
// BlockstoreRequest is a message used to control blockstores
type BlockstoreRequest struct {
// indicates the particular request type being made
RequestType BSREQTYPE `protobuf:"varint,1,opt,name=requestType,proto3,enum=pb.BSREQTYPE" json:"requestType,omitempty"`
// optional request settings
ReqOpts []BSREQOPTS `protobuf:"varint,2,rep,packed,name=reqOpts,proto3,enum=pb.BSREQOPTS" json:"reqOpts,omitempty"`
// cids of blocks
// sent by: BS_DELETE, BS_GET, BS_GET_MANY, BS_GET_STATS
Cids []string `protobuf:"bytes,3,rep,name=cids,proto3" json:"cids,omitempty"`
// the data we are putting
// sent by: BS_PUT, BS_PUT_MANY
Data [][]byte `protobuf:"bytes,4,rep,name=data,proto3" json:"data,omitempty"`
// the cid version to use when constructing blocks, default is v1
// sent by: BS_PUT, BS_PUT_MANY
CidVersion string `protobuf:"bytes,5,opt,name=cidVersion,proto3" json:"cidVersion,omitempty"`
// the hash function to use when constructing blocks, default is sha2-256
// sent by: BS_PUT, BS_PUT_MANY
HashFunc string `protobuf:"bytes,7,opt,name=hashFunc,proto3" json:"hashFunc,omitempty"`
}
func (m *BlockstoreRequest) Reset() { *m = BlockstoreRequest{} }
func (m *BlockstoreRequest) String() string { return proto.CompactTextString(m) }
func (*BlockstoreRequest) ProtoMessage() {}
func (*BlockstoreRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_0c843d59d2d938e7, []int{8}
}
func (m *BlockstoreRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *BlockstoreRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_BlockstoreRequest.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *BlockstoreRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_BlockstoreRequest.Merge(m, src)
}
func (m *BlockstoreRequest) XXX_Size() int {
return m.Size()
}
func (m *BlockstoreRequest) XXX_DiscardUnknown() {
xxx_messageInfo_BlockstoreRequest.DiscardUnknown(m)
}
var xxx_messageInfo_BlockstoreRequest proto.InternalMessageInfo
func (m *BlockstoreRequest) GetRequestType() BSREQTYPE {
if m != nil {
return m.RequestType
}
return BSREQTYPE_BS_DELETE
}
func (m *BlockstoreRequest) GetReqOpts() []BSREQOPTS {
if m != nil {
return m.ReqOpts
}
return nil
}
func (m *BlockstoreRequest) GetCids() []string {
if m != nil {
return m.Cids
}
return nil
}
func (m *BlockstoreRequest) GetData() [][]byte {
if m != nil {
return m.Data
}
return nil
}
func (m *BlockstoreRequest) GetCidVersion() string {
if m != nil {
return m.CidVersion
}
return ""
}
func (m *BlockstoreRequest) GetHashFunc() string {
if m != nil {
return m.HashFunc
}
return ""
}
// BlockstoreResponse is a response to a BlockstoreqRequest
type BlockstoreResponse struct {
// indicates the particular request type being made
RequestType BSREQTYPE `protobuf:"varint,1,opt,name=requestType,proto3,enum=pb.BSREQTYPE" json:"requestType,omitempty"`
// a copy of blocks from the blockstore
// sent by: BS_PUT, BS_PUT_MANY, BS_GET, BS_GET_MANY, BS_GET_STATS, BS_GET_ALL
//
// in the case of BS_PUT, and BS_PUT_MANY requests
// the data field will be empty as this is only populated
// by get requests
//
// in the case of BS_GET_STATS only the cid, and size params
// will be filled out, since we are just interested in the size