-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwghost.pb.go
687 lines (612 loc) · 23.5 KB
/
wghost.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
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: wghost.proto
package wghost
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
math "math"
)
// 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.ProtoPackageIsVersion3 // please upgrade the proto package
type PeerConfig struct {
// PublicKey is the public key of a peer, computed from its private key.
PublicKey string `protobuf:"bytes,1,opt,name=PublicKey,proto3" json:"PublicKey,omitempty"`
// PresharedKey is an optional preshared key which may be used as an
// additional layer of security for peer communications.
PresharedKey string `protobuf:"bytes,2,opt,name=PresharedKey,proto3" json:"PresharedKey,omitempty"`
// AllowedIPs specifies which IPv4 and IPv6 addresses this peer is allowed
// to communicate on.
//
// 0.0.0.0/0 indicates that all IPv4 addresses are allowed, and ::/0
// indicates that all IPv6 addresses are allowed.
AllowedIPs []string `protobuf:"bytes,3,rep,name=AllowedIPs,proto3" json:"AllowedIPs,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *PeerConfig) Reset() { *m = PeerConfig{} }
func (m *PeerConfig) String() string { return proto.CompactTextString(m) }
func (*PeerConfig) ProtoMessage() {}
func (*PeerConfig) Descriptor() ([]byte, []int) {
return fileDescriptor_af5326e8f7a8c8f0, []int{0}
}
func (m *PeerConfig) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PeerConfig.Unmarshal(m, b)
}
func (m *PeerConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PeerConfig.Marshal(b, m, deterministic)
}
func (m *PeerConfig) XXX_Merge(src proto.Message) {
xxx_messageInfo_PeerConfig.Merge(m, src)
}
func (m *PeerConfig) XXX_Size() int {
return xxx_messageInfo_PeerConfig.Size(m)
}
func (m *PeerConfig) XXX_DiscardUnknown() {
xxx_messageInfo_PeerConfig.DiscardUnknown(m)
}
var xxx_messageInfo_PeerConfig proto.InternalMessageInfo
func (m *PeerConfig) GetPublicKey() string {
if m != nil {
return m.PublicKey
}
return ""
}
func (m *PeerConfig) GetPresharedKey() string {
if m != nil {
return m.PresharedKey
}
return ""
}
func (m *PeerConfig) GetAllowedIPs() []string {
if m != nil {
return m.AllowedIPs
}
return nil
}
type PeerConfigList struct {
// ReplacePeers specifies if the Peers in this configuration should replace
// the existing peer list, instead of appending them to the existing list.
ReplacePeers bool `protobuf:"varint,1,opt,name=ReplacePeers,proto3" json:"ReplacePeers,omitempty"`
// Peers specifies a list of peer configurations to apply to a device.
Peers []*PeerConfig `protobuf:"bytes,2,rep,name=Peers,proto3" json:"Peers,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *PeerConfigList) Reset() { *m = PeerConfigList{} }
func (m *PeerConfigList) String() string { return proto.CompactTextString(m) }
func (*PeerConfigList) ProtoMessage() {}
func (*PeerConfigList) Descriptor() ([]byte, []int) {
return fileDescriptor_af5326e8f7a8c8f0, []int{1}
}
func (m *PeerConfigList) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PeerConfigList.Unmarshal(m, b)
}
func (m *PeerConfigList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PeerConfigList.Marshal(b, m, deterministic)
}
func (m *PeerConfigList) XXX_Merge(src proto.Message) {
xxx_messageInfo_PeerConfigList.Merge(m, src)
}
func (m *PeerConfigList) XXX_Size() int {
return xxx_messageInfo_PeerConfigList.Size(m)
}
func (m *PeerConfigList) XXX_DiscardUnknown() {
xxx_messageInfo_PeerConfigList.DiscardUnknown(m)
}
var xxx_messageInfo_PeerConfigList proto.InternalMessageInfo
func (m *PeerConfigList) GetReplacePeers() bool {
if m != nil {
return m.ReplacePeers
}
return false
}
func (m *PeerConfigList) GetPeers() []*PeerConfig {
if m != nil {
return m.Peers
}
return nil
}
type PeerQuery struct {
// PublicKey is the public key of a peer, computed from its private key.
PublicKey string `protobuf:"bytes,1,opt,name=PublicKey,proto3" json:"PublicKey,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *PeerQuery) Reset() { *m = PeerQuery{} }
func (m *PeerQuery) String() string { return proto.CompactTextString(m) }
func (*PeerQuery) ProtoMessage() {}
func (*PeerQuery) Descriptor() ([]byte, []int) {
return fileDescriptor_af5326e8f7a8c8f0, []int{2}
}
func (m *PeerQuery) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PeerQuery.Unmarshal(m, b)
}
func (m *PeerQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PeerQuery.Marshal(b, m, deterministic)
}
func (m *PeerQuery) XXX_Merge(src proto.Message) {
xxx_messageInfo_PeerQuery.Merge(m, src)
}
func (m *PeerQuery) XXX_Size() int {
return xxx_messageInfo_PeerQuery.Size(m)
}
func (m *PeerQuery) XXX_DiscardUnknown() {
xxx_messageInfo_PeerQuery.DiscardUnknown(m)
}
var xxx_messageInfo_PeerQuery proto.InternalMessageInfo
func (m *PeerQuery) GetPublicKey() string {
if m != nil {
return m.PublicKey
}
return ""
}
type Endpoint struct {
IP string `protobuf:"bytes,1,opt,name=IP,proto3" json:"IP,omitempty"`
Port int32 `protobuf:"varint,2,opt,name=Port,proto3" json:"Port,omitempty"`
Zone string `protobuf:"bytes,3,opt,name=Zone,proto3" json:"Zone,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Endpoint) Reset() { *m = Endpoint{} }
func (m *Endpoint) String() string { return proto.CompactTextString(m) }
func (*Endpoint) ProtoMessage() {}
func (*Endpoint) Descriptor() ([]byte, []int) {
return fileDescriptor_af5326e8f7a8c8f0, []int{3}
}
func (m *Endpoint) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Endpoint.Unmarshal(m, b)
}
func (m *Endpoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Endpoint.Marshal(b, m, deterministic)
}
func (m *Endpoint) XXX_Merge(src proto.Message) {
xxx_messageInfo_Endpoint.Merge(m, src)
}
func (m *Endpoint) XXX_Size() int {
return xxx_messageInfo_Endpoint.Size(m)
}
func (m *Endpoint) XXX_DiscardUnknown() {
xxx_messageInfo_Endpoint.DiscardUnknown(m)
}
var xxx_messageInfo_Endpoint proto.InternalMessageInfo
func (m *Endpoint) GetIP() string {
if m != nil {
return m.IP
}
return ""
}
func (m *Endpoint) GetPort() int32 {
if m != nil {
return m.Port
}
return 0
}
func (m *Endpoint) GetZone() string {
if m != nil {
return m.Zone
}
return ""
}
type Peer struct {
// PublicKey is the public key of a peer, computed from its private key.
PublicKey string `protobuf:"bytes,1,opt,name=PublicKey,proto3" json:"PublicKey,omitempty"`
// PresharedKey is an optional preshared key which may be used as an
// additional layer of security for peer communications.
PresharedKey string `protobuf:"bytes,2,opt,name=PresharedKey,proto3" json:"PresharedKey,omitempty"`
// Endpoint is the most recent source address used for communication by
// this Peer.
Endpoint *Endpoint `protobuf:"bytes,3,opt,name=Endpoint,proto3" json:"Endpoint,omitempty"`
// LastHandshakeTime indicates the most recent time a handshake was performed
// with this peer.
//
// A zero-value time.Time indicates that no handshake has taken place with
// this peer.
LastHandshakeTime *timestamp.Timestamp `protobuf:"bytes,4,opt,name=LastHandshakeTime,proto3" json:"LastHandshakeTime,omitempty"`
// ReceiveBytes indicates the number of bytes received from this peer.
ReceiveBytes int64 `protobuf:"varint,5,opt,name=ReceiveBytes,proto3" json:"ReceiveBytes,omitempty"`
// TransmitBytes indicates the number of bytes transmitted to this peer.
TransmitBytes int64 `protobuf:"varint,6,opt,name=TransmitBytes,proto3" json:"TransmitBytes,omitempty"`
// AllowedIPs specifies which IPv4 and IPv6 addresses this peer is allowed
// to communicate on.
//
// 0.0.0.0/0 indicates that all IPv4 addresses are allowed, and ::/0
// indicates that all IPv6 addresses are allowed.
AllowedIPs []string `protobuf:"bytes,7,rep,name=AllowedIPs,proto3" json:"AllowedIPs,omitempty"`
// ProtocolVersion specifies which version of the WireGuard protocol is used
// for this Peer.
//
// A value of 0 indicates that the most recent protocol version will be used.
ProtocolVersion int32 `protobuf:"varint,8,opt,name=ProtocolVersion,proto3" json:"ProtocolVersion,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Peer) Reset() { *m = Peer{} }
func (m *Peer) String() string { return proto.CompactTextString(m) }
func (*Peer) ProtoMessage() {}
func (*Peer) Descriptor() ([]byte, []int) {
return fileDescriptor_af5326e8f7a8c8f0, []int{4}
}
func (m *Peer) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Peer.Unmarshal(m, b)
}
func (m *Peer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Peer.Marshal(b, m, deterministic)
}
func (m *Peer) XXX_Merge(src proto.Message) {
xxx_messageInfo_Peer.Merge(m, src)
}
func (m *Peer) XXX_Size() int {
return xxx_messageInfo_Peer.Size(m)
}
func (m *Peer) XXX_DiscardUnknown() {
xxx_messageInfo_Peer.DiscardUnknown(m)
}
var xxx_messageInfo_Peer proto.InternalMessageInfo
func (m *Peer) GetPublicKey() string {
if m != nil {
return m.PublicKey
}
return ""
}
func (m *Peer) GetPresharedKey() string {
if m != nil {
return m.PresharedKey
}
return ""
}
func (m *Peer) GetEndpoint() *Endpoint {
if m != nil {
return m.Endpoint
}
return nil
}
func (m *Peer) GetLastHandshakeTime() *timestamp.Timestamp {
if m != nil {
return m.LastHandshakeTime
}
return nil
}
func (m *Peer) GetReceiveBytes() int64 {
if m != nil {
return m.ReceiveBytes
}
return 0
}
func (m *Peer) GetTransmitBytes() int64 {
if m != nil {
return m.TransmitBytes
}
return 0
}
func (m *Peer) GetAllowedIPs() []string {
if m != nil {
return m.AllowedIPs
}
return nil
}
func (m *Peer) GetProtocolVersion() int32 {
if m != nil {
return m.ProtocolVersion
}
return 0
}
type ConfigSuccess struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ConfigSuccess) Reset() { *m = ConfigSuccess{} }
func (m *ConfigSuccess) String() string { return proto.CompactTextString(m) }
func (*ConfigSuccess) ProtoMessage() {}
func (*ConfigSuccess) Descriptor() ([]byte, []int) {
return fileDescriptor_af5326e8f7a8c8f0, []int{5}
}
func (m *ConfigSuccess) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ConfigSuccess.Unmarshal(m, b)
}
func (m *ConfigSuccess) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ConfigSuccess.Marshal(b, m, deterministic)
}
func (m *ConfigSuccess) XXX_Merge(src proto.Message) {
xxx_messageInfo_ConfigSuccess.Merge(m, src)
}
func (m *ConfigSuccess) XXX_Size() int {
return xxx_messageInfo_ConfigSuccess.Size(m)
}
func (m *ConfigSuccess) XXX_DiscardUnknown() {
xxx_messageInfo_ConfigSuccess.DiscardUnknown(m)
}
var xxx_messageInfo_ConfigSuccess proto.InternalMessageInfo
type PeerListQuery struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *PeerListQuery) Reset() { *m = PeerListQuery{} }
func (m *PeerListQuery) String() string { return proto.CompactTextString(m) }
func (*PeerListQuery) ProtoMessage() {}
func (*PeerListQuery) Descriptor() ([]byte, []int) {
return fileDescriptor_af5326e8f7a8c8f0, []int{6}
}
func (m *PeerListQuery) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PeerListQuery.Unmarshal(m, b)
}
func (m *PeerListQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PeerListQuery.Marshal(b, m, deterministic)
}
func (m *PeerListQuery) XXX_Merge(src proto.Message) {
xxx_messageInfo_PeerListQuery.Merge(m, src)
}
func (m *PeerListQuery) XXX_Size() int {
return xxx_messageInfo_PeerListQuery.Size(m)
}
func (m *PeerListQuery) XXX_DiscardUnknown() {
xxx_messageInfo_PeerListQuery.DiscardUnknown(m)
}
var xxx_messageInfo_PeerListQuery proto.InternalMessageInfo
type PeerList struct {
Peers []*Peer `protobuf:"bytes,1,rep,name=Peers,proto3" json:"Peers,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *PeerList) Reset() { *m = PeerList{} }
func (m *PeerList) String() string { return proto.CompactTextString(m) }
func (*PeerList) ProtoMessage() {}
func (*PeerList) Descriptor() ([]byte, []int) {
return fileDescriptor_af5326e8f7a8c8f0, []int{7}
}
func (m *PeerList) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PeerList.Unmarshal(m, b)
}
func (m *PeerList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PeerList.Marshal(b, m, deterministic)
}
func (m *PeerList) XXX_Merge(src proto.Message) {
xxx_messageInfo_PeerList.Merge(m, src)
}
func (m *PeerList) XXX_Size() int {
return xxx_messageInfo_PeerList.Size(m)
}
func (m *PeerList) XXX_DiscardUnknown() {
xxx_messageInfo_PeerList.DiscardUnknown(m)
}
var xxx_messageInfo_PeerList proto.InternalMessageInfo
func (m *PeerList) GetPeers() []*Peer {
if m != nil {
return m.Peers
}
return nil
}
func init() {
proto.RegisterType((*PeerConfig)(nil), "wghost.PeerConfig")
proto.RegisterType((*PeerConfigList)(nil), "wghost.PeerConfigList")
proto.RegisterType((*PeerQuery)(nil), "wghost.PeerQuery")
proto.RegisterType((*Endpoint)(nil), "wghost.Endpoint")
proto.RegisterType((*Peer)(nil), "wghost.Peer")
proto.RegisterType((*ConfigSuccess)(nil), "wghost.ConfigSuccess")
proto.RegisterType((*PeerListQuery)(nil), "wghost.PeerListQuery")
proto.RegisterType((*PeerList)(nil), "wghost.PeerList")
}
func init() { proto.RegisterFile("wghost.proto", fileDescriptor_af5326e8f7a8c8f0) }
var fileDescriptor_af5326e8f7a8c8f0 = []byte{
// 485 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x92, 0xcf, 0x6b, 0xdb, 0x30,
0x14, 0xc7, 0x13, 0x3b, 0x3f, 0xec, 0xd7, 0xf4, 0x97, 0xa0, 0xc3, 0x98, 0xb1, 0x05, 0xb1, 0x83,
0x07, 0xc5, 0x85, 0x0c, 0x7a, 0xd9, 0xa9, 0x1d, 0x63, 0x0d, 0xeb, 0xc1, 0x73, 0xc3, 0x06, 0x3b,
0x0c, 0x1c, 0xfb, 0xd5, 0x11, 0x73, 0xac, 0x60, 0x29, 0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, 0x50, 0x9a, 0x65, 0x7c, 0xf6, 0x38, 0x50, 0x95,
0xf1, 0xef, 0xe0, 0x73, 0x18, 0x7e, 0x30, 0xc1, 0xe4, 0x74, 0x37, 0x56, 0x77, 0xe2, 0xb7, 0xca,
0xa5, 0x1d, 0x72, 0x09, 0xae, 0xfa, 0xce, 0xe4, 0x3a, 0xdb, 0x7d, 0xfc, 0xd3, 0xbd, 0x7f, 0xb2,
0x8f, 0x69, 0x67, 0x3e, 0xd0, 0x76, 0xbf, 0xf9, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x33, 0xed, 0xa3,
0x28, 0x09, 0x04, 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
// WgClient is the client API for Wg service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type WgClient interface {
AddPeer(ctx context.Context, in *PeerConfig, opts ...grpc.CallOption) (*ConfigSuccess, error)
SetPeers(ctx context.Context, in *PeerConfigList, opts ...grpc.CallOption) (*ConfigSuccess, error)
GetPeer(ctx context.Context, in *PeerQuery, opts ...grpc.CallOption) (*Peer, error)
ListPeers(ctx context.Context, in *PeerListQuery, opts ...grpc.CallOption) (*PeerList, error)
}
type wgClient struct {
cc *grpc.ClientConn
}
func NewWgClient(cc *grpc.ClientConn) WgClient {
return &wgClient{cc}
}
func (c *wgClient) AddPeer(ctx context.Context, in *PeerConfig, opts ...grpc.CallOption) (*ConfigSuccess, error) {
out := new(ConfigSuccess)
err := c.cc.Invoke(ctx, "/wghost.Wg/AddPeer", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *wgClient) SetPeers(ctx context.Context, in *PeerConfigList, opts ...grpc.CallOption) (*ConfigSuccess, error) {
out := new(ConfigSuccess)
err := c.cc.Invoke(ctx, "/wghost.Wg/SetPeers", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *wgClient) GetPeer(ctx context.Context, in *PeerQuery, opts ...grpc.CallOption) (*Peer, error) {
out := new(Peer)
err := c.cc.Invoke(ctx, "/wghost.Wg/GetPeer", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *wgClient) ListPeers(ctx context.Context, in *PeerListQuery, opts ...grpc.CallOption) (*PeerList, error) {
out := new(PeerList)
err := c.cc.Invoke(ctx, "/wghost.Wg/ListPeers", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// WgServer is the server API for Wg service.
type WgServer interface {
AddPeer(context.Context, *PeerConfig) (*ConfigSuccess, error)
SetPeers(context.Context, *PeerConfigList) (*ConfigSuccess, error)
GetPeer(context.Context, *PeerQuery) (*Peer, error)
ListPeers(context.Context, *PeerListQuery) (*PeerList, error)
}
// UnimplementedWgServer can be embedded to have forward compatible implementations.
type UnimplementedWgServer struct {
}
func (*UnimplementedWgServer) AddPeer(ctx context.Context, req *PeerConfig) (*ConfigSuccess, error) {
return nil, status.Errorf(codes.Unimplemented, "method AddPeer not implemented")
}
func (*UnimplementedWgServer) SetPeers(ctx context.Context, req *PeerConfigList) (*ConfigSuccess, error) {
return nil, status.Errorf(codes.Unimplemented, "method SetPeers not implemented")
}
func (*UnimplementedWgServer) GetPeer(ctx context.Context, req *PeerQuery) (*Peer, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPeer not implemented")
}
func (*UnimplementedWgServer) ListPeers(ctx context.Context, req *PeerListQuery) (*PeerList, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListPeers not implemented")
}
func RegisterWgServer(s *grpc.Server, srv WgServer) {
s.RegisterService(&_Wg_serviceDesc, srv)
}
func _Wg_AddPeer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PeerConfig)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WgServer).AddPeer(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/wghost.Wg/AddPeer",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WgServer).AddPeer(ctx, req.(*PeerConfig))
}
return interceptor(ctx, in, info, handler)
}
func _Wg_SetPeers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PeerConfigList)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WgServer).SetPeers(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/wghost.Wg/SetPeers",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WgServer).SetPeers(ctx, req.(*PeerConfigList))
}
return interceptor(ctx, in, info, handler)
}
func _Wg_GetPeer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PeerQuery)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WgServer).GetPeer(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/wghost.Wg/GetPeer",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WgServer).GetPeer(ctx, req.(*PeerQuery))
}
return interceptor(ctx, in, info, handler)
}
func _Wg_ListPeers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PeerListQuery)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WgServer).ListPeers(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/wghost.Wg/ListPeers",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WgServer).ListPeers(ctx, req.(*PeerListQuery))
}
return interceptor(ctx, in, info, handler)
}
var _Wg_serviceDesc = grpc.ServiceDesc{
ServiceName: "wghost.Wg",
HandlerType: (*WgServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "AddPeer",
Handler: _Wg_AddPeer_Handler,
},
{
MethodName: "SetPeers",
Handler: _Wg_SetPeers_Handler,
},
{
MethodName: "GetPeer",
Handler: _Wg_GetPeer_Handler,
},
{
MethodName: "ListPeers",
Handler: _Wg_ListPeers_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "wghost.proto",
}