/
package.pb.go
439 lines (392 loc) · 14.8 KB
/
package.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
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: package.proto
package internal
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import any "github.com/golang/protobuf/ptypes/any"
// 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.ProtoPackageIsVersion2 // please upgrade the proto package
type Package struct {
Anything *any.Any `protobuf:"bytes,1,opt,name=anything,proto3" json:"anything,omitempty"`
Pubkey []byte `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey,omitempty"`
Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"`
// Sender's address and public key.
Sender *ID `protobuf:"bytes,4,opt,name=sender,proto3" json:"sender,omitempty"`
// request_nonce is the request/response ID. Null if ID associated to a message is not a request/response.
RequestNonce uint64 `protobuf:"varint,5,opt,name=request_nonce,json=requestNonce,proto3" json:"request_nonce,omitempty"`
// message_nonce is the sequence ID.
MessageNonce uint64 `protobuf:"varint,6,opt,name=message_nonce,json=messageNonce,proto3" json:"message_nonce,omitempty"`
// reply_flag indicates this is a reply to a request
ReplyFlag bool `protobuf:"varint,7,opt,name=reply_flag,json=replyFlag,proto3" json:"reply_flag,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Package) Reset() { *m = Package{} }
func (m *Package) String() string { return proto.CompactTextString(m) }
func (*Package) ProtoMessage() {}
func (*Package) Descriptor() ([]byte, []int) {
return fileDescriptor_package_e71f04067b664858, []int{0}
}
func (m *Package) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Package.Unmarshal(m, b)
}
func (m *Package) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Package.Marshal(b, m, deterministic)
}
func (dst *Package) XXX_Merge(src proto.Message) {
xxx_messageInfo_Package.Merge(dst, src)
}
func (m *Package) XXX_Size() int {
return xxx_messageInfo_Package.Size(m)
}
func (m *Package) XXX_DiscardUnknown() {
xxx_messageInfo_Package.DiscardUnknown(m)
}
var xxx_messageInfo_Package proto.InternalMessageInfo
func (m *Package) GetAnything() *any.Any {
if m != nil {
return m.Anything
}
return nil
}
func (m *Package) GetPubkey() []byte {
if m != nil {
return m.Pubkey
}
return nil
}
func (m *Package) GetSignature() []byte {
if m != nil {
return m.Signature
}
return nil
}
func (m *Package) GetSender() *ID {
if m != nil {
return m.Sender
}
return nil
}
func (m *Package) GetRequestNonce() uint64 {
if m != nil {
return m.RequestNonce
}
return 0
}
func (m *Package) GetMessageNonce() uint64 {
if m != nil {
return m.MessageNonce
}
return 0
}
func (m *Package) GetReplyFlag() bool {
if m != nil {
return m.ReplyFlag
}
return false
}
type Hi struct {
// public_key of the peer (we no longer use the public key as the peer ID, but use it to verify messages)
PublicKey []byte `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
// address is the network address of the peer
Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
// id is the computed hash of the public key
Id []byte `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Hi) Reset() { *m = Hi{} }
func (m *Hi) String() string { return proto.CompactTextString(m) }
func (*Hi) ProtoMessage() {}
func (*Hi) Descriptor() ([]byte, []int) {
return fileDescriptor_package_e71f04067b664858, []int{1}
}
func (m *Hi) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Hi.Unmarshal(m, b)
}
func (m *Hi) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Hi.Marshal(b, m, deterministic)
}
func (dst *Hi) XXX_Merge(src proto.Message) {
xxx_messageInfo_Hi.Merge(dst, src)
}
func (m *Hi) XXX_Size() int {
return xxx_messageInfo_Hi.Size(m)
}
func (m *Hi) XXX_DiscardUnknown() {
xxx_messageInfo_Hi.DiscardUnknown(m)
}
var xxx_messageInfo_Hi proto.InternalMessageInfo
func (m *Hi) GetPublicKey() []byte {
if m != nil {
return m.PublicKey
}
return nil
}
func (m *Hi) GetAddress() string {
if m != nil {
return m.Address
}
return ""
}
func (m *Hi) GetId() []byte {
if m != nil {
return m.Id
}
return nil
}
type ID struct {
// public_key of the peer (we no longer use the public key as the peer ID, but use it to verify messages)
PublicKey []byte `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
// address is the network address of the peer
Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
// id is the computed hash of the public key
Id []byte `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ID) Reset() { *m = ID{} }
func (m *ID) String() string { return proto.CompactTextString(m) }
func (*ID) ProtoMessage() {}
func (*ID) Descriptor() ([]byte, []int) {
return fileDescriptor_package_e71f04067b664858, []int{2}
}
func (m *ID) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ID.Unmarshal(m, b)
}
func (m *ID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ID.Marshal(b, m, deterministic)
}
func (dst *ID) XXX_Merge(src proto.Message) {
xxx_messageInfo_ID.Merge(dst, src)
}
func (m *ID) XXX_Size() int {
return xxx_messageInfo_ID.Size(m)
}
func (m *ID) XXX_DiscardUnknown() {
xxx_messageInfo_ID.DiscardUnknown(m)
}
var xxx_messageInfo_ID proto.InternalMessageInfo
func (m *ID) GetPublicKey() []byte {
if m != nil {
return m.PublicKey
}
return nil
}
func (m *ID) GetAddress() string {
if m != nil {
return m.Address
}
return ""
}
func (m *ID) GetId() []byte {
if m != nil {
return m.Id
}
return nil
}
type Ping struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Ping) Reset() { *m = Ping{} }
func (m *Ping) String() string { return proto.CompactTextString(m) }
func (*Ping) ProtoMessage() {}
func (*Ping) Descriptor() ([]byte, []int) {
return fileDescriptor_package_e71f04067b664858, []int{3}
}
func (m *Ping) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Ping.Unmarshal(m, b)
}
func (m *Ping) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Ping.Marshal(b, m, deterministic)
}
func (dst *Ping) XXX_Merge(src proto.Message) {
xxx_messageInfo_Ping.Merge(dst, src)
}
func (m *Ping) XXX_Size() int {
return xxx_messageInfo_Ping.Size(m)
}
func (m *Ping) XXX_DiscardUnknown() {
xxx_messageInfo_Ping.DiscardUnknown(m)
}
var xxx_messageInfo_Ping proto.InternalMessageInfo
type Pong struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Pong) Reset() { *m = Pong{} }
func (m *Pong) String() string { return proto.CompactTextString(m) }
func (*Pong) ProtoMessage() {}
func (*Pong) Descriptor() ([]byte, []int) {
return fileDescriptor_package_e71f04067b664858, []int{4}
}
func (m *Pong) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Pong.Unmarshal(m, b)
}
func (m *Pong) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Pong.Marshal(b, m, deterministic)
}
func (dst *Pong) XXX_Merge(src proto.Message) {
xxx_messageInfo_Pong.Merge(dst, src)
}
func (m *Pong) XXX_Size() int {
return xxx_messageInfo_Pong.Size(m)
}
func (m *Pong) XXX_DiscardUnknown() {
xxx_messageInfo_Pong.DiscardUnknown(m)
}
var xxx_messageInfo_Pong proto.InternalMessageInfo
type LookupNodeRequest struct {
Target *ID `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *LookupNodeRequest) Reset() { *m = LookupNodeRequest{} }
func (m *LookupNodeRequest) String() string { return proto.CompactTextString(m) }
func (*LookupNodeRequest) ProtoMessage() {}
func (*LookupNodeRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_package_e71f04067b664858, []int{5}
}
func (m *LookupNodeRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_LookupNodeRequest.Unmarshal(m, b)
}
func (m *LookupNodeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_LookupNodeRequest.Marshal(b, m, deterministic)
}
func (dst *LookupNodeRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_LookupNodeRequest.Merge(dst, src)
}
func (m *LookupNodeRequest) XXX_Size() int {
return xxx_messageInfo_LookupNodeRequest.Size(m)
}
func (m *LookupNodeRequest) XXX_DiscardUnknown() {
xxx_messageInfo_LookupNodeRequest.DiscardUnknown(m)
}
var xxx_messageInfo_LookupNodeRequest proto.InternalMessageInfo
func (m *LookupNodeRequest) GetTarget() *ID {
if m != nil {
return m.Target
}
return nil
}
type LookupNodeResponse struct {
Peers []*ID `protobuf:"bytes,1,rep,name=peers,proto3" json:"peers,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *LookupNodeResponse) Reset() { *m = LookupNodeResponse{} }
func (m *LookupNodeResponse) String() string { return proto.CompactTextString(m) }
func (*LookupNodeResponse) ProtoMessage() {}
func (*LookupNodeResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_package_e71f04067b664858, []int{6}
}
func (m *LookupNodeResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_LookupNodeResponse.Unmarshal(m, b)
}
func (m *LookupNodeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_LookupNodeResponse.Marshal(b, m, deterministic)
}
func (dst *LookupNodeResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_LookupNodeResponse.Merge(dst, src)
}
func (m *LookupNodeResponse) XXX_Size() int {
return xxx_messageInfo_LookupNodeResponse.Size(m)
}
func (m *LookupNodeResponse) XXX_DiscardUnknown() {
xxx_messageInfo_LookupNodeResponse.DiscardUnknown(m)
}
var xxx_messageInfo_LookupNodeResponse proto.InternalMessageInfo
func (m *LookupNodeResponse) GetPeers() []*ID {
if m != nil {
return m.Peers
}
return nil
}
type Bytes struct {
Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Bytes) Reset() { *m = Bytes{} }
func (m *Bytes) String() string { return proto.CompactTextString(m) }
func (*Bytes) ProtoMessage() {}
func (*Bytes) Descriptor() ([]byte, []int) {
return fileDescriptor_package_e71f04067b664858, []int{7}
}
func (m *Bytes) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Bytes.Unmarshal(m, b)
}
func (m *Bytes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Bytes.Marshal(b, m, deterministic)
}
func (dst *Bytes) XXX_Merge(src proto.Message) {
xxx_messageInfo_Bytes.Merge(dst, src)
}
func (m *Bytes) XXX_Size() int {
return xxx_messageInfo_Bytes.Size(m)
}
func (m *Bytes) XXX_DiscardUnknown() {
xxx_messageInfo_Bytes.DiscardUnknown(m)
}
var xxx_messageInfo_Bytes proto.InternalMessageInfo
func (m *Bytes) GetData() []byte {
if m != nil {
return m.Data
}
return nil
}
func init() {
proto.RegisterType((*Package)(nil), "internal.Package")
proto.RegisterType((*Hi)(nil), "internal.Hi")
proto.RegisterType((*ID)(nil), "internal.ID")
proto.RegisterType((*Ping)(nil), "internal.Ping")
proto.RegisterType((*Pong)(nil), "internal.Pong")
proto.RegisterType((*LookupNodeRequest)(nil), "internal.LookupNodeRequest")
proto.RegisterType((*LookupNodeResponse)(nil), "internal.LookupNodeResponse")
proto.RegisterType((*Bytes)(nil), "internal.Bytes")
}
func init() { proto.RegisterFile("package.proto", fileDescriptor_package_e71f04067b664858) }
var fileDescriptor_package_e71f04067b664858 = []byte{
// 375 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x52, 0xc1, 0x8e, 0xd3, 0x30,
0x10, 0x55, 0xb2, 0x69, 0xda, 0x0e, 0x5d, 0x24, 0x2c, 0x84, 0x2c, 0x60, 0xa5, 0x28, 0x70, 0xc8,
0x29, 0x8b, 0xe0, 0x02, 0x47, 0xd0, 0x0a, 0x51, 0x01, 0x55, 0x95, 0x1f, 0xa8, 0x9c, 0x66, 0x6a,
0xac, 0x06, 0xdb, 0xd8, 0xce, 0xc1, 0x37, 0x3e, 0x1d, 0xc5, 0x76, 0x01, 0xc1, 0x75, 0x0f, 0x96,
0x3d, 0xef, 0xbd, 0x19, 0xcf, 0x1b, 0x1b, 0xae, 0x35, 0x3b, 0x9e, 0x19, 0xc7, 0x56, 0x1b, 0xe5,
0x14, 0x59, 0x09, 0xe9, 0xd0, 0x48, 0x36, 0x3e, 0xbd, 0x09, 0x40, 0x3f, 0x9d, 0x6e, 0xb5, 0xf3,
0x1a, 0xed, 0x2d, 0x93, 0x7e, 0x5e, 0x51, 0x58, 0xff, 0xcc, 0x61, 0xb9, 0x8f, 0xa9, 0xe4, 0x15,
0xac, 0x98, 0xf4, 0xee, 0x9b, 0x90, 0x9c, 0x66, 0x55, 0xd6, 0x3c, 0x78, 0xfd, 0xb8, 0xe5, 0x4a,
0xf1, 0x31, 0x55, 0xed, 0xa7, 0x53, 0xfb, 0x5e, 0xfa, 0xee, 0xb7, 0x8a, 0x3c, 0x81, 0x52, 0x4f,
0xfd, 0x19, 0x3d, 0xcd, 0xab, 0xac, 0xd9, 0x74, 0x29, 0x22, 0xcf, 0x61, 0x6d, 0x05, 0x97, 0xcc,
0x4d, 0x06, 0xe9, 0x55, 0xa0, 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