mirror of
https://github.com/logos-messaging/go-libp2p-rendezvous.git
synced 2026-01-02 12:53:13 +00:00
2251 lines
55 KiB
Go
2251 lines
55 KiB
Go
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
|
// source: rendezvous.proto
|
|
|
|
package rendezvous_pb
|
|
|
|
import proto "github.com/gogo/protobuf/proto"
|
|
import fmt "fmt"
|
|
import math "math"
|
|
|
|
import io "io"
|
|
|
|
// 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 Message_MessageType int32
|
|
|
|
const (
|
|
Message_REGISTER Message_MessageType = 0
|
|
Message_REGISTER_RESPONSE Message_MessageType = 1
|
|
Message_UNREGISTER Message_MessageType = 2
|
|
Message_DISCOVER Message_MessageType = 3
|
|
Message_DISCOVER_RESPONSE Message_MessageType = 4
|
|
)
|
|
|
|
var Message_MessageType_name = map[int32]string{
|
|
0: "REGISTER",
|
|
1: "REGISTER_RESPONSE",
|
|
2: "UNREGISTER",
|
|
3: "DISCOVER",
|
|
4: "DISCOVER_RESPONSE",
|
|
}
|
|
var Message_MessageType_value = map[string]int32{
|
|
"REGISTER": 0,
|
|
"REGISTER_RESPONSE": 1,
|
|
"UNREGISTER": 2,
|
|
"DISCOVER": 3,
|
|
"DISCOVER_RESPONSE": 4,
|
|
}
|
|
|
|
func (x Message_MessageType) Enum() *Message_MessageType {
|
|
p := new(Message_MessageType)
|
|
*p = x
|
|
return p
|
|
}
|
|
func (x Message_MessageType) String() string {
|
|
return proto.EnumName(Message_MessageType_name, int32(x))
|
|
}
|
|
func (x *Message_MessageType) UnmarshalJSON(data []byte) error {
|
|
value, err := proto.UnmarshalJSONEnum(Message_MessageType_value, data, "Message_MessageType")
|
|
if err != nil {
|
|
return err
|
|
}
|
|
*x = Message_MessageType(value)
|
|
return nil
|
|
}
|
|
func (Message_MessageType) EnumDescriptor() ([]byte, []int) {
|
|
return fileDescriptor_rendezvous_af6820b250ca4668, []int{0, 0}
|
|
}
|
|
|
|
type Message_ResponseStatus int32
|
|
|
|
const (
|
|
Message_OK Message_ResponseStatus = 0
|
|
Message_E_INVALID_NAMESPACE Message_ResponseStatus = 100
|
|
Message_E_INVALID_PEER_INFO Message_ResponseStatus = 101
|
|
Message_E_INVALID_TTL Message_ResponseStatus = 102
|
|
Message_E_INVALID_COOKIE Message_ResponseStatus = 103
|
|
Message_E_NOT_AUTHORIZED Message_ResponseStatus = 200
|
|
Message_E_INTERNAL_ERROR Message_ResponseStatus = 300
|
|
Message_E_UNAVAILABLE Message_ResponseStatus = 400
|
|
)
|
|
|
|
var Message_ResponseStatus_name = map[int32]string{
|
|
0: "OK",
|
|
100: "E_INVALID_NAMESPACE",
|
|
101: "E_INVALID_PEER_INFO",
|
|
102: "E_INVALID_TTL",
|
|
103: "E_INVALID_COOKIE",
|
|
200: "E_NOT_AUTHORIZED",
|
|
300: "E_INTERNAL_ERROR",
|
|
400: "E_UNAVAILABLE",
|
|
}
|
|
var Message_ResponseStatus_value = map[string]int32{
|
|
"OK": 0,
|
|
"E_INVALID_NAMESPACE": 100,
|
|
"E_INVALID_PEER_INFO": 101,
|
|
"E_INVALID_TTL": 102,
|
|
"E_INVALID_COOKIE": 103,
|
|
"E_NOT_AUTHORIZED": 200,
|
|
"E_INTERNAL_ERROR": 300,
|
|
"E_UNAVAILABLE": 400,
|
|
}
|
|
|
|
func (x Message_ResponseStatus) Enum() *Message_ResponseStatus {
|
|
p := new(Message_ResponseStatus)
|
|
*p = x
|
|
return p
|
|
}
|
|
func (x Message_ResponseStatus) String() string {
|
|
return proto.EnumName(Message_ResponseStatus_name, int32(x))
|
|
}
|
|
func (x *Message_ResponseStatus) UnmarshalJSON(data []byte) error {
|
|
value, err := proto.UnmarshalJSONEnum(Message_ResponseStatus_value, data, "Message_ResponseStatus")
|
|
if err != nil {
|
|
return err
|
|
}
|
|
*x = Message_ResponseStatus(value)
|
|
return nil
|
|
}
|
|
func (Message_ResponseStatus) EnumDescriptor() ([]byte, []int) {
|
|
return fileDescriptor_rendezvous_af6820b250ca4668, []int{0, 1}
|
|
}
|
|
|
|
type Message struct {
|
|
Type *Message_MessageType `protobuf:"varint,1,opt,name=type,enum=rendezvous.pb.Message_MessageType" json:"type,omitempty"`
|
|
Register *Message_Register `protobuf:"bytes,2,opt,name=register" json:"register,omitempty"`
|
|
RegisterResponse *Message_RegisterResponse `protobuf:"bytes,3,opt,name=registerResponse" json:"registerResponse,omitempty"`
|
|
Unregister *Message_Unregister `protobuf:"bytes,4,opt,name=unregister" json:"unregister,omitempty"`
|
|
Discover *Message_Discover `protobuf:"bytes,5,opt,name=discover" json:"discover,omitempty"`
|
|
DiscoverResponse *Message_DiscoverResponse `protobuf:"bytes,6,opt,name=discoverResponse" json:"discoverResponse,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *Message) Reset() { *m = Message{} }
|
|
func (m *Message) String() string { return proto.CompactTextString(m) }
|
|
func (*Message) ProtoMessage() {}
|
|
func (*Message) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_rendezvous_af6820b250ca4668, []int{0}
|
|
}
|
|
func (m *Message) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_Message.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 (dst *Message) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Message.Merge(dst, src)
|
|
}
|
|
func (m *Message) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *Message) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Message.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Message proto.InternalMessageInfo
|
|
|
|
func (m *Message) GetType() Message_MessageType {
|
|
if m != nil && m.Type != nil {
|
|
return *m.Type
|
|
}
|
|
return Message_REGISTER
|
|
}
|
|
|
|
func (m *Message) GetRegister() *Message_Register {
|
|
if m != nil {
|
|
return m.Register
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Message) GetRegisterResponse() *Message_RegisterResponse {
|
|
if m != nil {
|
|
return m.RegisterResponse
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Message) GetUnregister() *Message_Unregister {
|
|
if m != nil {
|
|
return m.Unregister
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Message) GetDiscover() *Message_Discover {
|
|
if m != nil {
|
|
return m.Discover
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Message) GetDiscoverResponse() *Message_DiscoverResponse {
|
|
if m != nil {
|
|
return m.DiscoverResponse
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type Message_PeerInfo struct {
|
|
Id []byte `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
|
|
Addrs [][]byte `protobuf:"bytes,2,rep,name=addrs" json:"addrs,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *Message_PeerInfo) Reset() { *m = Message_PeerInfo{} }
|
|
func (m *Message_PeerInfo) String() string { return proto.CompactTextString(m) }
|
|
func (*Message_PeerInfo) ProtoMessage() {}
|
|
func (*Message_PeerInfo) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_rendezvous_af6820b250ca4668, []int{0, 0}
|
|
}
|
|
func (m *Message_PeerInfo) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *Message_PeerInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_Message_PeerInfo.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 (dst *Message_PeerInfo) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Message_PeerInfo.Merge(dst, src)
|
|
}
|
|
func (m *Message_PeerInfo) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *Message_PeerInfo) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Message_PeerInfo.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Message_PeerInfo proto.InternalMessageInfo
|
|
|
|
func (m *Message_PeerInfo) GetId() []byte {
|
|
if m != nil {
|
|
return m.Id
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Message_PeerInfo) GetAddrs() [][]byte {
|
|
if m != nil {
|
|
return m.Addrs
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type Message_Register struct {
|
|
Ns *string `protobuf:"bytes,1,opt,name=ns" json:"ns,omitempty"`
|
|
Peer *Message_PeerInfo `protobuf:"bytes,2,opt,name=peer" json:"peer,omitempty"`
|
|
Ttl *int64 `protobuf:"varint,3,opt,name=ttl" json:"ttl,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *Message_Register) Reset() { *m = Message_Register{} }
|
|
func (m *Message_Register) String() string { return proto.CompactTextString(m) }
|
|
func (*Message_Register) ProtoMessage() {}
|
|
func (*Message_Register) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_rendezvous_af6820b250ca4668, []int{0, 1}
|
|
}
|
|
func (m *Message_Register) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *Message_Register) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_Message_Register.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 (dst *Message_Register) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Message_Register.Merge(dst, src)
|
|
}
|
|
func (m *Message_Register) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *Message_Register) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Message_Register.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Message_Register proto.InternalMessageInfo
|
|
|
|
func (m *Message_Register) GetNs() string {
|
|
if m != nil && m.Ns != nil {
|
|
return *m.Ns
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Message_Register) GetPeer() *Message_PeerInfo {
|
|
if m != nil {
|
|
return m.Peer
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Message_Register) GetTtl() int64 {
|
|
if m != nil && m.Ttl != nil {
|
|
return *m.Ttl
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type Message_RegisterResponse struct {
|
|
Status *Message_ResponseStatus `protobuf:"varint,1,opt,name=status,enum=rendezvous.pb.Message_ResponseStatus" json:"status,omitempty"`
|
|
StatusText *string `protobuf:"bytes,2,opt,name=statusText" json:"statusText,omitempty"`
|
|
Ttl *int64 `protobuf:"varint,3,opt,name=ttl" json:"ttl,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *Message_RegisterResponse) Reset() { *m = Message_RegisterResponse{} }
|
|
func (m *Message_RegisterResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*Message_RegisterResponse) ProtoMessage() {}
|
|
func (*Message_RegisterResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_rendezvous_af6820b250ca4668, []int{0, 2}
|
|
}
|
|
func (m *Message_RegisterResponse) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *Message_RegisterResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_Message_RegisterResponse.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 (dst *Message_RegisterResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Message_RegisterResponse.Merge(dst, src)
|
|
}
|
|
func (m *Message_RegisterResponse) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *Message_RegisterResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Message_RegisterResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Message_RegisterResponse proto.InternalMessageInfo
|
|
|
|
func (m *Message_RegisterResponse) GetStatus() Message_ResponseStatus {
|
|
if m != nil && m.Status != nil {
|
|
return *m.Status
|
|
}
|
|
return Message_OK
|
|
}
|
|
|
|
func (m *Message_RegisterResponse) GetStatusText() string {
|
|
if m != nil && m.StatusText != nil {
|
|
return *m.StatusText
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Message_RegisterResponse) GetTtl() int64 {
|
|
if m != nil && m.Ttl != nil {
|
|
return *m.Ttl
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type Message_Unregister struct {
|
|
Ns *string `protobuf:"bytes,1,opt,name=ns" json:"ns,omitempty"`
|
|
Id []byte `protobuf:"bytes,2,opt,name=id" json:"id,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *Message_Unregister) Reset() { *m = Message_Unregister{} }
|
|
func (m *Message_Unregister) String() string { return proto.CompactTextString(m) }
|
|
func (*Message_Unregister) ProtoMessage() {}
|
|
func (*Message_Unregister) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_rendezvous_af6820b250ca4668, []int{0, 3}
|
|
}
|
|
func (m *Message_Unregister) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *Message_Unregister) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_Message_Unregister.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 (dst *Message_Unregister) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Message_Unregister.Merge(dst, src)
|
|
}
|
|
func (m *Message_Unregister) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *Message_Unregister) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Message_Unregister.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Message_Unregister proto.InternalMessageInfo
|
|
|
|
func (m *Message_Unregister) GetNs() string {
|
|
if m != nil && m.Ns != nil {
|
|
return *m.Ns
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Message_Unregister) GetId() []byte {
|
|
if m != nil {
|
|
return m.Id
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type Message_Discover struct {
|
|
Ns *string `protobuf:"bytes,1,opt,name=ns" json:"ns,omitempty"`
|
|
Limit *int64 `protobuf:"varint,2,opt,name=limit" json:"limit,omitempty"`
|
|
Cookie []byte `protobuf:"bytes,3,opt,name=cookie" json:"cookie,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *Message_Discover) Reset() { *m = Message_Discover{} }
|
|
func (m *Message_Discover) String() string { return proto.CompactTextString(m) }
|
|
func (*Message_Discover) ProtoMessage() {}
|
|
func (*Message_Discover) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_rendezvous_af6820b250ca4668, []int{0, 4}
|
|
}
|
|
func (m *Message_Discover) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *Message_Discover) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_Message_Discover.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 (dst *Message_Discover) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Message_Discover.Merge(dst, src)
|
|
}
|
|
func (m *Message_Discover) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *Message_Discover) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Message_Discover.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Message_Discover proto.InternalMessageInfo
|
|
|
|
func (m *Message_Discover) GetNs() string {
|
|
if m != nil && m.Ns != nil {
|
|
return *m.Ns
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Message_Discover) GetLimit() int64 {
|
|
if m != nil && m.Limit != nil {
|
|
return *m.Limit
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Message_Discover) GetCookie() []byte {
|
|
if m != nil {
|
|
return m.Cookie
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type Message_DiscoverResponse struct {
|
|
Registrations []*Message_Register `protobuf:"bytes,1,rep,name=registrations" json:"registrations,omitempty"`
|
|
Cookie []byte `protobuf:"bytes,2,opt,name=cookie" json:"cookie,omitempty"`
|
|
Status *Message_ResponseStatus `protobuf:"varint,3,opt,name=status,enum=rendezvous.pb.Message_ResponseStatus" json:"status,omitempty"`
|
|
StatusText *string `protobuf:"bytes,4,opt,name=statusText" json:"statusText,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *Message_DiscoverResponse) Reset() { *m = Message_DiscoverResponse{} }
|
|
func (m *Message_DiscoverResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*Message_DiscoverResponse) ProtoMessage() {}
|
|
func (*Message_DiscoverResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_rendezvous_af6820b250ca4668, []int{0, 5}
|
|
}
|
|
func (m *Message_DiscoverResponse) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *Message_DiscoverResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_Message_DiscoverResponse.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 (dst *Message_DiscoverResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Message_DiscoverResponse.Merge(dst, src)
|
|
}
|
|
func (m *Message_DiscoverResponse) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *Message_DiscoverResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Message_DiscoverResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Message_DiscoverResponse proto.InternalMessageInfo
|
|
|
|
func (m *Message_DiscoverResponse) GetRegistrations() []*Message_Register {
|
|
if m != nil {
|
|
return m.Registrations
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Message_DiscoverResponse) GetCookie() []byte {
|
|
if m != nil {
|
|
return m.Cookie
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Message_DiscoverResponse) GetStatus() Message_ResponseStatus {
|
|
if m != nil && m.Status != nil {
|
|
return *m.Status
|
|
}
|
|
return Message_OK
|
|
}
|
|
|
|
func (m *Message_DiscoverResponse) GetStatusText() string {
|
|
if m != nil && m.StatusText != nil {
|
|
return *m.StatusText
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*Message)(nil), "rendezvous.pb.Message")
|
|
proto.RegisterType((*Message_PeerInfo)(nil), "rendezvous.pb.Message.PeerInfo")
|
|
proto.RegisterType((*Message_Register)(nil), "rendezvous.pb.Message.Register")
|
|
proto.RegisterType((*Message_RegisterResponse)(nil), "rendezvous.pb.Message.RegisterResponse")
|
|
proto.RegisterType((*Message_Unregister)(nil), "rendezvous.pb.Message.Unregister")
|
|
proto.RegisterType((*Message_Discover)(nil), "rendezvous.pb.Message.Discover")
|
|
proto.RegisterType((*Message_DiscoverResponse)(nil), "rendezvous.pb.Message.DiscoverResponse")
|
|
proto.RegisterEnum("rendezvous.pb.Message_MessageType", Message_MessageType_name, Message_MessageType_value)
|
|
proto.RegisterEnum("rendezvous.pb.Message_ResponseStatus", Message_ResponseStatus_name, Message_ResponseStatus_value)
|
|
}
|
|
func (m *Message) 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 *Message) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Type != nil {
|
|
dAtA[i] = 0x8
|
|
i++
|
|
i = encodeVarintRendezvous(dAtA, i, uint64(*m.Type))
|
|
}
|
|
if m.Register != nil {
|
|
dAtA[i] = 0x12
|
|
i++
|
|
i = encodeVarintRendezvous(dAtA, i, uint64(m.Register.Size()))
|
|
n1, err := m.Register.MarshalTo(dAtA[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n1
|
|
}
|
|
if m.RegisterResponse != nil {
|
|
dAtA[i] = 0x1a
|
|
i++
|
|
i = encodeVarintRendezvous(dAtA, i, uint64(m.RegisterResponse.Size()))
|
|
n2, err := m.RegisterResponse.MarshalTo(dAtA[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n2
|
|
}
|
|
if m.Unregister != nil {
|
|
dAtA[i] = 0x22
|
|
i++
|
|
i = encodeVarintRendezvous(dAtA, i, uint64(m.Unregister.Size()))
|
|
n3, err := m.Unregister.MarshalTo(dAtA[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n3
|
|
}
|
|
if m.Discover != nil {
|
|
dAtA[i] = 0x2a
|
|
i++
|
|
i = encodeVarintRendezvous(dAtA, i, uint64(m.Discover.Size()))
|
|
n4, err := m.Discover.MarshalTo(dAtA[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n4
|
|
}
|
|
if m.DiscoverResponse != nil {
|
|
dAtA[i] = 0x32
|
|
i++
|
|
i = encodeVarintRendezvous(dAtA, i, uint64(m.DiscoverResponse.Size()))
|
|
n5, err := m.DiscoverResponse.MarshalTo(dAtA[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n5
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
i += copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *Message_PeerInfo) 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 *Message_PeerInfo) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Id != nil {
|
|
dAtA[i] = 0xa
|
|
i++
|
|
i = encodeVarintRendezvous(dAtA, i, uint64(len(m.Id)))
|
|
i += copy(dAtA[i:], m.Id)
|
|
}
|
|
if len(m.Addrs) > 0 {
|
|
for _, b := range m.Addrs {
|
|
dAtA[i] = 0x12
|
|
i++
|
|
i = encodeVarintRendezvous(dAtA, i, uint64(len(b)))
|
|
i += copy(dAtA[i:], b)
|
|
}
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
i += copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *Message_Register) 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 *Message_Register) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Ns != nil {
|
|
dAtA[i] = 0xa
|
|
i++
|
|
i = encodeVarintRendezvous(dAtA, i, uint64(len(*m.Ns)))
|
|
i += copy(dAtA[i:], *m.Ns)
|
|
}
|
|
if m.Peer != nil {
|
|
dAtA[i] = 0x12
|
|
i++
|
|
i = encodeVarintRendezvous(dAtA, i, uint64(m.Peer.Size()))
|
|
n6, err := m.Peer.MarshalTo(dAtA[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n6
|
|
}
|
|
if m.Ttl != nil {
|
|
dAtA[i] = 0x18
|
|
i++
|
|
i = encodeVarintRendezvous(dAtA, i, uint64(*m.Ttl))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
i += copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *Message_RegisterResponse) 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 *Message_RegisterResponse) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Status != nil {
|
|
dAtA[i] = 0x8
|
|
i++
|
|
i = encodeVarintRendezvous(dAtA, i, uint64(*m.Status))
|
|
}
|
|
if m.StatusText != nil {
|
|
dAtA[i] = 0x12
|
|
i++
|
|
i = encodeVarintRendezvous(dAtA, i, uint64(len(*m.StatusText)))
|
|
i += copy(dAtA[i:], *m.StatusText)
|
|
}
|
|
if m.Ttl != nil {
|
|
dAtA[i] = 0x18
|
|
i++
|
|
i = encodeVarintRendezvous(dAtA, i, uint64(*m.Ttl))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
i += copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *Message_Unregister) 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 *Message_Unregister) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Ns != nil {
|
|
dAtA[i] = 0xa
|
|
i++
|
|
i = encodeVarintRendezvous(dAtA, i, uint64(len(*m.Ns)))
|
|
i += copy(dAtA[i:], *m.Ns)
|
|
}
|
|
if m.Id != nil {
|
|
dAtA[i] = 0x12
|
|
i++
|
|
i = encodeVarintRendezvous(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 *Message_Discover) 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 *Message_Discover) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Ns != nil {
|
|
dAtA[i] = 0xa
|
|
i++
|
|
i = encodeVarintRendezvous(dAtA, i, uint64(len(*m.Ns)))
|
|
i += copy(dAtA[i:], *m.Ns)
|
|
}
|
|
if m.Limit != nil {
|
|
dAtA[i] = 0x10
|
|
i++
|
|
i = encodeVarintRendezvous(dAtA, i, uint64(*m.Limit))
|
|
}
|
|
if m.Cookie != nil {
|
|
dAtA[i] = 0x1a
|
|
i++
|
|
i = encodeVarintRendezvous(dAtA, i, uint64(len(m.Cookie)))
|
|
i += copy(dAtA[i:], m.Cookie)
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
i += copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *Message_DiscoverResponse) 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 *Message_DiscoverResponse) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Registrations) > 0 {
|
|
for _, msg := range m.Registrations {
|
|
dAtA[i] = 0xa
|
|
i++
|
|
i = encodeVarintRendezvous(dAtA, i, uint64(msg.Size()))
|
|
n, err := msg.MarshalTo(dAtA[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n
|
|
}
|
|
}
|
|
if m.Cookie != nil {
|
|
dAtA[i] = 0x12
|
|
i++
|
|
i = encodeVarintRendezvous(dAtA, i, uint64(len(m.Cookie)))
|
|
i += copy(dAtA[i:], m.Cookie)
|
|
}
|
|
if m.Status != nil {
|
|
dAtA[i] = 0x18
|
|
i++
|
|
i = encodeVarintRendezvous(dAtA, i, uint64(*m.Status))
|
|
}
|
|
if m.StatusText != nil {
|
|
dAtA[i] = 0x22
|
|
i++
|
|
i = encodeVarintRendezvous(dAtA, i, uint64(len(*m.StatusText)))
|
|
i += copy(dAtA[i:], *m.StatusText)
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
i += copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func encodeVarintRendezvous(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 *Message) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Type != nil {
|
|
n += 1 + sovRendezvous(uint64(*m.Type))
|
|
}
|
|
if m.Register != nil {
|
|
l = m.Register.Size()
|
|
n += 1 + l + sovRendezvous(uint64(l))
|
|
}
|
|
if m.RegisterResponse != nil {
|
|
l = m.RegisterResponse.Size()
|
|
n += 1 + l + sovRendezvous(uint64(l))
|
|
}
|
|
if m.Unregister != nil {
|
|
l = m.Unregister.Size()
|
|
n += 1 + l + sovRendezvous(uint64(l))
|
|
}
|
|
if m.Discover != nil {
|
|
l = m.Discover.Size()
|
|
n += 1 + l + sovRendezvous(uint64(l))
|
|
}
|
|
if m.DiscoverResponse != nil {
|
|
l = m.DiscoverResponse.Size()
|
|
n += 1 + l + sovRendezvous(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *Message_PeerInfo) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Id != nil {
|
|
l = len(m.Id)
|
|
n += 1 + l + sovRendezvous(uint64(l))
|
|
}
|
|
if len(m.Addrs) > 0 {
|
|
for _, b := range m.Addrs {
|
|
l = len(b)
|
|
n += 1 + l + sovRendezvous(uint64(l))
|
|
}
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *Message_Register) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Ns != nil {
|
|
l = len(*m.Ns)
|
|
n += 1 + l + sovRendezvous(uint64(l))
|
|
}
|
|
if m.Peer != nil {
|
|
l = m.Peer.Size()
|
|
n += 1 + l + sovRendezvous(uint64(l))
|
|
}
|
|
if m.Ttl != nil {
|
|
n += 1 + sovRendezvous(uint64(*m.Ttl))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *Message_RegisterResponse) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Status != nil {
|
|
n += 1 + sovRendezvous(uint64(*m.Status))
|
|
}
|
|
if m.StatusText != nil {
|
|
l = len(*m.StatusText)
|
|
n += 1 + l + sovRendezvous(uint64(l))
|
|
}
|
|
if m.Ttl != nil {
|
|
n += 1 + sovRendezvous(uint64(*m.Ttl))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *Message_Unregister) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Ns != nil {
|
|
l = len(*m.Ns)
|
|
n += 1 + l + sovRendezvous(uint64(l))
|
|
}
|
|
if m.Id != nil {
|
|
l = len(m.Id)
|
|
n += 1 + l + sovRendezvous(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *Message_Discover) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Ns != nil {
|
|
l = len(*m.Ns)
|
|
n += 1 + l + sovRendezvous(uint64(l))
|
|
}
|
|
if m.Limit != nil {
|
|
n += 1 + sovRendezvous(uint64(*m.Limit))
|
|
}
|
|
if m.Cookie != nil {
|
|
l = len(m.Cookie)
|
|
n += 1 + l + sovRendezvous(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *Message_DiscoverResponse) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if len(m.Registrations) > 0 {
|
|
for _, e := range m.Registrations {
|
|
l = e.Size()
|
|
n += 1 + l + sovRendezvous(uint64(l))
|
|
}
|
|
}
|
|
if m.Cookie != nil {
|
|
l = len(m.Cookie)
|
|
n += 1 + l + sovRendezvous(uint64(l))
|
|
}
|
|
if m.Status != nil {
|
|
n += 1 + sovRendezvous(uint64(*m.Status))
|
|
}
|
|
if m.StatusText != nil {
|
|
l = len(*m.StatusText)
|
|
n += 1 + l + sovRendezvous(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func sovRendezvous(x uint64) (n int) {
|
|
for {
|
|
n++
|
|
x >>= 7
|
|
if x == 0 {
|
|
break
|
|
}
|
|
}
|
|
return n
|
|
}
|
|
func sozRendezvous(x uint64) (n int) {
|
|
return sovRendezvous(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
|
}
|
|
func (m *Message) 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 ErrIntOverflowRendezvous
|
|
}
|
|
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: Message: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Message: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
|
|
}
|
|
var v Message_MessageType
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRendezvous
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= (Message_MessageType(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.Type = &v
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Register", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRendezvous
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthRendezvous
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Register == nil {
|
|
m.Register = &Message_Register{}
|
|
}
|
|
if err := m.Register.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field RegisterResponse", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRendezvous
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthRendezvous
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.RegisterResponse == nil {
|
|
m.RegisterResponse = &Message_RegisterResponse{}
|
|
}
|
|
if err := m.RegisterResponse.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 4:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Unregister", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRendezvous
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthRendezvous
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Unregister == nil {
|
|
m.Unregister = &Message_Unregister{}
|
|
}
|
|
if err := m.Unregister.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 5:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Discover", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRendezvous
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthRendezvous
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Discover == nil {
|
|
m.Discover = &Message_Discover{}
|
|
}
|
|
if err := m.Discover.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 6:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field DiscoverResponse", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRendezvous
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthRendezvous
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.DiscoverResponse == nil {
|
|
m.DiscoverResponse = &Message_DiscoverResponse{}
|
|
}
|
|
if err := m.DiscoverResponse.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipRendezvous(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthRendezvous
|
|
}
|
|
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 *Message_PeerInfo) 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 ErrIntOverflowRendezvous
|
|
}
|
|
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: PeerInfo: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: PeerInfo: 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 byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRendezvous
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthRendezvous
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Id = append(m.Id[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.Id == nil {
|
|
m.Id = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Addrs", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRendezvous
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthRendezvous
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Addrs = append(m.Addrs, make([]byte, postIndex-iNdEx))
|
|
copy(m.Addrs[len(m.Addrs)-1], dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipRendezvous(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthRendezvous
|
|
}
|
|
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 *Message_Register) 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 ErrIntOverflowRendezvous
|
|
}
|
|
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: Register: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Register: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Ns", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRendezvous
|
|
}
|
|
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 ErrInvalidLengthRendezvous
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
s := string(dAtA[iNdEx:postIndex])
|
|
m.Ns = &s
|
|
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 ErrIntOverflowRendezvous
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthRendezvous
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Peer == nil {
|
|
m.Peer = &Message_PeerInfo{}
|
|
}
|
|
if err := m.Peer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Ttl", wireType)
|
|
}
|
|
var v int64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRendezvous
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= (int64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.Ttl = &v
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipRendezvous(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthRendezvous
|
|
}
|
|
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 *Message_RegisterResponse) 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 ErrIntOverflowRendezvous
|
|
}
|
|
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: RegisterResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: RegisterResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
|
|
}
|
|
var v Message_ResponseStatus
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRendezvous
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= (Message_ResponseStatus(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.Status = &v
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field StatusText", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRendezvous
|
|
}
|
|
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 ErrInvalidLengthRendezvous
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
s := string(dAtA[iNdEx:postIndex])
|
|
m.StatusText = &s
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Ttl", wireType)
|
|
}
|
|
var v int64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRendezvous
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= (int64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.Ttl = &v
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipRendezvous(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthRendezvous
|
|
}
|
|
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 *Message_Unregister) 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 ErrIntOverflowRendezvous
|
|
}
|
|
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: Unregister: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Unregister: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Ns", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRendezvous
|
|
}
|
|
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 ErrInvalidLengthRendezvous
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
s := string(dAtA[iNdEx:postIndex])
|
|
m.Ns = &s
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRendezvous
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthRendezvous
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Id = append(m.Id[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.Id == nil {
|
|
m.Id = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipRendezvous(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthRendezvous
|
|
}
|
|
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 *Message_Discover) 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 ErrIntOverflowRendezvous
|
|
}
|
|
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: Discover: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Discover: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Ns", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRendezvous
|
|
}
|
|
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 ErrInvalidLengthRendezvous
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
s := string(dAtA[iNdEx:postIndex])
|
|
m.Ns = &s
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType)
|
|
}
|
|
var v int64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRendezvous
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= (int64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.Limit = &v
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Cookie", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRendezvous
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthRendezvous
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Cookie = append(m.Cookie[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.Cookie == nil {
|
|
m.Cookie = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipRendezvous(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthRendezvous
|
|
}
|
|
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 *Message_DiscoverResponse) 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 ErrIntOverflowRendezvous
|
|
}
|
|
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: DiscoverResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: DiscoverResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Registrations", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRendezvous
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthRendezvous
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Registrations = append(m.Registrations, &Message_Register{})
|
|
if err := m.Registrations[len(m.Registrations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Cookie", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRendezvous
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthRendezvous
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Cookie = append(m.Cookie[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.Cookie == nil {
|
|
m.Cookie = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
|
|
}
|
|
var v Message_ResponseStatus
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRendezvous
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= (Message_ResponseStatus(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.Status = &v
|
|
case 4:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field StatusText", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRendezvous
|
|
}
|
|
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 ErrInvalidLengthRendezvous
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
s := string(dAtA[iNdEx:postIndex])
|
|
m.StatusText = &s
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipRendezvous(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthRendezvous
|
|
}
|
|
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 skipRendezvous(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, ErrIntOverflowRendezvous
|
|
}
|
|
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, ErrIntOverflowRendezvous
|
|
}
|
|
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, ErrIntOverflowRendezvous
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
length |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
iNdEx += length
|
|
if length < 0 {
|
|
return 0, ErrInvalidLengthRendezvous
|
|
}
|
|
return iNdEx, nil
|
|
case 3:
|
|
for {
|
|
var innerWire uint64
|
|
var start int = iNdEx
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowRendezvous
|
|
}
|
|
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 := skipRendezvous(dAtA[start:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
iNdEx = start + next
|
|
}
|
|
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 (
|
|
ErrInvalidLengthRendezvous = fmt.Errorf("proto: negative length found during unmarshaling")
|
|
ErrIntOverflowRendezvous = fmt.Errorf("proto: integer overflow")
|
|
)
|
|
|
|
func init() { proto.RegisterFile("rendezvous.proto", fileDescriptor_rendezvous_af6820b250ca4668) }
|
|
|
|
var fileDescriptor_rendezvous_af6820b250ca4668 = []byte{
|
|
// 556 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x93, 0xc1, 0x72, 0xd2, 0x40,
|
|
0x18, 0xc7, 0x9b, 0x04, 0x30, 0x7c, 0x04, 0x66, 0xbb, 0xda, 0x91, 0xe1, 0x80, 0xc8, 0xd8, 0x91,
|
|
0x8b, 0x8c, 0x76, 0xa6, 0xde, 0x53, 0x58, 0x75, 0xa7, 0x34, 0x61, 0x36, 0x81, 0x83, 0x97, 0x0c,
|
|
0x36, 0x5b, 0x26, 0x5a, 0x09, 0x93, 0x0d, 0x1d, 0xeb, 0x53, 0xf8, 0x12, 0xde, 0xbc, 0xfa, 0x0e,
|
|
0x3d, 0xfa, 0x08, 0x0e, 0x57, 0x5f, 0xc2, 0x49, 0x42, 0x42, 0x60, 0xa4, 0x75, 0x7a, 0x4a, 0xf6,
|
|
0xdb, 0xff, 0xef, 0xfb, 0xfe, 0xfb, 0xcf, 0x06, 0x50, 0xc0, 0x67, 0x2e, 0xff, 0x7a, 0xe5, 0x2f,
|
|
0x44, 0x77, 0x1e, 0xf8, 0xa1, 0x8f, 0xab, 0xf9, 0xca, 0x87, 0xf6, 0x1f, 0x15, 0x1e, 0x9c, 0x71,
|
|
0x21, 0x26, 0x53, 0x8e, 0x5f, 0x42, 0x21, 0xbc, 0x9e, 0xf3, 0xba, 0xd4, 0x92, 0x3a, 0xb5, 0xa3,
|
|
0x76, 0x77, 0x43, 0xd9, 0x5d, 0xa9, 0xd2, 0xa7, 0x7d, 0x3d, 0xe7, 0xf8, 0x15, 0xa8, 0x01, 0x9f,
|
|
0x7a, 0x22, 0xe4, 0x41, 0x5d, 0x6e, 0x49, 0x9d, 0xca, 0xd1, 0x93, 0x1d, 0x14, 0x5b, 0xc9, 0xb0,
|
|
0x1e, 0x79, 0x4a, 0xde, 0x19, 0x17, 0x73, 0x7f, 0x26, 0x78, 0x5d, 0x89, 0xd1, 0xe7, 0x77, 0xa0,
|
|
0xa9, 0x1c, 0x1f, 0x03, 0x2c, 0x66, 0xd9, 0xdc, 0x42, 0x0c, 0x3f, 0xdd, 0x01, 0x8f, 0x32, 0x61,
|
|
0x64, 0xd6, 0xf5, 0xc4, 0xb9, 0x7f, 0xc5, 0x83, 0x7a, 0xf1, 0x56, 0xb3, 0xfd, 0x95, 0x2c, 0x32,
|
|
0x9b, 0x22, 0x99, 0xd9, 0xd2, 0xad, 0x66, 0xfb, 0x5b, 0xf2, 0xc6, 0x21, 0xa8, 0x43, 0xce, 0x03,
|
|
0x3a, 0xbb, 0xf0, 0x31, 0x80, 0xec, 0xb9, 0x71, 0xbc, 0x1a, 0xae, 0x42, 0x71, 0xe2, 0xba, 0x81,
|
|
0xa8, 0xcb, 0x2d, 0xa5, 0xa3, 0x35, 0x18, 0xa8, 0x59, 0x44, 0x00, 0xf2, 0x4c, 0xc4, 0xb2, 0x32,
|
|
0x7e, 0x01, 0x85, 0x39, 0xbf, 0x33, 0xdd, 0x6c, 0x42, 0x05, 0x94, 0x30, 0xbc, 0x8c, 0x03, 0x55,
|
|
0x1a, 0x1f, 0x01, 0xfd, 0x23, 0xbb, 0x92, 0x08, 0x27, 0xe1, 0x42, 0xac, 0xbe, 0xf2, 0xe1, 0xce,
|
|
0xd0, 0x13, 0xc0, 0x8a, 0xc5, 0x18, 0x03, 0x24, 0x98, 0xcd, 0xbf, 0x84, 0xb1, 0x99, 0xf2, 0xe6,
|
|
0xac, 0x67, 0x00, 0xb9, 0xa8, 0xf3, 0x27, 0x48, 0x0e, 0x1d, 0x21, 0x5a, 0xe3, 0x18, 0xd4, 0x2c,
|
|
0xdb, 0xbc, 0xa6, 0x0a, 0xc5, 0x4b, 0xef, 0xb3, 0x97, 0x74, 0x56, 0x70, 0x0d, 0x4a, 0xe7, 0xbe,
|
|
0xff, 0xc9, 0x4b, 0x6e, 0x86, 0xd6, 0xf8, 0x2e, 0x01, 0xda, 0x0e, 0x16, 0xbf, 0x86, 0x6a, 0x32,
|
|
0x2f, 0x98, 0x84, 0x9e, 0x1f, 0xb7, 0x52, 0xfe, 0xe7, 0x02, 0xae, 0x9b, 0xc7, 0x9e, 0x72, 0x89,
|
|
0x28, 0xf7, 0x4f, 0x24, 0xba, 0x84, 0xe5, 0xf6, 0x14, 0x2a, 0xf9, 0xbf, 0x43, 0x03, 0x95, 0x91,
|
|
0xb7, 0xd4, 0xb2, 0x09, 0x43, 0x7b, 0xf8, 0x00, 0xf6, 0xd3, 0x95, 0xc3, 0x88, 0x35, 0x34, 0x0d,
|
|
0x8b, 0x20, 0x09, 0xd7, 0x00, 0x46, 0x46, 0x26, 0x93, 0x23, 0xa8, 0x4f, 0xad, 0x9e, 0x39, 0x26,
|
|
0x0c, 0x29, 0x11, 0x94, 0xae, 0xd6, 0x50, 0xa1, 0xfd, 0x53, 0x82, 0xda, 0x96, 0x9f, 0x12, 0xc8,
|
|
0xe6, 0x29, 0xda, 0xc3, 0x8f, 0xe1, 0x21, 0x71, 0xa8, 0x31, 0xd6, 0x07, 0xb4, 0xef, 0x18, 0xfa,
|
|
0x19, 0xb1, 0x86, 0x7a, 0x8f, 0x20, 0x77, 0x73, 0x63, 0x48, 0x08, 0x73, 0xa8, 0xf1, 0xc6, 0x44,
|
|
0x1c, 0xef, 0x43, 0x75, 0xbd, 0x61, 0xdb, 0x03, 0x74, 0x81, 0x1f, 0x01, 0x5a, 0x97, 0x7a, 0xa6,
|
|
0x79, 0x4a, 0x09, 0x9a, 0xe2, 0x83, 0xa8, 0x6a, 0x98, 0xb6, 0xa3, 0x8f, 0xec, 0x77, 0x26, 0xa3,
|
|
0xef, 0x49, 0x1f, 0xdd, 0x48, 0x49, 0x99, 0x1a, 0x36, 0x61, 0x86, 0x3e, 0x70, 0x08, 0x63, 0x26,
|
|
0x43, 0x3f, 0x64, 0x8c, 0xa3, 0xb6, 0x23, 0x43, 0x1f, 0xeb, 0x74, 0xa0, 0x9f, 0x0c, 0x08, 0xfa,
|
|
0xa6, 0x9c, 0x68, 0x37, 0xcb, 0xa6, 0xf4, 0x6b, 0xd9, 0x94, 0x7e, 0x2f, 0x9b, 0xd2, 0xdf, 0x00,
|
|
0x00, 0x00, 0xff, 0xff, 0x26, 0x60, 0x8f, 0xe5, 0x9d, 0x04, 0x00, 0x00,
|
|
}
|