guard/api/v1/guard.pb.go

3127 lines
77 KiB
Go
Raw Normal View History

2019-07-10 20:59:43 +00:00
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: github.com/crosbymichael/guard/api/v1/guard.proto
package v1
import (
context "context"
fmt "fmt"
proto "github.com/gogo/protobuf/proto"
types "github.com/gogo/protobuf/types"
grpc "google.golang.org/grpc"
io "io"
math "math"
reflect "reflect"
strings "strings"
)
// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package
type CreateRequest struct {
2019-07-11 11:46:36 +00:00
// id of the tunnel
2019-07-10 20:59:43 +00:00
ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
2019-07-11 11:46:36 +00:00
Endpoint string `protobuf:"bytes,2,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
2019-07-10 20:59:43 +00:00
Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CreateRequest) Reset() { *m = CreateRequest{} }
func (*CreateRequest) ProtoMessage() {}
func (*CreateRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_ebe0601dd3932458, []int{0}
}
func (m *CreateRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *CreateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_CreateRequest.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *CreateRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_CreateRequest.Merge(m, src)
}
func (m *CreateRequest) XXX_Size() int {
return m.Size()
}
func (m *CreateRequest) XXX_DiscardUnknown() {
xxx_messageInfo_CreateRequest.DiscardUnknown(m)
}
var xxx_messageInfo_CreateRequest proto.InternalMessageInfo
2019-07-10 21:35:46 +00:00
type TunnelResponse struct {
2019-07-10 20:59:43 +00:00
Tunnel *Tunnel `protobuf:"bytes,1,opt,name=tunnel,proto3" json:"tunnel,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
2019-07-10 21:35:46 +00:00
func (m *TunnelResponse) Reset() { *m = TunnelResponse{} }
func (*TunnelResponse) ProtoMessage() {}
func (*TunnelResponse) Descriptor() ([]byte, []int) {
2019-07-10 20:59:43 +00:00
return fileDescriptor_ebe0601dd3932458, []int{1}
}
2019-07-10 21:35:46 +00:00
func (m *TunnelResponse) XXX_Unmarshal(b []byte) error {
2019-07-10 20:59:43 +00:00
return m.Unmarshal(b)
}
2019-07-10 21:35:46 +00:00
func (m *TunnelResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
2019-07-10 20:59:43 +00:00
if deterministic {
2019-07-10 21:35:46 +00:00
return xxx_messageInfo_TunnelResponse.Marshal(b, m, deterministic)
2019-07-10 20:59:43 +00:00
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
2019-07-10 21:35:46 +00:00
func (m *TunnelResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_TunnelResponse.Merge(m, src)
2019-07-10 20:59:43 +00:00
}
2019-07-10 21:35:46 +00:00
func (m *TunnelResponse) XXX_Size() int {
2019-07-10 20:59:43 +00:00
return m.Size()
}
2019-07-10 21:35:46 +00:00
func (m *TunnelResponse) XXX_DiscardUnknown() {
xxx_messageInfo_TunnelResponse.DiscardUnknown(m)
2019-07-10 20:59:43 +00:00
}
2019-07-10 21:35:46 +00:00
var xxx_messageInfo_TunnelResponse proto.InternalMessageInfo
2019-07-11 11:46:36 +00:00
type PeerResponse struct {
Tunnel *Tunnel `protobuf:"bytes,1,opt,name=tunnel,proto3" json:"tunnel,omitempty"`
Peer *Peer `protobuf:"bytes,2,opt,name=peer,proto3" json:"peer,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *PeerResponse) Reset() { *m = PeerResponse{} }
func (*PeerResponse) ProtoMessage() {}
func (*PeerResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_ebe0601dd3932458, []int{2}
}
func (m *PeerResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *PeerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_PeerResponse.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *PeerResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_PeerResponse.Merge(m, src)
}
func (m *PeerResponse) XXX_Size() int {
return m.Size()
}
func (m *PeerResponse) XXX_DiscardUnknown() {
xxx_messageInfo_PeerResponse.DiscardUnknown(m)
}
var xxx_messageInfo_PeerResponse proto.InternalMessageInfo
type NewPeerRequest struct {
// id of the tunnel
ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
PeerID string `protobuf:"bytes,2,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"`
Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *NewPeerRequest) Reset() { *m = NewPeerRequest{} }
func (*NewPeerRequest) ProtoMessage() {}
func (*NewPeerRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_ebe0601dd3932458, []int{3}
}
func (m *NewPeerRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *NewPeerRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_NewPeerRequest.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *NewPeerRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_NewPeerRequest.Merge(m, src)
}
func (m *NewPeerRequest) XXX_Size() int {
return m.Size()
}
func (m *NewPeerRequest) XXX_DiscardUnknown() {
xxx_messageInfo_NewPeerRequest.DiscardUnknown(m)
}
var xxx_messageInfo_NewPeerRequest proto.InternalMessageInfo
2019-07-10 21:35:46 +00:00
type DeletePeerRequest struct {
2019-07-11 11:46:36 +00:00
// id of the tunnel
2019-07-10 21:35:46 +00:00
ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
PeerID string `protobuf:"bytes,2,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DeletePeerRequest) Reset() { *m = DeletePeerRequest{} }
func (*DeletePeerRequest) ProtoMessage() {}
func (*DeletePeerRequest) Descriptor() ([]byte, []int) {
2019-07-11 12:35:24 +00:00
return fileDescriptor_ebe0601dd3932458, []int{4}
2019-07-10 21:35:46 +00:00
}
func (m *DeletePeerRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *DeletePeerRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_DeletePeerRequest.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *DeletePeerRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_DeletePeerRequest.Merge(m, src)
}
func (m *DeletePeerRequest) XXX_Size() int {
return m.Size()
}
func (m *DeletePeerRequest) XXX_DiscardUnknown() {
xxx_messageInfo_DeletePeerRequest.DiscardUnknown(m)
}
var xxx_messageInfo_DeletePeerRequest proto.InternalMessageInfo
2019-07-10 20:59:43 +00:00
type DeleteRequest struct {
2019-07-11 11:46:36 +00:00
// id of the tunnel
2019-07-10 20:59:43 +00:00
ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DeleteRequest) Reset() { *m = DeleteRequest{} }
func (*DeleteRequest) ProtoMessage() {}
func (*DeleteRequest) Descriptor() ([]byte, []int) {
2019-07-11 12:35:24 +00:00
return fileDescriptor_ebe0601dd3932458, []int{5}
2019-07-10 20:59:43 +00:00
}
func (m *DeleteRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *DeleteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_DeleteRequest.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *DeleteRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_DeleteRequest.Merge(m, src)
}
func (m *DeleteRequest) XXX_Size() int {
return m.Size()
}
func (m *DeleteRequest) XXX_DiscardUnknown() {
xxx_messageInfo_DeleteRequest.DiscardUnknown(m)
}
var xxx_messageInfo_DeleteRequest proto.InternalMessageInfo
type ListResponse struct {
Tunnels []*Tunnel `protobuf:"bytes,1,rep,name=tunnels,proto3" json:"tunnels,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ListResponse) Reset() { *m = ListResponse{} }
func (*ListResponse) ProtoMessage() {}
func (*ListResponse) Descriptor() ([]byte, []int) {
2019-07-11 12:35:24 +00:00
return fileDescriptor_ebe0601dd3932458, []int{6}
2019-07-10 20:59:43 +00:00
}
func (m *ListResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ListResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ListResponse.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *ListResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListResponse.Merge(m, src)
}
func (m *ListResponse) XXX_Size() int {
return m.Size()
}
func (m *ListResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ListResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ListResponse proto.InternalMessageInfo
type Tunnel struct {
ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
PrivateKey string `protobuf:"bytes,2,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"`
2019-07-11 11:46:36 +00:00
ListenPort string `protobuf:"bytes,3,opt,name=listen_port,json=listenPort,proto3" json:"listen_port,omitempty"`
2019-07-10 20:59:43 +00:00
Address string `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"`
DNS string `protobuf:"bytes,5,opt,name=dns,proto3" json:"dns,omitempty"`
Peers []*Peer `protobuf:"bytes,6,rep,name=peers,proto3" json:"peers,omitempty"`
Masquerade *Masquerade `protobuf:"bytes,7,opt,name=masquerade,proto3" json:"masquerade,omitempty"`
2019-07-11 11:46:36 +00:00
PublicKey string `protobuf:"bytes,8,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
Endpoint string `protobuf:"bytes,9,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
2019-07-10 20:59:43 +00:00
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Tunnel) Reset() { *m = Tunnel{} }
func (*Tunnel) ProtoMessage() {}
func (*Tunnel) Descriptor() ([]byte, []int) {
2019-07-11 12:35:24 +00:00
return fileDescriptor_ebe0601dd3932458, []int{7}
2019-07-10 20:59:43 +00:00
}
func (m *Tunnel) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Tunnel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Tunnel.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *Tunnel) XXX_Merge(src proto.Message) {
xxx_messageInfo_Tunnel.Merge(m, src)
}
func (m *Tunnel) XXX_Size() int {
return m.Size()
}
func (m *Tunnel) XXX_DiscardUnknown() {
xxx_messageInfo_Tunnel.DiscardUnknown(m)
}
var xxx_messageInfo_Tunnel proto.InternalMessageInfo
type Peer struct {
2019-07-10 21:35:46 +00:00
ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
PublicKey string `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
AllowedIPs []string `protobuf:"bytes,3,rep,name=allowed_ips,json=allowedIps,proto3" json:"allowed_ips,omitempty"`
Endpoint string `protobuf:"bytes,4,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
PersistentKeepalive uint32 `protobuf:"varint,5,opt,name=persistent_keepalive,json=persistentKeepalive,proto3" json:"persistent_keepalive,omitempty"`
2019-07-11 11:46:36 +00:00
PrivateKey string `protobuf:"bytes,6,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"`
2019-07-10 20:59:43 +00:00
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Peer) Reset() { *m = Peer{} }
func (*Peer) ProtoMessage() {}
func (*Peer) Descriptor() ([]byte, []int) {
2019-07-11 12:35:24 +00:00
return fileDescriptor_ebe0601dd3932458, []int{8}
2019-07-10 20:59:43 +00:00
}
func (m *Peer) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Peer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Peer.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *Peer) XXX_Merge(src proto.Message) {
xxx_messageInfo_Peer.Merge(m, src)
}
func (m *Peer) XXX_Size() int {
return m.Size()
}
func (m *Peer) XXX_DiscardUnknown() {
xxx_messageInfo_Peer.DiscardUnknown(m)
}
var xxx_messageInfo_Peer proto.InternalMessageInfo
type Masquerade struct {
Interface string `protobuf:"bytes,1,opt,name=interface,proto3" json:"interface,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Masquerade) Reset() { *m = Masquerade{} }
func (*Masquerade) ProtoMessage() {}
func (*Masquerade) Descriptor() ([]byte, []int) {
2019-07-11 12:35:24 +00:00
return fileDescriptor_ebe0601dd3932458, []int{9}
2019-07-10 20:59:43 +00:00
}
func (m *Masquerade) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Masquerade) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Masquerade.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *Masquerade) XXX_Merge(src proto.Message) {
xxx_messageInfo_Masquerade.Merge(m, src)
}
func (m *Masquerade) XXX_Size() int {
return m.Size()
}
func (m *Masquerade) XXX_DiscardUnknown() {
xxx_messageInfo_Masquerade.DiscardUnknown(m)
}
var xxx_messageInfo_Masquerade proto.InternalMessageInfo
func init() {
proto.RegisterType((*CreateRequest)(nil), "com.crosbymichael.guard.v1.CreateRequest")
2019-07-10 21:35:46 +00:00
proto.RegisterType((*TunnelResponse)(nil), "com.crosbymichael.guard.v1.TunnelResponse")
2019-07-11 11:46:36 +00:00
proto.RegisterType((*PeerResponse)(nil), "com.crosbymichael.guard.v1.PeerResponse")
proto.RegisterType((*NewPeerRequest)(nil), "com.crosbymichael.guard.v1.NewPeerRequest")
2019-07-10 21:35:46 +00:00
proto.RegisterType((*DeletePeerRequest)(nil), "com.crosbymichael.guard.v1.DeletePeerRequest")
2019-07-10 20:59:43 +00:00
proto.RegisterType((*DeleteRequest)(nil), "com.crosbymichael.guard.v1.DeleteRequest")
proto.RegisterType((*ListResponse)(nil), "com.crosbymichael.guard.v1.ListResponse")
proto.RegisterType((*Tunnel)(nil), "com.crosbymichael.guard.v1.Tunnel")
proto.RegisterType((*Peer)(nil), "com.crosbymichael.guard.v1.Peer")
proto.RegisterType((*Masquerade)(nil), "com.crosbymichael.guard.v1.Masquerade")
}
func init() {
proto.RegisterFile("github.com/crosbymichael/guard/api/v1/guard.proto", fileDescriptor_ebe0601dd3932458)
}
var fileDescriptor_ebe0601dd3932458 = []byte{
2019-07-11 12:35:24 +00:00
// 713 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0x41, 0x6b, 0xdb, 0x4a,
0x10, 0x8e, 0x6c, 0x47, 0x8e, 0xc7, 0x49, 0xe0, 0xed, 0x0b, 0x41, 0xcf, 0xaf, 0xb5, 0x83, 0x0a,
0xad, 0x1b, 0xa8, 0x84, 0xd3, 0xd2, 0x43, 0xdb, 0x4b, 0x5d, 0xb7, 0xd4, 0x24, 0x0d, 0x46, 0x2d,
0xb4, 0x14, 0x8a, 0x91, 0xad, 0x89, 0xb2, 0x44, 0x96, 0x14, 0xed, 0xda, 0xc1, 0xb7, 0xfc, 0xbc,
0x5c, 0x0a, 0xa5, 0xa7, 0x9e, 0x4c, 0xa3, 0x5f, 0x52, 0xb4, 0x6b, 0xc7, 0x91, 0xc1, 0x4a, 0x0a,
0xb9, 0x69, 0x67, 0xe6, 0xdb, 0x99, 0xf9, 0x76, 0xe6, 0x13, 0x34, 0x5c, 0xca, 0x8f, 0x87, 0x3d,
0xa3, 0x1f, 0x0c, 0xcc, 0x7e, 0x14, 0xb0, 0xde, 0x78, 0x40, 0xfb, 0xc7, 0x36, 0x7a, 0xa6, 0x3b,
0xb4, 0x23, 0xc7, 0xb4, 0x43, 0x6a, 0x8e, 0x1a, 0xf2, 0x60, 0x84, 0x51, 0xc0, 0x03, 0x52, 0xe9,
0x07, 0x03, 0x23, 0x15, 0x6b, 0x48, 0xf7, 0xa8, 0x51, 0xd9, 0x72, 0x03, 0x37, 0x10, 0x61, 0x66,
0xf2, 0x25, 0x11, 0x95, 0xff, 0xdd, 0x20, 0x70, 0x3d, 0x34, 0xc5, 0xa9, 0x37, 0x3c, 0x32, 0x71,
0x10, 0xf2, 0xb1, 0x74, 0xea, 0xdf, 0x60, 0xe3, 0x4d, 0x84, 0x36, 0x47, 0x0b, 0x4f, 0x87, 0xc8,
0x38, 0xd9, 0x86, 0x1c, 0x75, 0x34, 0x65, 0x47, 0xa9, 0x97, 0x9a, 0x6a, 0x3c, 0xa9, 0xe5, 0xda,
0x2d, 0x2b, 0x47, 0x1d, 0x52, 0x81, 0x35, 0xf4, 0x9d, 0x30, 0xa0, 0x3e, 0xd7, 0x72, 0x89, 0xd7,
0xba, 0x3a, 0x13, 0x0d, 0x8a, 0xb6, 0xe3, 0x44, 0xc8, 0x98, 0x96, 0x17, 0xae, 0xd9, 0x51, 0x3f,
0x80, 0xcd, 0x4f, 0x43, 0xdf, 0x47, 0xcf, 0x42, 0x16, 0x06, 0x3e, 0x43, 0xf2, 0x02, 0x54, 0x2e,
0x2c, 0x22, 0x47, 0x79, 0x4f, 0x37, 0x96, 0x37, 0x64, 0x4c, 0xb1, 0x53, 0x84, 0x7e, 0xae, 0xc0,
0x7a, 0x07, 0x31, 0xba, 0x8b, 0xcb, 0xc8, 0x33, 0x28, 0x84, 0x88, 0x91, 0x68, 0xa6, 0xbc, 0xb7,
0x93, 0x85, 0x14, 0x39, 0x45, 0xb4, 0xee, 0xc2, 0xe6, 0x21, 0x9e, 0xc9, 0x22, 0xb2, 0x09, 0x7b,
0x00, 0xc5, 0x04, 0xd1, 0xa5, 0x8e, 0xe4, 0xab, 0x09, 0xf1, 0xa4, 0xa6, 0x26, 0xc8, 0x76, 0xcb,
0x52, 0x13, 0x57, 0xdb, 0xc9, 0x60, 0xae, 0x03, 0xff, 0xb4, 0xd0, 0x43, 0x8e, 0x77, 0x95, 0x4b,
0x7f, 0x04, 0x1b, 0xf2, 0xc6, 0x1b, 0x6e, 0xd3, 0x0f, 0x60, 0xfd, 0x80, 0x32, 0x7e, 0xc5, 0xf2,
0x2b, 0x28, 0x4a, 0xce, 0x98, 0xa6, 0xec, 0xe4, 0x6f, 0x49, 0xf3, 0x0c, 0xa2, 0xff, 0xcc, 0x81,
0x2a, 0x6d, 0x4b, 0xcb, 0xaf, 0x41, 0x39, 0x8c, 0xe8, 0xc8, 0xe6, 0xd8, 0x3d, 0xc1, 0xf1, 0x74,
0xbc, 0x60, 0x6a, 0xda, 0xc7, 0x71, 0x12, 0xe0, 0x51, 0xc6, 0xd1, 0xef, 0x86, 0x41, 0xc4, 0xa7,
0x54, 0x81, 0x34, 0x75, 0x82, 0x28, 0x35, 0x81, 0x85, 0x14, 0x8f, 0xe4, 0x3f, 0xc8, 0x3b, 0x3e,
0xd3, 0x56, 0x45, 0xd2, 0x62, 0x3c, 0xa9, 0xe5, 0x5b, 0x87, 0x1f, 0xad, 0xc4, 0x46, 0x9e, 0xc3,
0x6a, 0x42, 0x0d, 0xd3, 0x54, 0xd1, 0xd5, 0xcd, 0x23, 0x20, 0xc3, 0xc9, 0x3b, 0x80, 0x81, 0xcd,
0x4e, 0x87, 0x18, 0xd9, 0x0e, 0x6a, 0x45, 0x31, 0x3f, 0x0f, 0xb3, 0xc0, 0x1f, 0xae, 0xa2, 0xad,
0x6b, 0x48, 0x72, 0x1f, 0x20, 0x1c, 0xf6, 0x3c, 0xda, 0x17, 0x5d, 0xaf, 0x89, 0xba, 0x4b, 0xd2,
0x92, 0x34, 0x7d, 0x7d, 0xe3, 0x4a, 0xe9, 0x8d, 0xd3, 0x27, 0x0a, 0x14, 0x92, 0x92, 0x96, 0x52,
0x9a, 0xbe, 0x3b, 0xb7, 0x78, 0xb7, 0x09, 0x65, 0xdb, 0xf3, 0x82, 0x33, 0x74, 0xba, 0x34, 0x4c,
0x66, 0x2f, 0x5f, 0x2f, 0x35, 0x37, 0xe3, 0x49, 0x0d, 0x5e, 0x4b, 0x73, 0xbb, 0xc3, 0x2c, 0x98,
0x86, 0xb4, 0x43, 0x96, 0x2a, 0xa6, 0xb0, 0xb0, 0xfe, 0x0d, 0xd8, 0x0a, 0x31, 0x62, 0xe2, 0x35,
0x78, 0xf7, 0x04, 0x31, 0xb4, 0x3d, 0x3a, 0x42, 0xc1, 0xf9, 0x86, 0xf5, 0xef, 0xdc, 0xb7, 0x3f,
0x73, 0x2d, 0xbe, 0xb8, 0xba, 0xf8, 0xe2, 0xfa, 0x2e, 0xc0, 0x9c, 0x35, 0x72, 0x0f, 0x4a, 0xd4,
0xe7, 0x18, 0x1d, 0xd9, 0x7d, 0x94, 0xcd, 0x5a, 0x73, 0xc3, 0xde, 0xf7, 0x3c, 0x94, 0x3e, 0xd3,
0x08, 0x05, 0xdf, 0xa4, 0x0b, 0xaa, 0x54, 0x34, 0xf2, 0x38, 0xeb, 0x4d, 0x52, 0xaa, 0x57, 0xd9,
0xbd, 0xc5, 0x44, 0xcf, 0xd6, 0x61, 0x1f, 0x54, 0xb9, 0x47, 0xd9, 0x09, 0x52, 0xbb, 0x56, 0xd9,
0x36, 0xa4, 0x0a, 0x1b, 0x33, 0x15, 0x36, 0xde, 0x26, 0x2a, 0x4c, 0xde, 0x43, 0x21, 0xd9, 0x35,
0xb2, 0xc4, 0x5f, 0xa9, 0x67, 0xa5, 0x48, 0x6d, 0x69, 0x17, 0x8a, 0x53, 0x65, 0x22, 0x99, 0xdd,
0xa4, 0xe5, 0x2b, 0x3b, 0x41, 0x4a, 0x6c, 0x5d, 0x80, 0xb9, 0x22, 0x91, 0x27, 0x37, 0xf7, 0x7e,
0x3d, 0xcd, 0x5f, 0x10, 0xdc, 0x6c, 0x5e, 0x5c, 0x56, 0x57, 0x7e, 0x5d, 0x56, 0x57, 0xce, 0xe3,
0xaa, 0x72, 0x11, 0x57, 0x95, 0x1f, 0x71, 0x55, 0xf9, 0x1d, 0x57, 0x95, 0xaf, 0xf5, 0x5b, 0xfd,
0x2f, 0x5f, 0x8e, 0x1a, 0x5f, 0x56, 0x7a, 0xaa, 0x60, 0xf2, 0xe9, 0x9f, 0x00, 0x00, 0x00, 0xff,
0xff, 0xd0, 0x15, 0x47, 0x35, 0x64, 0x07, 0x00, 0x00,
2019-07-10 20:59:43 +00:00
}
// 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
// WireguardClient is the client API for Wireguard service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type WireguardClient interface {
2019-07-11 11:46:36 +00:00
// Create a new tunnel
2019-07-10 21:35:46 +00:00
Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*TunnelResponse, error)
2019-07-11 11:46:36 +00:00
// Delete a tunnel
2019-07-10 20:59:43 +00:00
Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*types.Empty, error)
2019-07-11 11:46:36 +00:00
// List all tunnels
2019-07-10 20:59:43 +00:00
List(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*ListResponse, error)
2019-07-11 11:46:36 +00:00
// NewPeer to the tunnel with gernerated keys
NewPeer(ctx context.Context, in *NewPeerRequest, opts ...grpc.CallOption) (*PeerResponse, error)
// DeletePeer from a tunnel
2019-07-10 21:35:46 +00:00
DeletePeer(ctx context.Context, in *DeletePeerRequest, opts ...grpc.CallOption) (*TunnelResponse, error)
2019-07-10 20:59:43 +00:00
}
type wireguardClient struct {
cc *grpc.ClientConn
}
func NewWireguardClient(cc *grpc.ClientConn) WireguardClient {
return &wireguardClient{cc}
}
2019-07-10 21:35:46 +00:00
func (c *wireguardClient) Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*TunnelResponse, error) {
out := new(TunnelResponse)
2019-07-10 20:59:43 +00:00
err := c.cc.Invoke(ctx, "/com.crosbymichael.guard.v1.Wireguard/Create", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *wireguardClient) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*types.Empty, error) {
out := new(types.Empty)
err := c.cc.Invoke(ctx, "/com.crosbymichael.guard.v1.Wireguard/Delete", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *wireguardClient) List(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*ListResponse, error) {
out := new(ListResponse)
err := c.cc.Invoke(ctx, "/com.crosbymichael.guard.v1.Wireguard/List", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
2019-07-11 11:46:36 +00:00
func (c *wireguardClient) NewPeer(ctx context.Context, in *NewPeerRequest, opts ...grpc.CallOption) (*PeerResponse, error) {
out := new(PeerResponse)
err := c.cc.Invoke(ctx, "/com.crosbymichael.guard.v1.Wireguard/NewPeer", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
2019-07-10 21:35:46 +00:00
func (c *wireguardClient) DeletePeer(ctx context.Context, in *DeletePeerRequest, opts ...grpc.CallOption) (*TunnelResponse, error) {
out := new(TunnelResponse)
err := c.cc.Invoke(ctx, "/com.crosbymichael.guard.v1.Wireguard/DeletePeer", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
2019-07-10 20:59:43 +00:00
// WireguardServer is the server API for Wireguard service.
type WireguardServer interface {
2019-07-11 11:46:36 +00:00
// Create a new tunnel
2019-07-10 21:35:46 +00:00
Create(context.Context, *CreateRequest) (*TunnelResponse, error)
2019-07-11 11:46:36 +00:00
// Delete a tunnel
2019-07-10 20:59:43 +00:00
Delete(context.Context, *DeleteRequest) (*types.Empty, error)
2019-07-11 11:46:36 +00:00
// List all tunnels
2019-07-10 20:59:43 +00:00
List(context.Context, *types.Empty) (*ListResponse, error)
2019-07-11 11:46:36 +00:00
// NewPeer to the tunnel with gernerated keys
NewPeer(context.Context, *NewPeerRequest) (*PeerResponse, error)
// DeletePeer from a tunnel
2019-07-10 21:35:46 +00:00
DeletePeer(context.Context, *DeletePeerRequest) (*TunnelResponse, error)
2019-07-10 20:59:43 +00:00
}
func RegisterWireguardServer(s *grpc.Server, srv WireguardServer) {
s.RegisterService(&_Wireguard_serviceDesc, srv)
}
func _Wireguard_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WireguardServer).Create(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/com.crosbymichael.guard.v1.Wireguard/Create",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WireguardServer).Create(ctx, req.(*CreateRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Wireguard_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WireguardServer).Delete(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/com.crosbymichael.guard.v1.Wireguard/Delete",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WireguardServer).Delete(ctx, req.(*DeleteRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Wireguard_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(types.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WireguardServer).List(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/com.crosbymichael.guard.v1.Wireguard/List",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WireguardServer).List(ctx, req.(*types.Empty))
}
return interceptor(ctx, in, info, handler)
}
2019-07-11 11:46:36 +00:00
func _Wireguard_NewPeer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(NewPeerRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WireguardServer).NewPeer(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/com.crosbymichael.guard.v1.Wireguard/NewPeer",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WireguardServer).NewPeer(ctx, req.(*NewPeerRequest))
}
return interceptor(ctx, in, info, handler)
}
2019-07-10 21:35:46 +00:00
func _Wireguard_DeletePeer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeletePeerRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WireguardServer).DeletePeer(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/com.crosbymichael.guard.v1.Wireguard/DeletePeer",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WireguardServer).DeletePeer(ctx, req.(*DeletePeerRequest))
}
return interceptor(ctx, in, info, handler)
}
2019-07-10 20:59:43 +00:00
var _Wireguard_serviceDesc = grpc.ServiceDesc{
ServiceName: "com.crosbymichael.guard.v1.Wireguard",
HandlerType: (*WireguardServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Create",
Handler: _Wireguard_Create_Handler,
},
{
MethodName: "Delete",
Handler: _Wireguard_Delete_Handler,
},
{
MethodName: "List",
Handler: _Wireguard_List_Handler,
},
2019-07-11 11:46:36 +00:00
{
MethodName: "NewPeer",
Handler: _Wireguard_NewPeer_Handler,
},
2019-07-10 21:35:46 +00:00
{
MethodName: "DeletePeer",
Handler: _Wireguard_DeletePeer_Handler,
},
2019-07-10 20:59:43 +00:00
},
Streams: []grpc.StreamDesc{},
Metadata: "github.com/crosbymichael/guard/api/v1/guard.proto",
}
func (m *CreateRequest) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *CreateRequest) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.ID) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintGuard(dAtA, i, uint64(len(m.ID)))
i += copy(dAtA[i:], m.ID)
}
2019-07-11 11:46:36 +00:00
if len(m.Endpoint) > 0 {
dAtA[i] = 0x12
2019-07-10 20:59:43 +00:00
i++
2019-07-11 11:46:36 +00:00
i = encodeVarintGuard(dAtA, i, uint64(len(m.Endpoint)))
i += copy(dAtA[i:], m.Endpoint)
2019-07-10 20:59:43 +00:00
}
if len(m.Address) > 0 {
dAtA[i] = 0x1a
i++
i = encodeVarintGuard(dAtA, i, uint64(len(m.Address)))
i += copy(dAtA[i:], m.Address)
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
2019-07-10 21:35:46 +00:00
func (m *TunnelResponse) Marshal() (dAtA []byte, err error) {
2019-07-10 20:59:43 +00:00
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
2019-07-10 21:35:46 +00:00
func (m *TunnelResponse) MarshalTo(dAtA []byte) (int, error) {
2019-07-10 20:59:43 +00:00
var i int
_ = i
var l int
_ = l
if m.Tunnel != nil {
dAtA[i] = 0xa
i++
i = encodeVarintGuard(dAtA, i, uint64(m.Tunnel.Size()))
n1, err := m.Tunnel.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n1
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
2019-07-11 11:46:36 +00:00
func (m *PeerResponse) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *PeerResponse) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Tunnel != nil {
dAtA[i] = 0xa
i++
i = encodeVarintGuard(dAtA, i, uint64(m.Tunnel.Size()))
n2, err := m.Tunnel.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n2
}
if m.Peer != nil {
dAtA[i] = 0x12
i++
i = encodeVarintGuard(dAtA, i, uint64(m.Peer.Size()))
n3, err := m.Peer.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n3
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *NewPeerRequest) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *NewPeerRequest) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.ID) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintGuard(dAtA, i, uint64(len(m.ID)))
i += copy(dAtA[i:], m.ID)
}
if len(m.PeerID) > 0 {
dAtA[i] = 0x12
i++
i = encodeVarintGuard(dAtA, i, uint64(len(m.PeerID)))
i += copy(dAtA[i:], m.PeerID)
}
if len(m.Address) > 0 {
dAtA[i] = 0x1a
i++
i = encodeVarintGuard(dAtA, i, uint64(len(m.Address)))
i += copy(dAtA[i:], m.Address)
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
2019-07-10 21:35:46 +00:00
func (m *DeletePeerRequest) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *DeletePeerRequest) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.ID) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintGuard(dAtA, i, uint64(len(m.ID)))
i += copy(dAtA[i:], m.ID)
}
if len(m.PeerID) > 0 {
dAtA[i] = 0x12
i++
i = encodeVarintGuard(dAtA, i, uint64(len(m.PeerID)))
i += copy(dAtA[i:], m.PeerID)
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
2019-07-10 20:59:43 +00:00
func (m *DeleteRequest) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *DeleteRequest) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.ID) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintGuard(dAtA, i, uint64(len(m.ID)))
i += copy(dAtA[i:], m.ID)
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *ListResponse) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *ListResponse) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Tunnels) > 0 {
for _, msg := range m.Tunnels {
dAtA[i] = 0xa
i++
i = encodeVarintGuard(dAtA, i, uint64(msg.Size()))
n, err := msg.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n
}
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *Tunnel) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Tunnel) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.ID) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintGuard(dAtA, i, uint64(len(m.ID)))
i += copy(dAtA[i:], m.ID)
}
if len(m.PrivateKey) > 0 {
dAtA[i] = 0x12
i++
i = encodeVarintGuard(dAtA, i, uint64(len(m.PrivateKey)))
i += copy(dAtA[i:], m.PrivateKey)
}
2019-07-11 11:46:36 +00:00
if len(m.ListenPort) > 0 {
dAtA[i] = 0x1a
2019-07-10 20:59:43 +00:00
i++
2019-07-11 11:46:36 +00:00
i = encodeVarintGuard(dAtA, i, uint64(len(m.ListenPort)))
i += copy(dAtA[i:], m.ListenPort)
2019-07-10 20:59:43 +00:00
}
if len(m.Address) > 0 {
dAtA[i] = 0x22
i++
i = encodeVarintGuard(dAtA, i, uint64(len(m.Address)))
i += copy(dAtA[i:], m.Address)
}
if len(m.DNS) > 0 {
dAtA[i] = 0x2a
i++
i = encodeVarintGuard(dAtA, i, uint64(len(m.DNS)))
i += copy(dAtA[i:], m.DNS)
}
if len(m.Peers) > 0 {
for _, msg := range m.Peers {
dAtA[i] = 0x32
i++
i = encodeVarintGuard(dAtA, i, uint64(msg.Size()))
n, err := msg.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n
}
}
if m.Masquerade != nil {
dAtA[i] = 0x3a
i++
i = encodeVarintGuard(dAtA, i, uint64(m.Masquerade.Size()))
2019-07-11 12:35:24 +00:00
n4, err := m.Masquerade.MarshalTo(dAtA[i:])
2019-07-10 20:59:43 +00:00
if err != nil {
return 0, err
}
2019-07-11 12:35:24 +00:00
i += n4
2019-07-11 11:46:36 +00:00
}
if len(m.PublicKey) > 0 {
dAtA[i] = 0x42
i++
i = encodeVarintGuard(dAtA, i, uint64(len(m.PublicKey)))
i += copy(dAtA[i:], m.PublicKey)
}
if len(m.Endpoint) > 0 {
dAtA[i] = 0x4a
i++
i = encodeVarintGuard(dAtA, i, uint64(len(m.Endpoint)))
i += copy(dAtA[i:], m.Endpoint)
2019-07-10 20:59:43 +00:00
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *Peer) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Peer) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
2019-07-10 21:35:46 +00:00
if len(m.ID) > 0 {
2019-07-10 20:59:43 +00:00
dAtA[i] = 0xa
i++
2019-07-10 21:35:46 +00:00
i = encodeVarintGuard(dAtA, i, uint64(len(m.ID)))
i += copy(dAtA[i:], m.ID)
}
if len(m.PublicKey) > 0 {
dAtA[i] = 0x12
i++
2019-07-10 20:59:43 +00:00
i = encodeVarintGuard(dAtA, i, uint64(len(m.PublicKey)))
i += copy(dAtA[i:], m.PublicKey)
}
if len(m.AllowedIPs) > 0 {
for _, s := range m.AllowedIPs {
2019-07-10 21:35:46 +00:00
dAtA[i] = 0x1a
2019-07-10 20:59:43 +00:00
i++
l = len(s)
for l >= 1<<7 {
dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
l >>= 7
i++
}
dAtA[i] = uint8(l)
i++
i += copy(dAtA[i:], s)
}
}
if len(m.Endpoint) > 0 {
2019-07-10 21:35:46 +00:00
dAtA[i] = 0x22
2019-07-10 20:59:43 +00:00
i++
i = encodeVarintGuard(dAtA, i, uint64(len(m.Endpoint)))
i += copy(dAtA[i:], m.Endpoint)
}
if m.PersistentKeepalive != 0 {
2019-07-10 21:35:46 +00:00
dAtA[i] = 0x28
2019-07-10 20:59:43 +00:00
i++
i = encodeVarintGuard(dAtA, i, uint64(m.PersistentKeepalive))
}
2019-07-11 11:46:36 +00:00
if len(m.PrivateKey) > 0 {
dAtA[i] = 0x32
i++
i = encodeVarintGuard(dAtA, i, uint64(len(m.PrivateKey)))
i += copy(dAtA[i:], m.PrivateKey)
}
2019-07-10 20:59:43 +00:00
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *Masquerade) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Masquerade) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Interface) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintGuard(dAtA, i, uint64(len(m.Interface)))
i += copy(dAtA[i:], m.Interface)
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func encodeVarintGuard(dAtA []byte, offset int, v uint64) int {
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return offset + 1
}
func (m *CreateRequest) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.ID)
if l > 0 {
n += 1 + l + sovGuard(uint64(l))
}
2019-07-11 11:46:36 +00:00
l = len(m.Endpoint)
if l > 0 {
n += 1 + l + sovGuard(uint64(l))
2019-07-10 20:59:43 +00:00
}
l = len(m.Address)
if l > 0 {
n += 1 + l + sovGuard(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
2019-07-10 21:35:46 +00:00
func (m *TunnelResponse) Size() (n int) {
2019-07-10 20:59:43 +00:00
if m == nil {
return 0
}
var l int
_ = l
if m.Tunnel != nil {
l = m.Tunnel.Size()
n += 1 + l + sovGuard(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
2019-07-11 11:46:36 +00:00
func (m *PeerResponse) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Tunnel != nil {
l = m.Tunnel.Size()
n += 1 + l + sovGuard(uint64(l))
}
if m.Peer != nil {
l = m.Peer.Size()
n += 1 + l + sovGuard(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *NewPeerRequest) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.ID)
if l > 0 {
n += 1 + l + sovGuard(uint64(l))
}
l = len(m.PeerID)
if l > 0 {
n += 1 + l + sovGuard(uint64(l))
}
l = len(m.Address)
if l > 0 {
n += 1 + l + sovGuard(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
2019-07-10 21:35:46 +00:00
func (m *DeletePeerRequest) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.ID)
if l > 0 {
n += 1 + l + sovGuard(uint64(l))
}
l = len(m.PeerID)
if l > 0 {
n += 1 + l + sovGuard(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
2019-07-10 20:59:43 +00:00
func (m *DeleteRequest) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.ID)
if l > 0 {
n += 1 + l + sovGuard(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *ListResponse) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if len(m.Tunnels) > 0 {
for _, e := range m.Tunnels {
l = e.Size()
n += 1 + l + sovGuard(uint64(l))
}
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *Tunnel) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.ID)
if l > 0 {
n += 1 + l + sovGuard(uint64(l))
}
l = len(m.PrivateKey)
if l > 0 {
n += 1 + l + sovGuard(uint64(l))
}
2019-07-11 11:46:36 +00:00
l = len(m.ListenPort)
if l > 0 {
n += 1 + l + sovGuard(uint64(l))
2019-07-10 20:59:43 +00:00
}
l = len(m.Address)
if l > 0 {
n += 1 + l + sovGuard(uint64(l))
}
l = len(m.DNS)
if l > 0 {
n += 1 + l + sovGuard(uint64(l))
}
if len(m.Peers) > 0 {
for _, e := range m.Peers {
l = e.Size()
n += 1 + l + sovGuard(uint64(l))
}
}
if m.Masquerade != nil {
l = m.Masquerade.Size()
n += 1 + l + sovGuard(uint64(l))
}
2019-07-11 11:46:36 +00:00
l = len(m.PublicKey)
if l > 0 {
n += 1 + l + sovGuard(uint64(l))
}
l = len(m.Endpoint)
if l > 0 {
n += 1 + l + sovGuard(uint64(l))
}
2019-07-10 20:59:43 +00:00
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *Peer) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
2019-07-10 21:35:46 +00:00
l = len(m.ID)
if l > 0 {
n += 1 + l + sovGuard(uint64(l))
}
2019-07-10 20:59:43 +00:00
l = len(m.PublicKey)
if l > 0 {
n += 1 + l + sovGuard(uint64(l))
}
if len(m.AllowedIPs) > 0 {
for _, s := range m.AllowedIPs {
l = len(s)
n += 1 + l + sovGuard(uint64(l))
}
}
l = len(m.Endpoint)
if l > 0 {
n += 1 + l + sovGuard(uint64(l))
}
if m.PersistentKeepalive != 0 {
n += 1 + sovGuard(uint64(m.PersistentKeepalive))
}
2019-07-11 11:46:36 +00:00
l = len(m.PrivateKey)
if l > 0 {
n += 1 + l + sovGuard(uint64(l))
}
2019-07-10 20:59:43 +00:00
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *Masquerade) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Interface)
if l > 0 {
n += 1 + l + sovGuard(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func sovGuard(x uint64) (n int) {
for {
n++
x >>= 7
if x == 0 {
break
}
}
return n
}
func sozGuard(x uint64) (n int) {
return sovGuard(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (this *CreateRequest) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&CreateRequest{`,
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
2019-07-11 11:46:36 +00:00
`Endpoint:` + fmt.Sprintf("%v", this.Endpoint) + `,`,
2019-07-10 20:59:43 +00:00
`Address:` + fmt.Sprintf("%v", this.Address) + `,`,
`XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
}
2019-07-10 21:35:46 +00:00
func (this *TunnelResponse) String() string {
2019-07-10 20:59:43 +00:00
if this == nil {
return "nil"
}
2019-07-10 21:35:46 +00:00
s := strings.Join([]string{`&TunnelResponse{`,
2019-07-10 20:59:43 +00:00
`Tunnel:` + strings.Replace(fmt.Sprintf("%v", this.Tunnel), "Tunnel", "Tunnel", 1) + `,`,
`XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
}
2019-07-11 11:46:36 +00:00
func (this *PeerResponse) String() string {
2019-07-10 21:35:46 +00:00
if this == nil {
return "nil"
}
2019-07-11 11:46:36 +00:00
s := strings.Join([]string{`&PeerResponse{`,
`Tunnel:` + strings.Replace(fmt.Sprintf("%v", this.Tunnel), "Tunnel", "Tunnel", 1) + `,`,
2019-07-10 21:35:46 +00:00
`Peer:` + strings.Replace(fmt.Sprintf("%v", this.Peer), "Peer", "Peer", 1) + `,`,
`XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
}
2019-07-11 11:46:36 +00:00
func (this *NewPeerRequest) String() string {
2019-07-10 21:35:46 +00:00
if this == nil {
return "nil"
}
2019-07-11 11:46:36 +00:00
s := strings.Join([]string{`&NewPeerRequest{`,
2019-07-10 21:35:46 +00:00
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
`PeerID:` + fmt.Sprintf("%v", this.PeerID) + `,`,
2019-07-11 11:46:36 +00:00
`Address:` + fmt.Sprintf("%v", this.Address) + `,`,
2019-07-10 21:35:46 +00:00
`XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
}
2019-07-11 11:46:36 +00:00
func (this *DeletePeerRequest) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&DeletePeerRequest{`,
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
`PeerID:` + fmt.Sprintf("%v", this.PeerID) + `,`,
`XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
}
func (this *DeleteRequest) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&DeleteRequest{`,
2019-07-10 20:59:43 +00:00
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
`XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
}
func (this *ListResponse) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&ListResponse{`,
`Tunnels:` + strings.Replace(fmt.Sprintf("%v", this.Tunnels), "Tunnel", "Tunnel", 1) + `,`,
`XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
}
func (this *Tunnel) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&Tunnel{`,
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
`PrivateKey:` + fmt.Sprintf("%v", this.PrivateKey) + `,`,
`ListenPort:` + fmt.Sprintf("%v", this.ListenPort) + `,`,
`Address:` + fmt.Sprintf("%v", this.Address) + `,`,
`DNS:` + fmt.Sprintf("%v", this.DNS) + `,`,
`Peers:` + strings.Replace(fmt.Sprintf("%v", this.Peers), "Peer", "Peer", 1) + `,`,
`Masquerade:` + strings.Replace(fmt.Sprintf("%v", this.Masquerade), "Masquerade", "Masquerade", 1) + `,`,
2019-07-11 11:46:36 +00:00
`PublicKey:` + fmt.Sprintf("%v", this.PublicKey) + `,`,
`Endpoint:` + fmt.Sprintf("%v", this.Endpoint) + `,`,
2019-07-10 20:59:43 +00:00
`XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
}
func (this *Peer) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&Peer{`,
2019-07-10 21:35:46 +00:00
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
2019-07-10 20:59:43 +00:00
`PublicKey:` + fmt.Sprintf("%v", this.PublicKey) + `,`,
`AllowedIPs:` + fmt.Sprintf("%v", this.AllowedIPs) + `,`,
`Endpoint:` + fmt.Sprintf("%v", this.Endpoint) + `,`,
`PersistentKeepalive:` + fmt.Sprintf("%v", this.PersistentKeepalive) + `,`,
2019-07-11 11:46:36 +00:00
`PrivateKey:` + fmt.Sprintf("%v", this.PrivateKey) + `,`,
2019-07-10 20:59:43 +00:00
`XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
}
func (this *Masquerade) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&Masquerade{`,
`Interface:` + fmt.Sprintf("%v", this.Interface) + `,`,
`XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
}
func valueToStringGuard(v interface{}) string {
rv := reflect.ValueOf(v)
if rv.IsNil() {
return "nil"
}
pv := reflect.Indirect(rv).Interface()
return fmt.Sprintf("*%v", pv)
}
func (m *CreateRequest) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGuard
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: CreateRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: CreateRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGuard
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGuard
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthGuard
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.ID = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
2019-07-11 11:46:36 +00:00
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Endpoint", wireType)
2019-07-10 20:59:43 +00:00
}
2019-07-11 11:46:36 +00:00
var stringLen uint64
2019-07-10 20:59:43 +00:00
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGuard
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
2019-07-11 11:46:36 +00:00
stringLen |= uint64(b&0x7F) << shift
2019-07-10 20:59:43 +00:00
if b < 0x80 {
break
}
}
2019-07-11 11:46:36 +00:00
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGuard
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthGuard
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Endpoint = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
2019-07-10 20:59:43 +00:00
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGuard
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGuard
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthGuard
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Address = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGuard(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthGuard
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthGuard
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
2019-07-10 21:35:46 +00:00
func (m *TunnelResponse) Unmarshal(dAtA []byte) error {
2019-07-10 20:59:43 +00:00
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGuard
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
2019-07-10 21:35:46 +00:00
return fmt.Errorf("proto: TunnelResponse: wiretype end group for non-group")
2019-07-10 20:59:43 +00:00
}
if fieldNum <= 0 {
2019-07-10 21:35:46 +00:00
return fmt.Errorf("proto: TunnelResponse: illegal tag %d (wire type %d)", fieldNum, wire)
2019-07-10 20:59:43 +00:00
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Tunnel", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGuard
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGuard
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGuard
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Tunnel == nil {
m.Tunnel = &Tunnel{}
}
if err := m.Tunnel.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGuard(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthGuard
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthGuard
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
2019-07-11 11:46:36 +00:00
func (m *PeerResponse) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGuard
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: PeerResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: PeerResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Tunnel", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGuard
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGuard
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGuard
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Tunnel == nil {
m.Tunnel = &Tunnel{}
}
if err := m.Tunnel.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Peer", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGuard
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGuard
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGuard
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Peer == nil {
m.Peer = &Peer{}
}
if err := m.Peer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGuard(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthGuard
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthGuard
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *NewPeerRequest) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGuard
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: NewPeerRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: NewPeerRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGuard
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGuard
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthGuard
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.ID = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field PeerID", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGuard
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGuard
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthGuard
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.PeerID = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGuard
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGuard
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthGuard
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Address = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGuard(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthGuard
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthGuard
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
2019-07-10 21:35:46 +00:00
func (m *DeletePeerRequest) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGuard
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: DeletePeerRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: DeletePeerRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGuard
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGuard
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthGuard
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.ID = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field PeerID", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGuard
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGuard
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthGuard
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.PeerID = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGuard(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthGuard
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthGuard
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *DeleteRequest) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGuard
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: DeleteRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: DeleteRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGuard
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGuard
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthGuard
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.ID = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGuard(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthGuard
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthGuard
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
2019-07-10 20:59:43 +00:00
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *ListResponse) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGuard
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: ListResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: ListResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Tunnels", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGuard
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGuard
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGuard
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Tunnels = append(m.Tunnels, &Tunnel{})
if err := m.Tunnels[len(m.Tunnels)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGuard(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthGuard
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthGuard
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Tunnel) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGuard
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: Tunnel: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Tunnel: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGuard
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGuard
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthGuard
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.ID = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field PrivateKey", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGuard
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGuard
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthGuard
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.PrivateKey = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
2019-07-11 11:46:36 +00:00
if wireType != 2 {
2019-07-10 20:59:43 +00:00
return fmt.Errorf("proto: wrong wireType = %d for field ListenPort", wireType)
}
2019-07-11 11:46:36 +00:00
var stringLen uint64
2019-07-10 20:59:43 +00:00
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGuard
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
2019-07-11 11:46:36 +00:00
stringLen |= uint64(b&0x7F) << shift
2019-07-10 20:59:43 +00:00
if b < 0x80 {
break
}
}
2019-07-11 11:46:36 +00:00
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGuard
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthGuard
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.ListenPort = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
2019-07-10 20:59:43 +00:00
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGuard
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGuard
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthGuard
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Address = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field DNS", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGuard
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGuard
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthGuard
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.DNS = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 6:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Peers", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGuard
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGuard
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGuard
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Peers = append(m.Peers, &Peer{})
if err := m.Peers[len(m.Peers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 7:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Masquerade", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGuard
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGuard
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGuard
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Masquerade == nil {
m.Masquerade = &Masquerade{}
}
if err := m.Masquerade.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
2019-07-11 11:46:36 +00:00
case 8:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGuard
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGuard
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthGuard
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.PublicKey = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 9:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Endpoint", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGuard
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGuard
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthGuard
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Endpoint = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
2019-07-10 20:59:43 +00:00
default:
iNdEx = preIndex
skippy, err := skipGuard(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthGuard
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthGuard
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Peer) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGuard
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: Peer: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Peer: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
2019-07-10 21:35:46 +00:00
return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
2019-07-10 20:59:43 +00:00
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGuard
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGuard
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthGuard
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
2019-07-10 21:35:46 +00:00
m.ID = string(dAtA[iNdEx:postIndex])
2019-07-10 20:59:43 +00:00
iNdEx = postIndex
case 2:
if wireType != 2 {
2019-07-10 21:35:46 +00:00
return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType)
2019-07-10 20:59:43 +00:00
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGuard
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGuard
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthGuard
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
2019-07-10 21:35:46 +00:00
m.PublicKey = string(dAtA[iNdEx:postIndex])
2019-07-10 20:59:43 +00:00
iNdEx = postIndex
case 3:
if wireType != 2 {
2019-07-10 21:35:46 +00:00
return fmt.Errorf("proto: wrong wireType = %d for field AllowedIPs", wireType)
2019-07-10 20:59:43 +00:00
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGuard
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGuard
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthGuard
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
2019-07-10 21:35:46 +00:00
m.AllowedIPs = append(m.AllowedIPs, string(dAtA[iNdEx:postIndex]))
2019-07-10 20:59:43 +00:00
iNdEx = postIndex
case 4:
if wireType != 2 {
2019-07-10 21:35:46 +00:00
return fmt.Errorf("proto: wrong wireType = %d for field Endpoint", wireType)
2019-07-10 20:59:43 +00:00
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGuard
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGuard
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthGuard
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
2019-07-10 21:35:46 +00:00
m.Endpoint = string(dAtA[iNdEx:postIndex])
2019-07-10 20:59:43 +00:00
iNdEx = postIndex
2019-07-10 21:35:46 +00:00
case 5:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field PersistentKeepalive", wireType)
}
m.PersistentKeepalive = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGuard
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.PersistentKeepalive |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
}
2019-07-11 11:46:36 +00:00
case 6:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field PrivateKey", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGuard
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGuard
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthGuard
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.PrivateKey = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
2019-07-10 20:59:43 +00:00
default:
iNdEx = preIndex
skippy, err := skipGuard(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthGuard
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthGuard
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Masquerade) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGuard
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: Masquerade: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Masquerade: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Interface", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGuard
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGuard
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthGuard
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Interface = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGuard(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthGuard
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthGuard
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipGuard(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowGuard
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowGuard
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
return iNdEx, nil
case 1:
iNdEx += 8
return iNdEx, nil
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowGuard
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLengthGuard
}
iNdEx += length
if iNdEx < 0 {
return 0, ErrInvalidLengthGuard
}
return iNdEx, nil
case 3:
for {
var innerWire uint64
var start int = iNdEx
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowGuard
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
innerWire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
innerWireType := int(innerWire & 0x7)
if innerWireType == 4 {
break
}
next, err := skipGuard(dAtA[start:])
if err != nil {
return 0, err
}
iNdEx = start + next
if iNdEx < 0 {
return 0, ErrInvalidLengthGuard
}
}
return iNdEx, nil
case 4:
return iNdEx, nil
case 5:
iNdEx += 4
return iNdEx, nil
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
}
panic("unreachable")
}
var (
ErrInvalidLengthGuard = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowGuard = fmt.Errorf("proto: integer overflow")
)