5376 lines
126 KiB
Go
5376 lines
126 KiB
Go
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
|
// source: p2pd.proto
|
|
|
|
package p2pd_pb
|
|
|
|
import proto "github.com/gogo/protobuf/proto"
|
|
import fmt "fmt"
|
|
import math "math"
|
|
|
|
import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto"
|
|
|
|
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 Request_Type int32
|
|
|
|
const (
|
|
Request_IDENTIFY Request_Type = 0
|
|
Request_CONNECT Request_Type = 1
|
|
Request_STREAM_OPEN Request_Type = 2
|
|
Request_STREAM_HANDLER Request_Type = 3
|
|
Request_DHT Request_Type = 4
|
|
Request_LIST_PEERS Request_Type = 5
|
|
Request_CONNMANAGER Request_Type = 6
|
|
Request_DISCONNECT Request_Type = 7
|
|
Request_PUBSUB Request_Type = 8
|
|
)
|
|
|
|
var Request_Type_name = map[int32]string{
|
|
0: "IDENTIFY",
|
|
1: "CONNECT",
|
|
2: "STREAM_OPEN",
|
|
3: "STREAM_HANDLER",
|
|
4: "DHT",
|
|
5: "LIST_PEERS",
|
|
6: "CONNMANAGER",
|
|
7: "DISCONNECT",
|
|
8: "PUBSUB",
|
|
}
|
|
var Request_Type_value = map[string]int32{
|
|
"IDENTIFY": 0,
|
|
"CONNECT": 1,
|
|
"STREAM_OPEN": 2,
|
|
"STREAM_HANDLER": 3,
|
|
"DHT": 4,
|
|
"LIST_PEERS": 5,
|
|
"CONNMANAGER": 6,
|
|
"DISCONNECT": 7,
|
|
"PUBSUB": 8,
|
|
}
|
|
|
|
func (x Request_Type) Enum() *Request_Type {
|
|
p := new(Request_Type)
|
|
*p = x
|
|
return p
|
|
}
|
|
func (x Request_Type) String() string {
|
|
return proto.EnumName(Request_Type_name, int32(x))
|
|
}
|
|
func (x *Request_Type) UnmarshalJSON(data []byte) error {
|
|
value, err := proto.UnmarshalJSONEnum(Request_Type_value, data, "Request_Type")
|
|
if err != nil {
|
|
return err
|
|
}
|
|
*x = Request_Type(value)
|
|
return nil
|
|
}
|
|
func (Request_Type) EnumDescriptor() ([]byte, []int) {
|
|
return fileDescriptor_p2pd_9a5e2158cc01bafa, []int{0, 0}
|
|
}
|
|
|
|
type Response_Type int32
|
|
|
|
const (
|
|
Response_OK Response_Type = 0
|
|
Response_ERROR Response_Type = 1
|
|
)
|
|
|
|
var Response_Type_name = map[int32]string{
|
|
0: "OK",
|
|
1: "ERROR",
|
|
}
|
|
var Response_Type_value = map[string]int32{
|
|
"OK": 0,
|
|
"ERROR": 1,
|
|
}
|
|
|
|
func (x Response_Type) Enum() *Response_Type {
|
|
p := new(Response_Type)
|
|
*p = x
|
|
return p
|
|
}
|
|
func (x Response_Type) String() string {
|
|
return proto.EnumName(Response_Type_name, int32(x))
|
|
}
|
|
func (x *Response_Type) UnmarshalJSON(data []byte) error {
|
|
value, err := proto.UnmarshalJSONEnum(Response_Type_value, data, "Response_Type")
|
|
if err != nil {
|
|
return err
|
|
}
|
|
*x = Response_Type(value)
|
|
return nil
|
|
}
|
|
func (Response_Type) EnumDescriptor() ([]byte, []int) {
|
|
return fileDescriptor_p2pd_9a5e2158cc01bafa, []int{1, 0}
|
|
}
|
|
|
|
type DHTRequest_Type int32
|
|
|
|
const (
|
|
DHTRequest_FIND_PEER DHTRequest_Type = 0
|
|
DHTRequest_FIND_PEERS_CONNECTED_TO_PEER DHTRequest_Type = 1
|
|
DHTRequest_FIND_PROVIDERS DHTRequest_Type = 2
|
|
DHTRequest_GET_CLOSEST_PEERS DHTRequest_Type = 3
|
|
DHTRequest_GET_PUBLIC_KEY DHTRequest_Type = 4
|
|
DHTRequest_GET_VALUE DHTRequest_Type = 5
|
|
DHTRequest_SEARCH_VALUE DHTRequest_Type = 6
|
|
DHTRequest_PUT_VALUE DHTRequest_Type = 7
|
|
DHTRequest_PROVIDE DHTRequest_Type = 8
|
|
)
|
|
|
|
var DHTRequest_Type_name = map[int32]string{
|
|
0: "FIND_PEER",
|
|
1: "FIND_PEERS_CONNECTED_TO_PEER",
|
|
2: "FIND_PROVIDERS",
|
|
3: "GET_CLOSEST_PEERS",
|
|
4: "GET_PUBLIC_KEY",
|
|
5: "GET_VALUE",
|
|
6: "SEARCH_VALUE",
|
|
7: "PUT_VALUE",
|
|
8: "PROVIDE",
|
|
}
|
|
var DHTRequest_Type_value = map[string]int32{
|
|
"FIND_PEER": 0,
|
|
"FIND_PEERS_CONNECTED_TO_PEER": 1,
|
|
"FIND_PROVIDERS": 2,
|
|
"GET_CLOSEST_PEERS": 3,
|
|
"GET_PUBLIC_KEY": 4,
|
|
"GET_VALUE": 5,
|
|
"SEARCH_VALUE": 6,
|
|
"PUT_VALUE": 7,
|
|
"PROVIDE": 8,
|
|
}
|
|
|
|
func (x DHTRequest_Type) Enum() *DHTRequest_Type {
|
|
p := new(DHTRequest_Type)
|
|
*p = x
|
|
return p
|
|
}
|
|
func (x DHTRequest_Type) String() string {
|
|
return proto.EnumName(DHTRequest_Type_name, int32(x))
|
|
}
|
|
func (x *DHTRequest_Type) UnmarshalJSON(data []byte) error {
|
|
value, err := proto.UnmarshalJSONEnum(DHTRequest_Type_value, data, "DHTRequest_Type")
|
|
if err != nil {
|
|
return err
|
|
}
|
|
*x = DHTRequest_Type(value)
|
|
return nil
|
|
}
|
|
func (DHTRequest_Type) EnumDescriptor() ([]byte, []int) {
|
|
return fileDescriptor_p2pd_9a5e2158cc01bafa, []int{8, 0}
|
|
}
|
|
|
|
type DHTResponse_Type int32
|
|
|
|
const (
|
|
DHTResponse_BEGIN DHTResponse_Type = 0
|
|
DHTResponse_VALUE DHTResponse_Type = 1
|
|
DHTResponse_END DHTResponse_Type = 2
|
|
)
|
|
|
|
var DHTResponse_Type_name = map[int32]string{
|
|
0: "BEGIN",
|
|
1: "VALUE",
|
|
2: "END",
|
|
}
|
|
var DHTResponse_Type_value = map[string]int32{
|
|
"BEGIN": 0,
|
|
"VALUE": 1,
|
|
"END": 2,
|
|
}
|
|
|
|
func (x DHTResponse_Type) Enum() *DHTResponse_Type {
|
|
p := new(DHTResponse_Type)
|
|
*p = x
|
|
return p
|
|
}
|
|
func (x DHTResponse_Type) String() string {
|
|
return proto.EnumName(DHTResponse_Type_name, int32(x))
|
|
}
|
|
func (x *DHTResponse_Type) UnmarshalJSON(data []byte) error {
|
|
value, err := proto.UnmarshalJSONEnum(DHTResponse_Type_value, data, "DHTResponse_Type")
|
|
if err != nil {
|
|
return err
|
|
}
|
|
*x = DHTResponse_Type(value)
|
|
return nil
|
|
}
|
|
func (DHTResponse_Type) EnumDescriptor() ([]byte, []int) {
|
|
return fileDescriptor_p2pd_9a5e2158cc01bafa, []int{9, 0}
|
|
}
|
|
|
|
type ConnManagerRequest_Type int32
|
|
|
|
const (
|
|
ConnManagerRequest_TAG_PEER ConnManagerRequest_Type = 0
|
|
ConnManagerRequest_UNTAG_PEER ConnManagerRequest_Type = 1
|
|
ConnManagerRequest_TRIM ConnManagerRequest_Type = 2
|
|
)
|
|
|
|
var ConnManagerRequest_Type_name = map[int32]string{
|
|
0: "TAG_PEER",
|
|
1: "UNTAG_PEER",
|
|
2: "TRIM",
|
|
}
|
|
var ConnManagerRequest_Type_value = map[string]int32{
|
|
"TAG_PEER": 0,
|
|
"UNTAG_PEER": 1,
|
|
"TRIM": 2,
|
|
}
|
|
|
|
func (x ConnManagerRequest_Type) Enum() *ConnManagerRequest_Type {
|
|
p := new(ConnManagerRequest_Type)
|
|
*p = x
|
|
return p
|
|
}
|
|
func (x ConnManagerRequest_Type) String() string {
|
|
return proto.EnumName(ConnManagerRequest_Type_name, int32(x))
|
|
}
|
|
func (x *ConnManagerRequest_Type) UnmarshalJSON(data []byte) error {
|
|
value, err := proto.UnmarshalJSONEnum(ConnManagerRequest_Type_value, data, "ConnManagerRequest_Type")
|
|
if err != nil {
|
|
return err
|
|
}
|
|
*x = ConnManagerRequest_Type(value)
|
|
return nil
|
|
}
|
|
func (ConnManagerRequest_Type) EnumDescriptor() ([]byte, []int) {
|
|
return fileDescriptor_p2pd_9a5e2158cc01bafa, []int{11, 0}
|
|
}
|
|
|
|
type PSRequest_Type int32
|
|
|
|
const (
|
|
PSRequest_GET_TOPICS PSRequest_Type = 0
|
|
PSRequest_LIST_PEERS PSRequest_Type = 1
|
|
PSRequest_PUBLISH PSRequest_Type = 2
|
|
PSRequest_SUBSCRIBE PSRequest_Type = 3
|
|
)
|
|
|
|
var PSRequest_Type_name = map[int32]string{
|
|
0: "GET_TOPICS",
|
|
1: "LIST_PEERS",
|
|
2: "PUBLISH",
|
|
3: "SUBSCRIBE",
|
|
}
|
|
var PSRequest_Type_value = map[string]int32{
|
|
"GET_TOPICS": 0,
|
|
"LIST_PEERS": 1,
|
|
"PUBLISH": 2,
|
|
"SUBSCRIBE": 3,
|
|
}
|
|
|
|
func (x PSRequest_Type) Enum() *PSRequest_Type {
|
|
p := new(PSRequest_Type)
|
|
*p = x
|
|
return p
|
|
}
|
|
func (x PSRequest_Type) String() string {
|
|
return proto.EnumName(PSRequest_Type_name, int32(x))
|
|
}
|
|
func (x *PSRequest_Type) UnmarshalJSON(data []byte) error {
|
|
value, err := proto.UnmarshalJSONEnum(PSRequest_Type_value, data, "PSRequest_Type")
|
|
if err != nil {
|
|
return err
|
|
}
|
|
*x = PSRequest_Type(value)
|
|
return nil
|
|
}
|
|
func (PSRequest_Type) EnumDescriptor() ([]byte, []int) {
|
|
return fileDescriptor_p2pd_9a5e2158cc01bafa, []int{13, 0}
|
|
}
|
|
|
|
type Request struct {
|
|
Type *Request_Type `protobuf:"varint,1,req,name=type,enum=p2pd.pb.Request_Type" json:"type,omitempty"`
|
|
Connect *ConnectRequest `protobuf:"bytes,2,opt,name=connect" json:"connect,omitempty"`
|
|
StreamOpen *StreamOpenRequest `protobuf:"bytes,3,opt,name=streamOpen" json:"streamOpen,omitempty"`
|
|
StreamHandler *StreamHandlerRequest `protobuf:"bytes,4,opt,name=streamHandler" json:"streamHandler,omitempty"`
|
|
Dht *DHTRequest `protobuf:"bytes,5,opt,name=dht" json:"dht,omitempty"`
|
|
ConnManager *ConnManagerRequest `protobuf:"bytes,6,opt,name=connManager" json:"connManager,omitempty"`
|
|
Disconnect *DisconnectRequest `protobuf:"bytes,7,opt,name=disconnect" json:"disconnect,omitempty"`
|
|
Pubsub *PSRequest `protobuf:"bytes,8,opt,name=pubsub" json:"pubsub,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *Request) Reset() { *m = Request{} }
|
|
func (m *Request) String() string { return proto.CompactTextString(m) }
|
|
func (*Request) ProtoMessage() {}
|
|
func (*Request) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_p2pd_9a5e2158cc01bafa, []int{0}
|
|
}
|
|
func (m *Request) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_Request.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 *Request) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Request.Merge(dst, src)
|
|
}
|
|
func (m *Request) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *Request) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Request.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Request proto.InternalMessageInfo
|
|
|
|
func (m *Request) GetType() Request_Type {
|
|
if m != nil && m.Type != nil {
|
|
return *m.Type
|
|
}
|
|
return Request_IDENTIFY
|
|
}
|
|
|
|
func (m *Request) GetConnect() *ConnectRequest {
|
|
if m != nil {
|
|
return m.Connect
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Request) GetStreamOpen() *StreamOpenRequest {
|
|
if m != nil {
|
|
return m.StreamOpen
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Request) GetStreamHandler() *StreamHandlerRequest {
|
|
if m != nil {
|
|
return m.StreamHandler
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Request) GetDht() *DHTRequest {
|
|
if m != nil {
|
|
return m.Dht
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Request) GetConnManager() *ConnManagerRequest {
|
|
if m != nil {
|
|
return m.ConnManager
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Request) GetDisconnect() *DisconnectRequest {
|
|
if m != nil {
|
|
return m.Disconnect
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Request) GetPubsub() *PSRequest {
|
|
if m != nil {
|
|
return m.Pubsub
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type Response struct {
|
|
Type *Response_Type `protobuf:"varint,1,req,name=type,enum=p2pd.pb.Response_Type" json:"type,omitempty"`
|
|
Error *ErrorResponse `protobuf:"bytes,2,opt,name=error" json:"error,omitempty"`
|
|
StreamInfo *StreamInfo `protobuf:"bytes,3,opt,name=streamInfo" json:"streamInfo,omitempty"`
|
|
Identify *IdentifyResponse `protobuf:"bytes,4,opt,name=identify" json:"identify,omitempty"`
|
|
Dht *DHTResponse `protobuf:"bytes,5,opt,name=dht" json:"dht,omitempty"`
|
|
Peers []*PeerInfo `protobuf:"bytes,6,rep,name=peers" json:"peers,omitempty"`
|
|
Pubsub *PSResponse `protobuf:"bytes,7,opt,name=pubsub" json:"pubsub,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *Response) Reset() { *m = Response{} }
|
|
func (m *Response) String() string { return proto.CompactTextString(m) }
|
|
func (*Response) ProtoMessage() {}
|
|
func (*Response) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_p2pd_9a5e2158cc01bafa, []int{1}
|
|
}
|
|
func (m *Response) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_Response.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 *Response) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Response.Merge(dst, src)
|
|
}
|
|
func (m *Response) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *Response) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Response.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Response proto.InternalMessageInfo
|
|
|
|
func (m *Response) GetType() Response_Type {
|
|
if m != nil && m.Type != nil {
|
|
return *m.Type
|
|
}
|
|
return Response_OK
|
|
}
|
|
|
|
func (m *Response) GetError() *ErrorResponse {
|
|
if m != nil {
|
|
return m.Error
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Response) GetStreamInfo() *StreamInfo {
|
|
if m != nil {
|
|
return m.StreamInfo
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Response) GetIdentify() *IdentifyResponse {
|
|
if m != nil {
|
|
return m.Identify
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Response) GetDht() *DHTResponse {
|
|
if m != nil {
|
|
return m.Dht
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Response) GetPeers() []*PeerInfo {
|
|
if m != nil {
|
|
return m.Peers
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Response) GetPubsub() *PSResponse {
|
|
if m != nil {
|
|
return m.Pubsub
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type IdentifyResponse struct {
|
|
Id []byte `protobuf:"bytes,1,req,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 *IdentifyResponse) Reset() { *m = IdentifyResponse{} }
|
|
func (m *IdentifyResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*IdentifyResponse) ProtoMessage() {}
|
|
func (*IdentifyResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_p2pd_9a5e2158cc01bafa, []int{2}
|
|
}
|
|
func (m *IdentifyResponse) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *IdentifyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_IdentifyResponse.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 *IdentifyResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_IdentifyResponse.Merge(dst, src)
|
|
}
|
|
func (m *IdentifyResponse) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *IdentifyResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_IdentifyResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_IdentifyResponse proto.InternalMessageInfo
|
|
|
|
func (m *IdentifyResponse) GetId() []byte {
|
|
if m != nil {
|
|
return m.Id
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *IdentifyResponse) GetAddrs() [][]byte {
|
|
if m != nil {
|
|
return m.Addrs
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type ConnectRequest struct {
|
|
Peer []byte `protobuf:"bytes,1,req,name=peer" json:"peer,omitempty"`
|
|
Addrs [][]byte `protobuf:"bytes,2,rep,name=addrs" json:"addrs,omitempty"`
|
|
Timeout *int64 `protobuf:"varint,3,opt,name=timeout" json:"timeout,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *ConnectRequest) Reset() { *m = ConnectRequest{} }
|
|
func (m *ConnectRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*ConnectRequest) ProtoMessage() {}
|
|
func (*ConnectRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_p2pd_9a5e2158cc01bafa, []int{3}
|
|
}
|
|
func (m *ConnectRequest) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *ConnectRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_ConnectRequest.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 *ConnectRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ConnectRequest.Merge(dst, src)
|
|
}
|
|
func (m *ConnectRequest) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *ConnectRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ConnectRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ConnectRequest proto.InternalMessageInfo
|
|
|
|
func (m *ConnectRequest) GetPeer() []byte {
|
|
if m != nil {
|
|
return m.Peer
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ConnectRequest) GetAddrs() [][]byte {
|
|
if m != nil {
|
|
return m.Addrs
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ConnectRequest) GetTimeout() int64 {
|
|
if m != nil && m.Timeout != nil {
|
|
return *m.Timeout
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type StreamOpenRequest struct {
|
|
Peer []byte `protobuf:"bytes,1,req,name=peer" json:"peer,omitempty"`
|
|
Proto []string `protobuf:"bytes,2,rep,name=proto" json:"proto,omitempty"`
|
|
Timeout *int64 `protobuf:"varint,3,opt,name=timeout" json:"timeout,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *StreamOpenRequest) Reset() { *m = StreamOpenRequest{} }
|
|
func (m *StreamOpenRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*StreamOpenRequest) ProtoMessage() {}
|
|
func (*StreamOpenRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_p2pd_9a5e2158cc01bafa, []int{4}
|
|
}
|
|
func (m *StreamOpenRequest) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *StreamOpenRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_StreamOpenRequest.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 *StreamOpenRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_StreamOpenRequest.Merge(dst, src)
|
|
}
|
|
func (m *StreamOpenRequest) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *StreamOpenRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_StreamOpenRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_StreamOpenRequest proto.InternalMessageInfo
|
|
|
|
func (m *StreamOpenRequest) GetPeer() []byte {
|
|
if m != nil {
|
|
return m.Peer
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *StreamOpenRequest) GetProto() []string {
|
|
if m != nil {
|
|
return m.Proto
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *StreamOpenRequest) GetTimeout() int64 {
|
|
if m != nil && m.Timeout != nil {
|
|
return *m.Timeout
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type StreamHandlerRequest struct {
|
|
Addr []byte `protobuf:"bytes,1,req,name=addr" json:"addr,omitempty"`
|
|
Proto []string `protobuf:"bytes,2,rep,name=proto" json:"proto,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *StreamHandlerRequest) Reset() { *m = StreamHandlerRequest{} }
|
|
func (m *StreamHandlerRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*StreamHandlerRequest) ProtoMessage() {}
|
|
func (*StreamHandlerRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_p2pd_9a5e2158cc01bafa, []int{5}
|
|
}
|
|
func (m *StreamHandlerRequest) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *StreamHandlerRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_StreamHandlerRequest.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 *StreamHandlerRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_StreamHandlerRequest.Merge(dst, src)
|
|
}
|
|
func (m *StreamHandlerRequest) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *StreamHandlerRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_StreamHandlerRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_StreamHandlerRequest proto.InternalMessageInfo
|
|
|
|
func (m *StreamHandlerRequest) GetAddr() []byte {
|
|
if m != nil {
|
|
return m.Addr
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *StreamHandlerRequest) GetProto() []string {
|
|
if m != nil {
|
|
return m.Proto
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type ErrorResponse struct {
|
|
Msg *string `protobuf:"bytes,1,req,name=msg" json:"msg,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *ErrorResponse) Reset() { *m = ErrorResponse{} }
|
|
func (m *ErrorResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*ErrorResponse) ProtoMessage() {}
|
|
func (*ErrorResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_p2pd_9a5e2158cc01bafa, []int{6}
|
|
}
|
|
func (m *ErrorResponse) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *ErrorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_ErrorResponse.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 *ErrorResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ErrorResponse.Merge(dst, src)
|
|
}
|
|
func (m *ErrorResponse) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *ErrorResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ErrorResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ErrorResponse proto.InternalMessageInfo
|
|
|
|
func (m *ErrorResponse) GetMsg() string {
|
|
if m != nil && m.Msg != nil {
|
|
return *m.Msg
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type StreamInfo struct {
|
|
Peer []byte `protobuf:"bytes,1,req,name=peer" json:"peer,omitempty"`
|
|
Addr []byte `protobuf:"bytes,2,req,name=addr" json:"addr,omitempty"`
|
|
Proto *string `protobuf:"bytes,3,req,name=proto" json:"proto,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *StreamInfo) Reset() { *m = StreamInfo{} }
|
|
func (m *StreamInfo) String() string { return proto.CompactTextString(m) }
|
|
func (*StreamInfo) ProtoMessage() {}
|
|
func (*StreamInfo) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_p2pd_9a5e2158cc01bafa, []int{7}
|
|
}
|
|
func (m *StreamInfo) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *StreamInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_StreamInfo.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 *StreamInfo) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_StreamInfo.Merge(dst, src)
|
|
}
|
|
func (m *StreamInfo) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *StreamInfo) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_StreamInfo.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_StreamInfo proto.InternalMessageInfo
|
|
|
|
func (m *StreamInfo) GetPeer() []byte {
|
|
if m != nil {
|
|
return m.Peer
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *StreamInfo) GetAddr() []byte {
|
|
if m != nil {
|
|
return m.Addr
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *StreamInfo) GetProto() string {
|
|
if m != nil && m.Proto != nil {
|
|
return *m.Proto
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type DHTRequest struct {
|
|
Type *DHTRequest_Type `protobuf:"varint,1,req,name=type,enum=p2pd.pb.DHTRequest_Type" json:"type,omitempty"`
|
|
Peer []byte `protobuf:"bytes,2,opt,name=peer" json:"peer,omitempty"`
|
|
Cid []byte `protobuf:"bytes,3,opt,name=cid" json:"cid,omitempty"`
|
|
Key []byte `protobuf:"bytes,4,opt,name=key" json:"key,omitempty"`
|
|
Value []byte `protobuf:"bytes,5,opt,name=value" json:"value,omitempty"`
|
|
Count *int32 `protobuf:"varint,6,opt,name=count" json:"count,omitempty"`
|
|
Timeout *int64 `protobuf:"varint,7,opt,name=timeout" json:"timeout,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *DHTRequest) Reset() { *m = DHTRequest{} }
|
|
func (m *DHTRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*DHTRequest) ProtoMessage() {}
|
|
func (*DHTRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_p2pd_9a5e2158cc01bafa, []int{8}
|
|
}
|
|
func (m *DHTRequest) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *DHTRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_DHTRequest.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 *DHTRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_DHTRequest.Merge(dst, src)
|
|
}
|
|
func (m *DHTRequest) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *DHTRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_DHTRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_DHTRequest proto.InternalMessageInfo
|
|
|
|
func (m *DHTRequest) GetType() DHTRequest_Type {
|
|
if m != nil && m.Type != nil {
|
|
return *m.Type
|
|
}
|
|
return DHTRequest_FIND_PEER
|
|
}
|
|
|
|
func (m *DHTRequest) GetPeer() []byte {
|
|
if m != nil {
|
|
return m.Peer
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *DHTRequest) GetCid() []byte {
|
|
if m != nil {
|
|
return m.Cid
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *DHTRequest) GetKey() []byte {
|
|
if m != nil {
|
|
return m.Key
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *DHTRequest) GetValue() []byte {
|
|
if m != nil {
|
|
return m.Value
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *DHTRequest) GetCount() int32 {
|
|
if m != nil && m.Count != nil {
|
|
return *m.Count
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *DHTRequest) GetTimeout() int64 {
|
|
if m != nil && m.Timeout != nil {
|
|
return *m.Timeout
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type DHTResponse struct {
|
|
Type *DHTResponse_Type `protobuf:"varint,1,req,name=type,enum=p2pd.pb.DHTResponse_Type" json:"type,omitempty"`
|
|
Peer *PeerInfo `protobuf:"bytes,2,opt,name=peer" json:"peer,omitempty"`
|
|
Value []byte `protobuf:"bytes,3,opt,name=value" json:"value,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *DHTResponse) Reset() { *m = DHTResponse{} }
|
|
func (m *DHTResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*DHTResponse) ProtoMessage() {}
|
|
func (*DHTResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_p2pd_9a5e2158cc01bafa, []int{9}
|
|
}
|
|
func (m *DHTResponse) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *DHTResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_DHTResponse.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 *DHTResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_DHTResponse.Merge(dst, src)
|
|
}
|
|
func (m *DHTResponse) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *DHTResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_DHTResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_DHTResponse proto.InternalMessageInfo
|
|
|
|
func (m *DHTResponse) GetType() DHTResponse_Type {
|
|
if m != nil && m.Type != nil {
|
|
return *m.Type
|
|
}
|
|
return DHTResponse_BEGIN
|
|
}
|
|
|
|
func (m *DHTResponse) GetPeer() *PeerInfo {
|
|
if m != nil {
|
|
return m.Peer
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *DHTResponse) GetValue() []byte {
|
|
if m != nil {
|
|
return m.Value
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type PeerInfo struct {
|
|
Id []byte `protobuf:"bytes,1,req,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 *PeerInfo) Reset() { *m = PeerInfo{} }
|
|
func (m *PeerInfo) String() string { return proto.CompactTextString(m) }
|
|
func (*PeerInfo) ProtoMessage() {}
|
|
func (*PeerInfo) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_p2pd_9a5e2158cc01bafa, []int{10}
|
|
}
|
|
func (m *PeerInfo) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *PeerInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_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 *PeerInfo) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_PeerInfo.Merge(dst, src)
|
|
}
|
|
func (m *PeerInfo) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *PeerInfo) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_PeerInfo.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_PeerInfo proto.InternalMessageInfo
|
|
|
|
func (m *PeerInfo) GetId() []byte {
|
|
if m != nil {
|
|
return m.Id
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *PeerInfo) GetAddrs() [][]byte {
|
|
if m != nil {
|
|
return m.Addrs
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type ConnManagerRequest struct {
|
|
Type *ConnManagerRequest_Type `protobuf:"varint,1,req,name=type,enum=p2pd.pb.ConnManagerRequest_Type" json:"type,omitempty"`
|
|
Peer []byte `protobuf:"bytes,2,opt,name=peer" json:"peer,omitempty"`
|
|
Tag *string `protobuf:"bytes,3,opt,name=tag" json:"tag,omitempty"`
|
|
Weight *int64 `protobuf:"varint,4,opt,name=weight" json:"weight,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *ConnManagerRequest) Reset() { *m = ConnManagerRequest{} }
|
|
func (m *ConnManagerRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*ConnManagerRequest) ProtoMessage() {}
|
|
func (*ConnManagerRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_p2pd_9a5e2158cc01bafa, []int{11}
|
|
}
|
|
func (m *ConnManagerRequest) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *ConnManagerRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_ConnManagerRequest.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 *ConnManagerRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ConnManagerRequest.Merge(dst, src)
|
|
}
|
|
func (m *ConnManagerRequest) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *ConnManagerRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ConnManagerRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ConnManagerRequest proto.InternalMessageInfo
|
|
|
|
func (m *ConnManagerRequest) GetType() ConnManagerRequest_Type {
|
|
if m != nil && m.Type != nil {
|
|
return *m.Type
|
|
}
|
|
return ConnManagerRequest_TAG_PEER
|
|
}
|
|
|
|
func (m *ConnManagerRequest) GetPeer() []byte {
|
|
if m != nil {
|
|
return m.Peer
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ConnManagerRequest) GetTag() string {
|
|
if m != nil && m.Tag != nil {
|
|
return *m.Tag
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *ConnManagerRequest) GetWeight() int64 {
|
|
if m != nil && m.Weight != nil {
|
|
return *m.Weight
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type DisconnectRequest struct {
|
|
Peer []byte `protobuf:"bytes,1,req,name=peer" json:"peer,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *DisconnectRequest) Reset() { *m = DisconnectRequest{} }
|
|
func (m *DisconnectRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*DisconnectRequest) ProtoMessage() {}
|
|
func (*DisconnectRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_p2pd_9a5e2158cc01bafa, []int{12}
|
|
}
|
|
func (m *DisconnectRequest) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *DisconnectRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_DisconnectRequest.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 *DisconnectRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_DisconnectRequest.Merge(dst, src)
|
|
}
|
|
func (m *DisconnectRequest) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *DisconnectRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_DisconnectRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_DisconnectRequest proto.InternalMessageInfo
|
|
|
|
func (m *DisconnectRequest) GetPeer() []byte {
|
|
if m != nil {
|
|
return m.Peer
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type PSRequest struct {
|
|
Type *PSRequest_Type `protobuf:"varint,1,req,name=type,enum=p2pd.pb.PSRequest_Type" json:"type,omitempty"`
|
|
Topic *string `protobuf:"bytes,2,opt,name=topic" json:"topic,omitempty"`
|
|
Data []byte `protobuf:"bytes,3,opt,name=data" json:"data,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *PSRequest) Reset() { *m = PSRequest{} }
|
|
func (m *PSRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*PSRequest) ProtoMessage() {}
|
|
func (*PSRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_p2pd_9a5e2158cc01bafa, []int{13}
|
|
}
|
|
func (m *PSRequest) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *PSRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_PSRequest.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 *PSRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_PSRequest.Merge(dst, src)
|
|
}
|
|
func (m *PSRequest) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *PSRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_PSRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_PSRequest proto.InternalMessageInfo
|
|
|
|
func (m *PSRequest) GetType() PSRequest_Type {
|
|
if m != nil && m.Type != nil {
|
|
return *m.Type
|
|
}
|
|
return PSRequest_GET_TOPICS
|
|
}
|
|
|
|
func (m *PSRequest) GetTopic() string {
|
|
if m != nil && m.Topic != nil {
|
|
return *m.Topic
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *PSRequest) GetData() []byte {
|
|
if m != nil {
|
|
return m.Data
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type PSMessage struct {
|
|
From []byte `protobuf:"bytes,1,opt,name=from" json:"from,omitempty"`
|
|
Data []byte `protobuf:"bytes,2,opt,name=data" json:"data,omitempty"`
|
|
Seqno []byte `protobuf:"bytes,3,opt,name=seqno" json:"seqno,omitempty"`
|
|
TopicIDs []string `protobuf:"bytes,4,rep,name=topicIDs" json:"topicIDs,omitempty"`
|
|
Signature []byte `protobuf:"bytes,5,opt,name=signature" json:"signature,omitempty"`
|
|
Key []byte `protobuf:"bytes,6,opt,name=key" json:"key,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *PSMessage) Reset() { *m = PSMessage{} }
|
|
func (m *PSMessage) String() string { return proto.CompactTextString(m) }
|
|
func (*PSMessage) ProtoMessage() {}
|
|
func (*PSMessage) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_p2pd_9a5e2158cc01bafa, []int{14}
|
|
}
|
|
func (m *PSMessage) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *PSMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_PSMessage.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 *PSMessage) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_PSMessage.Merge(dst, src)
|
|
}
|
|
func (m *PSMessage) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *PSMessage) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_PSMessage.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_PSMessage proto.InternalMessageInfo
|
|
|
|
func (m *PSMessage) GetFrom() []byte {
|
|
if m != nil {
|
|
return m.From
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *PSMessage) GetData() []byte {
|
|
if m != nil {
|
|
return m.Data
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *PSMessage) GetSeqno() []byte {
|
|
if m != nil {
|
|
return m.Seqno
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *PSMessage) GetTopicIDs() []string {
|
|
if m != nil {
|
|
return m.TopicIDs
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *PSMessage) GetSignature() []byte {
|
|
if m != nil {
|
|
return m.Signature
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *PSMessage) GetKey() []byte {
|
|
if m != nil {
|
|
return m.Key
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type PSResponse struct {
|
|
Topics []string `protobuf:"bytes,1,rep,name=topics" json:"topics,omitempty"`
|
|
PeerIDs [][]byte `protobuf:"bytes,2,rep,name=peerIDs" json:"peerIDs,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *PSResponse) Reset() { *m = PSResponse{} }
|
|
func (m *PSResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*PSResponse) ProtoMessage() {}
|
|
func (*PSResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_p2pd_9a5e2158cc01bafa, []int{15}
|
|
}
|
|
func (m *PSResponse) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *PSResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_PSResponse.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 *PSResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_PSResponse.Merge(dst, src)
|
|
}
|
|
func (m *PSResponse) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *PSResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_PSResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_PSResponse proto.InternalMessageInfo
|
|
|
|
func (m *PSResponse) GetTopics() []string {
|
|
if m != nil {
|
|
return m.Topics
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *PSResponse) GetPeerIDs() [][]byte {
|
|
if m != nil {
|
|
return m.PeerIDs
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*Request)(nil), "p2pd.pb.Request")
|
|
proto.RegisterType((*Response)(nil), "p2pd.pb.Response")
|
|
proto.RegisterType((*IdentifyResponse)(nil), "p2pd.pb.IdentifyResponse")
|
|
proto.RegisterType((*ConnectRequest)(nil), "p2pd.pb.ConnectRequest")
|
|
proto.RegisterType((*StreamOpenRequest)(nil), "p2pd.pb.StreamOpenRequest")
|
|
proto.RegisterType((*StreamHandlerRequest)(nil), "p2pd.pb.StreamHandlerRequest")
|
|
proto.RegisterType((*ErrorResponse)(nil), "p2pd.pb.ErrorResponse")
|
|
proto.RegisterType((*StreamInfo)(nil), "p2pd.pb.StreamInfo")
|
|
proto.RegisterType((*DHTRequest)(nil), "p2pd.pb.DHTRequest")
|
|
proto.RegisterType((*DHTResponse)(nil), "p2pd.pb.DHTResponse")
|
|
proto.RegisterType((*PeerInfo)(nil), "p2pd.pb.PeerInfo")
|
|
proto.RegisterType((*ConnManagerRequest)(nil), "p2pd.pb.ConnManagerRequest")
|
|
proto.RegisterType((*DisconnectRequest)(nil), "p2pd.pb.DisconnectRequest")
|
|
proto.RegisterType((*PSRequest)(nil), "p2pd.pb.PSRequest")
|
|
proto.RegisterType((*PSMessage)(nil), "p2pd.pb.PSMessage")
|
|
proto.RegisterType((*PSResponse)(nil), "p2pd.pb.PSResponse")
|
|
proto.RegisterEnum("p2pd.pb.Request_Type", Request_Type_name, Request_Type_value)
|
|
proto.RegisterEnum("p2pd.pb.Response_Type", Response_Type_name, Response_Type_value)
|
|
proto.RegisterEnum("p2pd.pb.DHTRequest_Type", DHTRequest_Type_name, DHTRequest_Type_value)
|
|
proto.RegisterEnum("p2pd.pb.DHTResponse_Type", DHTResponse_Type_name, DHTResponse_Type_value)
|
|
proto.RegisterEnum("p2pd.pb.ConnManagerRequest_Type", ConnManagerRequest_Type_name, ConnManagerRequest_Type_value)
|
|
proto.RegisterEnum("p2pd.pb.PSRequest_Type", PSRequest_Type_name, PSRequest_Type_value)
|
|
}
|
|
func (m *Request) 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 *Request) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Type == nil {
|
|
return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("type")
|
|
} else {
|
|
dAtA[i] = 0x8
|
|
i++
|
|
i = encodeVarintP2Pd(dAtA, i, uint64(*m.Type))
|
|
}
|
|
if m.Connect != nil {
|
|
dAtA[i] = 0x12
|
|
i++
|
|
i = encodeVarintP2Pd(dAtA, i, uint64(m.Connect.Size()))
|
|
n1, err := m.Connect.MarshalTo(dAtA[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n1
|
|
}
|
|
if m.StreamOpen != nil {
|
|
dAtA[i] = 0x1a
|
|
i++
|
|
i = encodeVarintP2Pd(dAtA, i, uint64(m.StreamOpen.Size()))
|
|
n2, err := m.StreamOpen.MarshalTo(dAtA[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n2
|
|
}
|
|
if m.StreamHandler != nil {
|
|
dAtA[i] = 0x22
|
|
i++
|
|
i = encodeVarintP2Pd(dAtA, i, uint64(m.StreamHandler.Size()))
|
|
n3, err := m.StreamHandler.MarshalTo(dAtA[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n3
|
|
}
|
|
if m.Dht != nil {
|
|
dAtA[i] = 0x2a
|
|
i++
|
|
i = encodeVarintP2Pd(dAtA, i, uint64(m.Dht.Size()))
|
|
n4, err := m.Dht.MarshalTo(dAtA[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n4
|
|
}
|
|
if m.ConnManager != nil {
|
|
dAtA[i] = 0x32
|
|
i++
|
|
i = encodeVarintP2Pd(dAtA, i, uint64(m.ConnManager.Size()))
|
|
n5, err := m.ConnManager.MarshalTo(dAtA[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n5
|
|
}
|
|
if m.Disconnect != nil {
|
|
dAtA[i] = 0x3a
|
|
i++
|
|
i = encodeVarintP2Pd(dAtA, i, uint64(m.Disconnect.Size()))
|
|
n6, err := m.Disconnect.MarshalTo(dAtA[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n6
|
|
}
|
|
if m.Pubsub != nil {
|
|
dAtA[i] = 0x42
|
|
i++
|
|
i = encodeVarintP2Pd(dAtA, i, uint64(m.Pubsub.Size()))
|
|
n7, err := m.Pubsub.MarshalTo(dAtA[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n7
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
i += copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *Response) 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 *Response) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Type == nil {
|
|
return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("type")
|
|
} else {
|
|
dAtA[i] = 0x8
|
|
i++
|
|
i = encodeVarintP2Pd(dAtA, i, uint64(*m.Type))
|
|
}
|
|
if m.Error != nil {
|
|
dAtA[i] = 0x12
|
|
i++
|
|
i = encodeVarintP2Pd(dAtA, i, uint64(m.Error.Size()))
|
|
n8, err := m.Error.MarshalTo(dAtA[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n8
|
|
}
|
|
if m.StreamInfo != nil {
|
|
dAtA[i] = 0x1a
|
|
i++
|
|
i = encodeVarintP2Pd(dAtA, i, uint64(m.StreamInfo.Size()))
|
|
n9, err := m.StreamInfo.MarshalTo(dAtA[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n9
|
|
}
|
|
if m.Identify != nil {
|
|
dAtA[i] = 0x22
|
|
i++
|
|
i = encodeVarintP2Pd(dAtA, i, uint64(m.Identify.Size()))
|
|
n10, err := m.Identify.MarshalTo(dAtA[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n10
|
|
}
|
|
if m.Dht != nil {
|
|
dAtA[i] = 0x2a
|
|
i++
|
|
i = encodeVarintP2Pd(dAtA, i, uint64(m.Dht.Size()))
|
|
n11, err := m.Dht.MarshalTo(dAtA[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n11
|
|
}
|
|
if len(m.Peers) > 0 {
|
|
for _, msg := range m.Peers {
|
|
dAtA[i] = 0x32
|
|
i++
|
|
i = encodeVarintP2Pd(dAtA, i, uint64(msg.Size()))
|
|
n, err := msg.MarshalTo(dAtA[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n
|
|
}
|
|
}
|
|
if m.Pubsub != nil {
|
|
dAtA[i] = 0x3a
|
|
i++
|
|
i = encodeVarintP2Pd(dAtA, i, uint64(m.Pubsub.Size()))
|
|
n12, err := m.Pubsub.MarshalTo(dAtA[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n12
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
i += copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *IdentifyResponse) 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 *IdentifyResponse) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Id == nil {
|
|
return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("id")
|
|
} else {
|
|
dAtA[i] = 0xa
|
|
i++
|
|
i = encodeVarintP2Pd(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 = encodeVarintP2Pd(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 *ConnectRequest) 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 *ConnectRequest) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Peer == nil {
|
|
return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("peer")
|
|
} else {
|
|
dAtA[i] = 0xa
|
|
i++
|
|
i = encodeVarintP2Pd(dAtA, i, uint64(len(m.Peer)))
|
|
i += copy(dAtA[i:], m.Peer)
|
|
}
|
|
if len(m.Addrs) > 0 {
|
|
for _, b := range m.Addrs {
|
|
dAtA[i] = 0x12
|
|
i++
|
|
i = encodeVarintP2Pd(dAtA, i, uint64(len(b)))
|
|
i += copy(dAtA[i:], b)
|
|
}
|
|
}
|
|
if m.Timeout != nil {
|
|
dAtA[i] = 0x18
|
|
i++
|
|
i = encodeVarintP2Pd(dAtA, i, uint64(*m.Timeout))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
i += copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *StreamOpenRequest) 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 *StreamOpenRequest) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Peer == nil {
|
|
return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("peer")
|
|
} else {
|
|
dAtA[i] = 0xa
|
|
i++
|
|
i = encodeVarintP2Pd(dAtA, i, uint64(len(m.Peer)))
|
|
i += copy(dAtA[i:], m.Peer)
|
|
}
|
|
if len(m.Proto) > 0 {
|
|
for _, s := range m.Proto {
|
|
dAtA[i] = 0x12
|
|
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 m.Timeout != nil {
|
|
dAtA[i] = 0x18
|
|
i++
|
|
i = encodeVarintP2Pd(dAtA, i, uint64(*m.Timeout))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
i += copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *StreamHandlerRequest) 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 *StreamHandlerRequest) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Addr == nil {
|
|
return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("addr")
|
|
} else {
|
|
dAtA[i] = 0xa
|
|
i++
|
|
i = encodeVarintP2Pd(dAtA, i, uint64(len(m.Addr)))
|
|
i += copy(dAtA[i:], m.Addr)
|
|
}
|
|
if len(m.Proto) > 0 {
|
|
for _, s := range m.Proto {
|
|
dAtA[i] = 0x12
|
|
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 m.XXX_unrecognized != nil {
|
|
i += copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *ErrorResponse) 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 *ErrorResponse) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Msg == nil {
|
|
return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("msg")
|
|
} else {
|
|
dAtA[i] = 0xa
|
|
i++
|
|
i = encodeVarintP2Pd(dAtA, i, uint64(len(*m.Msg)))
|
|
i += copy(dAtA[i:], *m.Msg)
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
i += copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *StreamInfo) 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 *StreamInfo) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Peer == nil {
|
|
return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("peer")
|
|
} else {
|
|
dAtA[i] = 0xa
|
|
i++
|
|
i = encodeVarintP2Pd(dAtA, i, uint64(len(m.Peer)))
|
|
i += copy(dAtA[i:], m.Peer)
|
|
}
|
|
if m.Addr == nil {
|
|
return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("addr")
|
|
} else {
|
|
dAtA[i] = 0x12
|
|
i++
|
|
i = encodeVarintP2Pd(dAtA, i, uint64(len(m.Addr)))
|
|
i += copy(dAtA[i:], m.Addr)
|
|
}
|
|
if m.Proto == nil {
|
|
return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("proto")
|
|
} else {
|
|
dAtA[i] = 0x1a
|
|
i++
|
|
i = encodeVarintP2Pd(dAtA, i, uint64(len(*m.Proto)))
|
|
i += copy(dAtA[i:], *m.Proto)
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
i += copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *DHTRequest) 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 *DHTRequest) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Type == nil {
|
|
return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("type")
|
|
} else {
|
|
dAtA[i] = 0x8
|
|
i++
|
|
i = encodeVarintP2Pd(dAtA, i, uint64(*m.Type))
|
|
}
|
|
if m.Peer != nil {
|
|
dAtA[i] = 0x12
|
|
i++
|
|
i = encodeVarintP2Pd(dAtA, i, uint64(len(m.Peer)))
|
|
i += copy(dAtA[i:], m.Peer)
|
|
}
|
|
if m.Cid != nil {
|
|
dAtA[i] = 0x1a
|
|
i++
|
|
i = encodeVarintP2Pd(dAtA, i, uint64(len(m.Cid)))
|
|
i += copy(dAtA[i:], m.Cid)
|
|
}
|
|
if m.Key != nil {
|
|
dAtA[i] = 0x22
|
|
i++
|
|
i = encodeVarintP2Pd(dAtA, i, uint64(len(m.Key)))
|
|
i += copy(dAtA[i:], m.Key)
|
|
}
|
|
if m.Value != nil {
|
|
dAtA[i] = 0x2a
|
|
i++
|
|
i = encodeVarintP2Pd(dAtA, i, uint64(len(m.Value)))
|
|
i += copy(dAtA[i:], m.Value)
|
|
}
|
|
if m.Count != nil {
|
|
dAtA[i] = 0x30
|
|
i++
|
|
i = encodeVarintP2Pd(dAtA, i, uint64(*m.Count))
|
|
}
|
|
if m.Timeout != nil {
|
|
dAtA[i] = 0x38
|
|
i++
|
|
i = encodeVarintP2Pd(dAtA, i, uint64(*m.Timeout))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
i += copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *DHTResponse) 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 *DHTResponse) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Type == nil {
|
|
return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("type")
|
|
} else {
|
|
dAtA[i] = 0x8
|
|
i++
|
|
i = encodeVarintP2Pd(dAtA, i, uint64(*m.Type))
|
|
}
|
|
if m.Peer != nil {
|
|
dAtA[i] = 0x12
|
|
i++
|
|
i = encodeVarintP2Pd(dAtA, i, uint64(m.Peer.Size()))
|
|
n13, err := m.Peer.MarshalTo(dAtA[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n13
|
|
}
|
|
if m.Value != nil {
|
|
dAtA[i] = 0x1a
|
|
i++
|
|
i = encodeVarintP2Pd(dAtA, i, uint64(len(m.Value)))
|
|
i += copy(dAtA[i:], m.Value)
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
i += copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *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 *PeerInfo) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Id == nil {
|
|
return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("id")
|
|
} else {
|
|
dAtA[i] = 0xa
|
|
i++
|
|
i = encodeVarintP2Pd(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 = encodeVarintP2Pd(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 *ConnManagerRequest) 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 *ConnManagerRequest) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Type == nil {
|
|
return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("type")
|
|
} else {
|
|
dAtA[i] = 0x8
|
|
i++
|
|
i = encodeVarintP2Pd(dAtA, i, uint64(*m.Type))
|
|
}
|
|
if m.Peer != nil {
|
|
dAtA[i] = 0x12
|
|
i++
|
|
i = encodeVarintP2Pd(dAtA, i, uint64(len(m.Peer)))
|
|
i += copy(dAtA[i:], m.Peer)
|
|
}
|
|
if m.Tag != nil {
|
|
dAtA[i] = 0x1a
|
|
i++
|
|
i = encodeVarintP2Pd(dAtA, i, uint64(len(*m.Tag)))
|
|
i += copy(dAtA[i:], *m.Tag)
|
|
}
|
|
if m.Weight != nil {
|
|
dAtA[i] = 0x20
|
|
i++
|
|
i = encodeVarintP2Pd(dAtA, i, uint64(*m.Weight))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
i += copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *DisconnectRequest) 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 *DisconnectRequest) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Peer == nil {
|
|
return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("peer")
|
|
} else {
|
|
dAtA[i] = 0xa
|
|
i++
|
|
i = encodeVarintP2Pd(dAtA, i, uint64(len(m.Peer)))
|
|
i += copy(dAtA[i:], m.Peer)
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
i += copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *PSRequest) 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 *PSRequest) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Type == nil {
|
|
return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("type")
|
|
} else {
|
|
dAtA[i] = 0x8
|
|
i++
|
|
i = encodeVarintP2Pd(dAtA, i, uint64(*m.Type))
|
|
}
|
|
if m.Topic != nil {
|
|
dAtA[i] = 0x12
|
|
i++
|
|
i = encodeVarintP2Pd(dAtA, i, uint64(len(*m.Topic)))
|
|
i += copy(dAtA[i:], *m.Topic)
|
|
}
|
|
if m.Data != nil {
|
|
dAtA[i] = 0x1a
|
|
i++
|
|
i = encodeVarintP2Pd(dAtA, i, uint64(len(m.Data)))
|
|
i += copy(dAtA[i:], m.Data)
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
i += copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *PSMessage) 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 *PSMessage) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.From != nil {
|
|
dAtA[i] = 0xa
|
|
i++
|
|
i = encodeVarintP2Pd(dAtA, i, uint64(len(m.From)))
|
|
i += copy(dAtA[i:], m.From)
|
|
}
|
|
if m.Data != nil {
|
|
dAtA[i] = 0x12
|
|
i++
|
|
i = encodeVarintP2Pd(dAtA, i, uint64(len(m.Data)))
|
|
i += copy(dAtA[i:], m.Data)
|
|
}
|
|
if m.Seqno != nil {
|
|
dAtA[i] = 0x1a
|
|
i++
|
|
i = encodeVarintP2Pd(dAtA, i, uint64(len(m.Seqno)))
|
|
i += copy(dAtA[i:], m.Seqno)
|
|
}
|
|
if len(m.TopicIDs) > 0 {
|
|
for _, s := range m.TopicIDs {
|
|
dAtA[i] = 0x22
|
|
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 m.Signature != nil {
|
|
dAtA[i] = 0x2a
|
|
i++
|
|
i = encodeVarintP2Pd(dAtA, i, uint64(len(m.Signature)))
|
|
i += copy(dAtA[i:], m.Signature)
|
|
}
|
|
if m.Key != nil {
|
|
dAtA[i] = 0x32
|
|
i++
|
|
i = encodeVarintP2Pd(dAtA, i, uint64(len(m.Key)))
|
|
i += copy(dAtA[i:], m.Key)
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
i += copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *PSResponse) 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 *PSResponse) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Topics) > 0 {
|
|
for _, s := range m.Topics {
|
|
dAtA[i] = 0xa
|
|
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.PeerIDs) > 0 {
|
|
for _, b := range m.PeerIDs {
|
|
dAtA[i] = 0x12
|
|
i++
|
|
i = encodeVarintP2Pd(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 encodeVarintP2Pd(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 *Request) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Type != nil {
|
|
n += 1 + sovP2Pd(uint64(*m.Type))
|
|
}
|
|
if m.Connect != nil {
|
|
l = m.Connect.Size()
|
|
n += 1 + l + sovP2Pd(uint64(l))
|
|
}
|
|
if m.StreamOpen != nil {
|
|
l = m.StreamOpen.Size()
|
|
n += 1 + l + sovP2Pd(uint64(l))
|
|
}
|
|
if m.StreamHandler != nil {
|
|
l = m.StreamHandler.Size()
|
|
n += 1 + l + sovP2Pd(uint64(l))
|
|
}
|
|
if m.Dht != nil {
|
|
l = m.Dht.Size()
|
|
n += 1 + l + sovP2Pd(uint64(l))
|
|
}
|
|
if m.ConnManager != nil {
|
|
l = m.ConnManager.Size()
|
|
n += 1 + l + sovP2Pd(uint64(l))
|
|
}
|
|
if m.Disconnect != nil {
|
|
l = m.Disconnect.Size()
|
|
n += 1 + l + sovP2Pd(uint64(l))
|
|
}
|
|
if m.Pubsub != nil {
|
|
l = m.Pubsub.Size()
|
|
n += 1 + l + sovP2Pd(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *Response) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Type != nil {
|
|
n += 1 + sovP2Pd(uint64(*m.Type))
|
|
}
|
|
if m.Error != nil {
|
|
l = m.Error.Size()
|
|
n += 1 + l + sovP2Pd(uint64(l))
|
|
}
|
|
if m.StreamInfo != nil {
|
|
l = m.StreamInfo.Size()
|
|
n += 1 + l + sovP2Pd(uint64(l))
|
|
}
|
|
if m.Identify != nil {
|
|
l = m.Identify.Size()
|
|
n += 1 + l + sovP2Pd(uint64(l))
|
|
}
|
|
if m.Dht != nil {
|
|
l = m.Dht.Size()
|
|
n += 1 + l + sovP2Pd(uint64(l))
|
|
}
|
|
if len(m.Peers) > 0 {
|
|
for _, e := range m.Peers {
|
|
l = e.Size()
|
|
n += 1 + l + sovP2Pd(uint64(l))
|
|
}
|
|
}
|
|
if m.Pubsub != nil {
|
|
l = m.Pubsub.Size()
|
|
n += 1 + l + sovP2Pd(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *IdentifyResponse) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Id != nil {
|
|
l = len(m.Id)
|
|
n += 1 + l + sovP2Pd(uint64(l))
|
|
}
|
|
if len(m.Addrs) > 0 {
|
|
for _, b := range m.Addrs {
|
|
l = len(b)
|
|
n += 1 + l + sovP2Pd(uint64(l))
|
|
}
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *ConnectRequest) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Peer != nil {
|
|
l = len(m.Peer)
|
|
n += 1 + l + sovP2Pd(uint64(l))
|
|
}
|
|
if len(m.Addrs) > 0 {
|
|
for _, b := range m.Addrs {
|
|
l = len(b)
|
|
n += 1 + l + sovP2Pd(uint64(l))
|
|
}
|
|
}
|
|
if m.Timeout != nil {
|
|
n += 1 + sovP2Pd(uint64(*m.Timeout))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *StreamOpenRequest) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Peer != nil {
|
|
l = len(m.Peer)
|
|
n += 1 + l + sovP2Pd(uint64(l))
|
|
}
|
|
if len(m.Proto) > 0 {
|
|
for _, s := range m.Proto {
|
|
l = len(s)
|
|
n += 1 + l + sovP2Pd(uint64(l))
|
|
}
|
|
}
|
|
if m.Timeout != nil {
|
|
n += 1 + sovP2Pd(uint64(*m.Timeout))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *StreamHandlerRequest) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Addr != nil {
|
|
l = len(m.Addr)
|
|
n += 1 + l + sovP2Pd(uint64(l))
|
|
}
|
|
if len(m.Proto) > 0 {
|
|
for _, s := range m.Proto {
|
|
l = len(s)
|
|
n += 1 + l + sovP2Pd(uint64(l))
|
|
}
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *ErrorResponse) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Msg != nil {
|
|
l = len(*m.Msg)
|
|
n += 1 + l + sovP2Pd(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *StreamInfo) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Peer != nil {
|
|
l = len(m.Peer)
|
|
n += 1 + l + sovP2Pd(uint64(l))
|
|
}
|
|
if m.Addr != nil {
|
|
l = len(m.Addr)
|
|
n += 1 + l + sovP2Pd(uint64(l))
|
|
}
|
|
if m.Proto != nil {
|
|
l = len(*m.Proto)
|
|
n += 1 + l + sovP2Pd(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *DHTRequest) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Type != nil {
|
|
n += 1 + sovP2Pd(uint64(*m.Type))
|
|
}
|
|
if m.Peer != nil {
|
|
l = len(m.Peer)
|
|
n += 1 + l + sovP2Pd(uint64(l))
|
|
}
|
|
if m.Cid != nil {
|
|
l = len(m.Cid)
|
|
n += 1 + l + sovP2Pd(uint64(l))
|
|
}
|
|
if m.Key != nil {
|
|
l = len(m.Key)
|
|
n += 1 + l + sovP2Pd(uint64(l))
|
|
}
|
|
if m.Value != nil {
|
|
l = len(m.Value)
|
|
n += 1 + l + sovP2Pd(uint64(l))
|
|
}
|
|
if m.Count != nil {
|
|
n += 1 + sovP2Pd(uint64(*m.Count))
|
|
}
|
|
if m.Timeout != nil {
|
|
n += 1 + sovP2Pd(uint64(*m.Timeout))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *DHTResponse) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Type != nil {
|
|
n += 1 + sovP2Pd(uint64(*m.Type))
|
|
}
|
|
if m.Peer != nil {
|
|
l = m.Peer.Size()
|
|
n += 1 + l + sovP2Pd(uint64(l))
|
|
}
|
|
if m.Value != nil {
|
|
l = len(m.Value)
|
|
n += 1 + l + sovP2Pd(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *PeerInfo) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Id != nil {
|
|
l = len(m.Id)
|
|
n += 1 + l + sovP2Pd(uint64(l))
|
|
}
|
|
if len(m.Addrs) > 0 {
|
|
for _, b := range m.Addrs {
|
|
l = len(b)
|
|
n += 1 + l + sovP2Pd(uint64(l))
|
|
}
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *ConnManagerRequest) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Type != nil {
|
|
n += 1 + sovP2Pd(uint64(*m.Type))
|
|
}
|
|
if m.Peer != nil {
|
|
l = len(m.Peer)
|
|
n += 1 + l + sovP2Pd(uint64(l))
|
|
}
|
|
if m.Tag != nil {
|
|
l = len(*m.Tag)
|
|
n += 1 + l + sovP2Pd(uint64(l))
|
|
}
|
|
if m.Weight != nil {
|
|
n += 1 + sovP2Pd(uint64(*m.Weight))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *DisconnectRequest) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Peer != nil {
|
|
l = len(m.Peer)
|
|
n += 1 + l + sovP2Pd(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *PSRequest) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Type != nil {
|
|
n += 1 + sovP2Pd(uint64(*m.Type))
|
|
}
|
|
if m.Topic != nil {
|
|
l = len(*m.Topic)
|
|
n += 1 + l + sovP2Pd(uint64(l))
|
|
}
|
|
if m.Data != nil {
|
|
l = len(m.Data)
|
|
n += 1 + l + sovP2Pd(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *PSMessage) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.From != nil {
|
|
l = len(m.From)
|
|
n += 1 + l + sovP2Pd(uint64(l))
|
|
}
|
|
if m.Data != nil {
|
|
l = len(m.Data)
|
|
n += 1 + l + sovP2Pd(uint64(l))
|
|
}
|
|
if m.Seqno != nil {
|
|
l = len(m.Seqno)
|
|
n += 1 + l + sovP2Pd(uint64(l))
|
|
}
|
|
if len(m.TopicIDs) > 0 {
|
|
for _, s := range m.TopicIDs {
|
|
l = len(s)
|
|
n += 1 + l + sovP2Pd(uint64(l))
|
|
}
|
|
}
|
|
if m.Signature != nil {
|
|
l = len(m.Signature)
|
|
n += 1 + l + sovP2Pd(uint64(l))
|
|
}
|
|
if m.Key != nil {
|
|
l = len(m.Key)
|
|
n += 1 + l + sovP2Pd(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *PSResponse) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if len(m.Topics) > 0 {
|
|
for _, s := range m.Topics {
|
|
l = len(s)
|
|
n += 1 + l + sovP2Pd(uint64(l))
|
|
}
|
|
}
|
|
if len(m.PeerIDs) > 0 {
|
|
for _, b := range m.PeerIDs {
|
|
l = len(b)
|
|
n += 1 + l + sovP2Pd(uint64(l))
|
|
}
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func sovP2Pd(x uint64) (n int) {
|
|
for {
|
|
n++
|
|
x >>= 7
|
|
if x == 0 {
|
|
break
|
|
}
|
|
}
|
|
return n
|
|
}
|
|
func sozP2Pd(x uint64) (n int) {
|
|
return sovP2Pd(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
|
}
|
|
func (m *Request) Unmarshal(dAtA []byte) error {
|
|
var hasFields [1]uint64
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
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: Request: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Request: 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 Request_Type
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= (Request_Type(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.Type = &v
|
|
hasFields[0] |= uint64(0x00000001)
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Connect", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Connect == nil {
|
|
m.Connect = &ConnectRequest{}
|
|
}
|
|
if err := m.Connect.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field StreamOpen", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.StreamOpen == nil {
|
|
m.StreamOpen = &StreamOpenRequest{}
|
|
}
|
|
if err := m.StreamOpen.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 4:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field StreamHandler", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.StreamHandler == nil {
|
|
m.StreamHandler = &StreamHandlerRequest{}
|
|
}
|
|
if err := m.StreamHandler.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 5:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Dht", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Dht == nil {
|
|
m.Dht = &DHTRequest{}
|
|
}
|
|
if err := m.Dht.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 6:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ConnManager", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.ConnManager == nil {
|
|
m.ConnManager = &ConnManagerRequest{}
|
|
}
|
|
if err := m.ConnManager.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 7:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Disconnect", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Disconnect == nil {
|
|
m.Disconnect = &DisconnectRequest{}
|
|
}
|
|
if err := m.Disconnect.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 8:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Pubsub", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Pubsub == nil {
|
|
m.Pubsub = &PSRequest{}
|
|
}
|
|
if err := m.Pubsub.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipP2Pd(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
if hasFields[0]&uint64(0x00000001) == 0 {
|
|
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("type")
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *Response) Unmarshal(dAtA []byte) error {
|
|
var hasFields [1]uint64
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
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: Response: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Response: 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 Response_Type
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= (Response_Type(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.Type = &v
|
|
hasFields[0] |= uint64(0x00000001)
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Error == nil {
|
|
m.Error = &ErrorResponse{}
|
|
}
|
|
if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field StreamInfo", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.StreamInfo == nil {
|
|
m.StreamInfo = &StreamInfo{}
|
|
}
|
|
if err := m.StreamInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 4:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Identify", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Identify == nil {
|
|
m.Identify = &IdentifyResponse{}
|
|
}
|
|
if err := m.Identify.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 5:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Dht", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Dht == nil {
|
|
m.Dht = &DHTResponse{}
|
|
}
|
|
if err := m.Dht.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
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 ErrIntOverflowP2Pd
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Peers = append(m.Peers, &PeerInfo{})
|
|
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 Pubsub", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Pubsub == nil {
|
|
m.Pubsub = &PSResponse{}
|
|
}
|
|
if err := m.Pubsub.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipP2Pd(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
if hasFields[0]&uint64(0x00000001) == 0 {
|
|
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("type")
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *IdentifyResponse) Unmarshal(dAtA []byte) error {
|
|
var hasFields [1]uint64
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
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: IdentifyResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: IdentifyResponse: 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 ErrIntOverflowP2Pd
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
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
|
|
hasFields[0] |= uint64(0x00000001)
|
|
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 ErrIntOverflowP2Pd
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
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 := skipP2Pd(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
if hasFields[0]&uint64(0x00000001) == 0 {
|
|
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("id")
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *ConnectRequest) Unmarshal(dAtA []byte) error {
|
|
var hasFields [1]uint64
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
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: ConnectRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: ConnectRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Peer", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Peer = append(m.Peer[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.Peer == nil {
|
|
m.Peer = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
hasFields[0] |= uint64(0x00000001)
|
|
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 ErrIntOverflowP2Pd
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
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
|
|
case 3:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Timeout", wireType)
|
|
}
|
|
var v int64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= (int64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.Timeout = &v
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipP2Pd(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
if hasFields[0]&uint64(0x00000001) == 0 {
|
|
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("peer")
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *StreamOpenRequest) Unmarshal(dAtA []byte) error {
|
|
var hasFields [1]uint64
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
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: StreamOpenRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: StreamOpenRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Peer", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Peer = append(m.Peer[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.Peer == nil {
|
|
m.Peer = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
hasFields[0] |= uint64(0x00000001)
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Proto", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
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 ErrInvalidLengthP2Pd
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Proto = append(m.Proto, string(dAtA[iNdEx:postIndex]))
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Timeout", wireType)
|
|
}
|
|
var v int64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= (int64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.Timeout = &v
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipP2Pd(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
if hasFields[0]&uint64(0x00000001) == 0 {
|
|
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("peer")
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *StreamHandlerRequest) Unmarshal(dAtA []byte) error {
|
|
var hasFields [1]uint64
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
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: StreamHandlerRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: StreamHandlerRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Addr", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Addr = append(m.Addr[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.Addr == nil {
|
|
m.Addr = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
hasFields[0] |= uint64(0x00000001)
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Proto", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
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 ErrInvalidLengthP2Pd
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Proto = append(m.Proto, string(dAtA[iNdEx:postIndex]))
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipP2Pd(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
if hasFields[0]&uint64(0x00000001) == 0 {
|
|
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("addr")
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *ErrorResponse) Unmarshal(dAtA []byte) error {
|
|
var hasFields [1]uint64
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
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: ErrorResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: ErrorResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
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 ErrInvalidLengthP2Pd
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
s := string(dAtA[iNdEx:postIndex])
|
|
m.Msg = &s
|
|
iNdEx = postIndex
|
|
hasFields[0] |= uint64(0x00000001)
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipP2Pd(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
if hasFields[0]&uint64(0x00000001) == 0 {
|
|
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("msg")
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *StreamInfo) Unmarshal(dAtA []byte) error {
|
|
var hasFields [1]uint64
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
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: StreamInfo: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: StreamInfo: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Peer", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Peer = append(m.Peer[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.Peer == nil {
|
|
m.Peer = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
hasFields[0] |= uint64(0x00000001)
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Addr", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Addr = append(m.Addr[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.Addr == nil {
|
|
m.Addr = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
hasFields[0] |= uint64(0x00000002)
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Proto", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
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 ErrInvalidLengthP2Pd
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
s := string(dAtA[iNdEx:postIndex])
|
|
m.Proto = &s
|
|
iNdEx = postIndex
|
|
hasFields[0] |= uint64(0x00000004)
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipP2Pd(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
if hasFields[0]&uint64(0x00000001) == 0 {
|
|
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("peer")
|
|
}
|
|
if hasFields[0]&uint64(0x00000002) == 0 {
|
|
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("addr")
|
|
}
|
|
if hasFields[0]&uint64(0x00000004) == 0 {
|
|
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("proto")
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *DHTRequest) Unmarshal(dAtA []byte) error {
|
|
var hasFields [1]uint64
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
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: DHTRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: DHTRequest: 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 DHTRequest_Type
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= (DHTRequest_Type(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.Type = &v
|
|
hasFields[0] |= uint64(0x00000001)
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Peer", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Peer = append(m.Peer[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.Peer == nil {
|
|
m.Peer = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Cid = append(m.Cid[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.Cid == nil {
|
|
m.Cid = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
case 4:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.Key == nil {
|
|
m.Key = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
case 5:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.Value == nil {
|
|
m.Value = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
case 6:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType)
|
|
}
|
|
var v int32
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= (int32(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.Count = &v
|
|
case 7:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Timeout", wireType)
|
|
}
|
|
var v int64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= (int64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.Timeout = &v
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipP2Pd(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
if hasFields[0]&uint64(0x00000001) == 0 {
|
|
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("type")
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *DHTResponse) Unmarshal(dAtA []byte) error {
|
|
var hasFields [1]uint64
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
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: DHTResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: DHTResponse: 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 DHTResponse_Type
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= (DHTResponse_Type(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.Type = &v
|
|
hasFields[0] |= uint64(0x00000001)
|
|
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 ErrIntOverflowP2Pd
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Peer == nil {
|
|
m.Peer = &PeerInfo{}
|
|
}
|
|
if err := m.Peer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.Value == nil {
|
|
m.Value = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipP2Pd(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
if hasFields[0]&uint64(0x00000001) == 0 {
|
|
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("type")
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *PeerInfo) Unmarshal(dAtA []byte) error {
|
|
var hasFields [1]uint64
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
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 ErrIntOverflowP2Pd
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
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
|
|
hasFields[0] |= uint64(0x00000001)
|
|
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 ErrIntOverflowP2Pd
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
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 := skipP2Pd(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
if hasFields[0]&uint64(0x00000001) == 0 {
|
|
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("id")
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *ConnManagerRequest) Unmarshal(dAtA []byte) error {
|
|
var hasFields [1]uint64
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
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: ConnManagerRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: ConnManagerRequest: 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 ConnManagerRequest_Type
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= (ConnManagerRequest_Type(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.Type = &v
|
|
hasFields[0] |= uint64(0x00000001)
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Peer", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Peer = append(m.Peer[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.Peer == nil {
|
|
m.Peer = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Tag", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
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 ErrInvalidLengthP2Pd
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
s := string(dAtA[iNdEx:postIndex])
|
|
m.Tag = &s
|
|
iNdEx = postIndex
|
|
case 4:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Weight", wireType)
|
|
}
|
|
var v int64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= (int64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.Weight = &v
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipP2Pd(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
if hasFields[0]&uint64(0x00000001) == 0 {
|
|
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("type")
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *DisconnectRequest) Unmarshal(dAtA []byte) error {
|
|
var hasFields [1]uint64
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
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: DisconnectRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: DisconnectRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Peer", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Peer = append(m.Peer[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.Peer == nil {
|
|
m.Peer = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
hasFields[0] |= uint64(0x00000001)
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipP2Pd(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
if hasFields[0]&uint64(0x00000001) == 0 {
|
|
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("peer")
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *PSRequest) Unmarshal(dAtA []byte) error {
|
|
var hasFields [1]uint64
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
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: PSRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: PSRequest: 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 PSRequest_Type
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= (PSRequest_Type(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.Type = &v
|
|
hasFields[0] |= uint64(0x00000001)
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Topic", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
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 ErrInvalidLengthP2Pd
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
s := string(dAtA[iNdEx:postIndex])
|
|
m.Topic = &s
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.Data == nil {
|
|
m.Data = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipP2Pd(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
if hasFields[0]&uint64(0x00000001) == 0 {
|
|
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("type")
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *PSMessage) 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 ErrIntOverflowP2Pd
|
|
}
|
|
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: PSMessage: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: PSMessage: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field From", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.From = append(m.From[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.From == nil {
|
|
m.From = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.Data == nil {
|
|
m.Data = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Seqno", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Seqno = append(m.Seqno[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.Seqno == nil {
|
|
m.Seqno = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
case 4:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field TopicIDs", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
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 ErrInvalidLengthP2Pd
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.TopicIDs = append(m.TopicIDs, string(dAtA[iNdEx:postIndex]))
|
|
iNdEx = postIndex
|
|
case 5:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.Signature == nil {
|
|
m.Signature = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
case 6:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.Key == nil {
|
|
m.Key = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipP2Pd(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
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 *PSResponse) 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 ErrIntOverflowP2Pd
|
|
}
|
|
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: PSResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: PSResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Topics", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
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 ErrInvalidLengthP2Pd
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Topics = append(m.Topics, string(dAtA[iNdEx:postIndex]))
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field PeerIDs", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowP2Pd
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.PeerIDs = append(m.PeerIDs, make([]byte, postIndex-iNdEx))
|
|
copy(m.PeerIDs[len(m.PeerIDs)-1], dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipP2Pd(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthP2Pd
|
|
}
|
|
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 skipP2Pd(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, ErrIntOverflowP2Pd
|
|
}
|
|
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, ErrIntOverflowP2Pd
|
|
}
|
|
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, ErrIntOverflowP2Pd
|
|
}
|
|
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, ErrInvalidLengthP2Pd
|
|
}
|
|
return iNdEx, nil
|
|
case 3:
|
|
for {
|
|
var innerWire uint64
|
|
var start int = iNdEx
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowP2Pd
|
|
}
|
|
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 := skipP2Pd(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 (
|
|
ErrInvalidLengthP2Pd = fmt.Errorf("proto: negative length found during unmarshaling")
|
|
ErrIntOverflowP2Pd = fmt.Errorf("proto: integer overflow")
|
|
)
|
|
|
|
func init() { proto.RegisterFile("p2pd.proto", fileDescriptor_p2pd_9a5e2158cc01bafa) }
|
|
|
|
var fileDescriptor_p2pd_9a5e2158cc01bafa = []byte{
|
|
// 1123 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x55, 0x41, 0x8f, 0xdb, 0x44,
|
|
0x14, 0xae, 0xed, 0x24, 0x4e, 0x5e, 0xb2, 0x61, 0x76, 0xba, 0x6d, 0xbd, 0xa5, 0xac, 0x82, 0xa5,
|
|
0xa5, 0x4b, 0x5b, 0x56, 0xb0, 0x80, 0x84, 0x90, 0x40, 0x24, 0xb1, 0xbb, 0x31, 0xdd, 0x4d, 0xa2,
|
|
0xb1, 0x53, 0xd4, 0x53, 0xe4, 0x5d, 0xcf, 0xa6, 0x11, 0x5d, 0x3b, 0xb5, 0x1d, 0xd0, 0xfe, 0x07,
|
|
0xae, 0xdc, 0x39, 0xf1, 0x07, 0xb8, 0xf0, 0x07, 0x90, 0x38, 0xf2, 0x13, 0xd0, 0xde, 0xb8, 0xf0,
|
|
0x1b, 0xd0, 0x8c, 0x67, 0x1c, 0x3b, 0x1b, 0xaa, 0xde, 0xe6, 0xcd, 0x7c, 0xdf, 0x7b, 0x6f, 0xde,
|
|
0x7c, 0xef, 0x0d, 0xc0, 0xe2, 0x68, 0x11, 0x1c, 0x2e, 0xe2, 0x28, 0x8d, 0xb0, 0x9e, 0xad, 0xcf,
|
|
0xcc, 0x3f, 0x2a, 0xa0, 0x13, 0xfa, 0x7a, 0x49, 0x93, 0x14, 0x7f, 0x08, 0x95, 0xf4, 0x6a, 0x41,
|
|
0x0d, 0xa5, 0xa3, 0x1e, 0xb4, 0x8f, 0xee, 0x1c, 0x0a, 0xcc, 0xa1, 0x38, 0x3f, 0xf4, 0xae, 0x16,
|
|
0x94, 0x70, 0x08, 0xfe, 0x04, 0xf4, 0xf3, 0x28, 0x0c, 0xe9, 0x79, 0x6a, 0xa8, 0x1d, 0xe5, 0xa0,
|
|
0x79, 0x74, 0x2f, 0x47, 0xf7, 0xb3, 0x7d, 0x41, 0x22, 0x12, 0x87, 0xbf, 0x04, 0x48, 0xd2, 0x98,
|
|
0xfa, 0x97, 0xa3, 0x05, 0x0d, 0x0d, 0x8d, 0xb3, 0xee, 0xe7, 0x2c, 0x37, 0x3f, 0x92, 0xc4, 0x02,
|
|
0x1a, 0xf7, 0x61, 0x2b, 0xb3, 0x06, 0x7e, 0x18, 0xbc, 0xa2, 0xb1, 0x51, 0xe1, 0xf4, 0xf7, 0xd6,
|
|
0xe8, 0xe2, 0x54, 0x7a, 0x28, 0x73, 0xf0, 0x3e, 0x68, 0xc1, 0xcb, 0xd4, 0xa8, 0x72, 0xea, 0xed,
|
|
0x9c, 0x6a, 0x0d, 0x3c, 0x49, 0x60, 0xe7, 0xf8, 0x2b, 0x68, 0xb2, 0x94, 0x4f, 0xfd, 0xd0, 0x9f,
|
|
0xd1, 0xd8, 0xa8, 0x71, 0xf8, 0xbb, 0xa5, 0xeb, 0x89, 0x33, 0x49, 0x2b, 0xe2, 0xd9, 0x35, 0x83,
|
|
0x79, 0x22, 0x8b, 0xa3, 0xaf, 0x5d, 0xd3, 0xca, 0x8f, 0xf2, 0x6b, 0xae, 0xd0, 0xf8, 0x11, 0xd4,
|
|
0x16, 0xcb, 0xb3, 0x64, 0x79, 0x66, 0xd4, 0x39, 0x0f, 0xe7, 0xbc, 0xb1, 0x2b, 0xf1, 0x02, 0x61,
|
|
0xfe, 0xa4, 0x40, 0x85, 0x3d, 0x08, 0x6e, 0x41, 0xdd, 0xb1, 0xec, 0xa1, 0xe7, 0x3c, 0x7d, 0x81,
|
|
0x6e, 0xe1, 0x26, 0xe8, 0xfd, 0xd1, 0x70, 0x68, 0xf7, 0x3d, 0xa4, 0xe0, 0x77, 0xa0, 0xe9, 0x7a,
|
|
0xc4, 0xee, 0x9e, 0x4e, 0x47, 0x63, 0x7b, 0x88, 0x54, 0x8c, 0xa1, 0x2d, 0x36, 0x06, 0xdd, 0xa1,
|
|
0x75, 0x62, 0x13, 0xa4, 0x61, 0x1d, 0x34, 0x6b, 0xe0, 0xa1, 0x0a, 0x6e, 0x03, 0x9c, 0x38, 0xae,
|
|
0x37, 0x1d, 0xdb, 0x36, 0x71, 0x51, 0x95, 0xb1, 0x99, 0xab, 0xd3, 0xee, 0xb0, 0x7b, 0x6c, 0x13,
|
|
0x54, 0x63, 0x00, 0xcb, 0x71, 0xa5, 0x7b, 0x1d, 0x03, 0xd4, 0xc6, 0x93, 0x9e, 0x3b, 0xe9, 0xa1,
|
|
0xba, 0xf9, 0x8f, 0x0a, 0x75, 0x42, 0x93, 0x45, 0x14, 0x26, 0x14, 0x3f, 0x2a, 0x09, 0xe9, 0x6e,
|
|
0x41, 0x48, 0x19, 0xa0, 0xa8, 0xa4, 0x27, 0x50, 0xa5, 0x71, 0x1c, 0xc5, 0x42, 0x47, 0x2b, 0xb0,
|
|
0xcd, 0x76, 0x25, 0x83, 0x64, 0x20, 0xfc, 0xa9, 0x14, 0x91, 0x13, 0x5e, 0x44, 0x42, 0x44, 0xb7,
|
|
0xd7, 0x54, 0xc0, 0x8e, 0x48, 0x01, 0x86, 0x3f, 0x87, 0xfa, 0x3c, 0xa0, 0x61, 0x3a, 0xbf, 0xb8,
|
|
0x12, 0xc2, 0xd9, 0xcd, 0x29, 0x8e, 0x38, 0xc8, 0x03, 0xe5, 0x50, 0xfc, 0x41, 0x51, 0x2f, 0x3b,
|
|
0x65, 0xbd, 0x08, 0x30, 0x17, 0xcc, 0x43, 0xa8, 0x2e, 0x28, 0x8d, 0x13, 0xa3, 0xd6, 0xd1, 0x0e,
|
|
0x9a, 0x47, 0xdb, 0xab, 0x47, 0xa3, 0x34, 0xe6, 0xc9, 0x64, 0xe7, 0xf8, 0x71, 0xfe, 0xbc, 0xfa,
|
|
0x5a, 0xe2, 0xec, 0x79, 0x85, 0x4b, 0xf9, 0xbe, 0xbb, 0xe2, 0x79, 0x6b, 0xa0, 0x8e, 0x9e, 0xa1,
|
|
0x5b, 0xb8, 0x01, 0x55, 0x9b, 0x90, 0x11, 0x41, 0x8a, 0xf9, 0x05, 0xa0, 0xf5, 0xb4, 0x71, 0x1b,
|
|
0xd4, 0x79, 0xc0, 0x0b, 0xde, 0x22, 0xea, 0x3c, 0xc0, 0x3b, 0x50, 0xf5, 0x83, 0x20, 0x4e, 0x0c,
|
|
0xb5, 0xa3, 0x1d, 0xb4, 0x48, 0x66, 0x98, 0x1e, 0xb4, 0xcb, 0xed, 0x89, 0x31, 0x54, 0x58, 0x72,
|
|
0x82, 0xc9, 0xd7, 0x9b, 0xb9, 0xd8, 0x00, 0x3d, 0x9d, 0x5f, 0xd2, 0x68, 0x99, 0xf2, 0xba, 0x6b,
|
|
0x44, 0x9a, 0xe6, 0x77, 0xb0, 0x7d, 0xa3, 0x7d, 0xff, 0xcf, 0x31, 0x1f, 0x3f, 0xdc, 0x71, 0x83,
|
|
0x64, 0xc6, 0x1b, 0x1c, 0x7f, 0x03, 0x3b, 0x9b, 0x1a, 0x9b, 0xf9, 0x66, 0x39, 0x49, 0xdf, 0x6c,
|
|
0xbd, 0xd9, 0xb7, 0xf9, 0x3e, 0x6c, 0x95, 0x74, 0x84, 0x11, 0x68, 0x97, 0xc9, 0x8c, 0x33, 0x1b,
|
|
0x84, 0x2d, 0xcd, 0x6f, 0x01, 0x56, 0xba, 0xd9, 0x98, 0xb6, 0x0c, 0xa7, 0x6e, 0x0a, 0xa7, 0x71,
|
|
0x4f, 0x22, 0xdc, 0xbf, 0x2a, 0xc0, 0x6a, 0x9e, 0xe0, 0x27, 0xa5, 0x3e, 0x30, 0x36, 0x8c, 0x9c,
|
|
0x62, 0x27, 0xc8, 0xd0, 0xac, 0x11, 0x64, 0x68, 0x04, 0xda, 0xf9, 0x3c, 0xe0, 0x75, 0x69, 0x11,
|
|
0xb6, 0x64, 0x3b, 0xdf, 0xd3, 0x4c, 0xc7, 0x2d, 0xc2, 0x96, 0x2c, 0x95, 0x1f, 0xfc, 0x57, 0x4b,
|
|
0xca, 0x95, 0xda, 0x22, 0x99, 0xc1, 0x76, 0xcf, 0xa3, 0x65, 0x98, 0xf2, 0x01, 0x56, 0x25, 0x99,
|
|
0x51, 0xac, 0xb5, 0x5e, 0xae, 0xf5, 0x6f, 0x72, 0x9e, 0x6c, 0x41, 0xe3, 0xa9, 0x33, 0xb4, 0xf8,
|
|
0x18, 0x40, 0xb7, 0x70, 0x07, 0x1e, 0xe4, 0xa6, 0x3b, 0x15, 0xcd, 0x6f, 0x5b, 0x53, 0x6f, 0x94,
|
|
0x21, 0x14, 0x36, 0x54, 0x32, 0x04, 0x19, 0x3d, 0x77, 0x2c, 0x36, 0x3b, 0x54, 0x7c, 0x07, 0xb6,
|
|
0x8f, 0x6d, 0x6f, 0xda, 0x3f, 0x19, 0xb9, 0x76, 0x3e, 0x52, 0x34, 0x06, 0x65, 0xdb, 0xe3, 0x49,
|
|
0xef, 0xc4, 0xe9, 0x4f, 0x9f, 0xd9, 0x2f, 0x50, 0x85, 0xc5, 0x63, 0x7b, 0xcf, 0xbb, 0x27, 0x13,
|
|
0x1b, 0x55, 0x31, 0x82, 0x96, 0x6b, 0x77, 0x49, 0x7f, 0x20, 0x76, 0x6a, 0x0c, 0x30, 0x9e, 0x48,
|
|
0x80, 0xce, 0x26, 0x9c, 0x88, 0x84, 0xea, 0xe6, 0x2f, 0x0a, 0x34, 0x0b, 0x0d, 0x89, 0x3f, 0x2a,
|
|
0x55, 0x7c, 0x77, 0x53, 0xd3, 0x16, 0x4b, 0xbe, 0x5f, 0x28, 0xf9, 0xc6, 0xce, 0xcd, 0x75, 0x9b,
|
|
0x55, 0x58, 0x2b, 0x54, 0xd8, 0xdc, 0x17, 0x05, 0x6b, 0x40, 0xb5, 0x67, 0x1f, 0x3b, 0xc3, 0xac,
|
|
0x49, 0xb3, 0x34, 0x15, 0x36, 0x56, 0xed, 0xa1, 0x85, 0x54, 0xf3, 0x63, 0xa8, 0x4b, 0x77, 0x6f,
|
|
0xd9, 0xa5, 0xbf, 0x2b, 0x80, 0x6f, 0x7e, 0x33, 0xf8, 0xb3, 0xd2, 0xdd, 0x3a, 0x6f, 0xf8, 0x91,
|
|
0xde, 0x42, 0x55, 0xa9, 0x3f, 0xe3, 0xb7, 0x69, 0x10, 0xb6, 0xc4, 0x77, 0xa1, 0xf6, 0x23, 0x9d,
|
|
0xcf, 0x5e, 0xa6, 0x5c, 0x58, 0x1a, 0x11, 0x96, 0x79, 0xb8, 0xfa, 0x64, 0xbc, 0xee, 0xb1, 0xd4,
|
|
0x44, 0x1b, 0x60, 0x32, 0xcc, 0x6d, 0x05, 0xd7, 0xa1, 0xe2, 0x11, 0xe7, 0x14, 0xa9, 0xe6, 0x43,
|
|
0xd8, 0xbe, 0xf1, 0xc5, 0x6d, 0xea, 0x29, 0xf3, 0x57, 0x05, 0x1a, 0xf9, 0xa7, 0x86, 0x1f, 0x97,
|
|
0xae, 0x76, 0xef, 0xe6, 0xb7, 0x57, 0xbc, 0xd1, 0x0e, 0x54, 0xd3, 0x68, 0x31, 0x3f, 0xe7, 0x57,
|
|
0x6a, 0x90, 0xcc, 0x60, 0x41, 0x02, 0x3f, 0xf5, 0xc5, 0x13, 0xf1, 0xb5, 0xd9, 0x13, 0xd9, 0xb7,
|
|
0x01, 0x98, 0xc4, 0xbc, 0xd1, 0xd8, 0xe9, 0xbb, 0x59, 0xfe, 0x85, 0x9f, 0x4e, 0xe1, 0x92, 0x62,
|
|
0x92, 0x74, 0x07, 0x48, 0x65, 0x72, 0x73, 0x27, 0x3d, 0xb7, 0x4f, 0x9c, 0x9e, 0x8d, 0x34, 0xf3,
|
|
0x67, 0x9e, 0xe8, 0x29, 0x4d, 0x12, 0x7f, 0xc6, 0xab, 0x79, 0x11, 0x47, 0x97, 0x86, 0x92, 0x45,
|
|
0x61, 0xeb, 0x3c, 0xb2, 0xba, 0x8a, 0xcc, 0x72, 0x4c, 0xe8, 0xeb, 0x30, 0x92, 0x8a, 0xe1, 0x06,
|
|
0xbe, 0x0f, 0x75, 0x9e, 0xac, 0x63, 0x25, 0x46, 0x85, 0x8f, 0xa9, 0xdc, 0xc6, 0x0f, 0xa0, 0x91,
|
|
0xcc, 0x67, 0xa1, 0x9f, 0x2e, 0x63, 0xd9, 0xc9, 0xab, 0x0d, 0xd9, 0xf5, 0xb5, 0xbc, 0xeb, 0xcd,
|
|
0xaf, 0x01, 0x56, 0xbf, 0x06, 0x7b, 0x3f, 0xee, 0x29, 0x31, 0x14, 0xee, 0x57, 0x58, 0xac, 0xdf,
|
|
0x59, 0xb9, 0x59, 0xc0, 0x4c, 0x62, 0xd2, 0xec, 0xb5, 0xfe, 0xbc, 0xde, 0x53, 0xfe, 0xba, 0xde,
|
|
0x53, 0xfe, 0xbe, 0xde, 0x53, 0xfe, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x7d, 0x4e, 0x88, 0x0e, 0x1c,
|
|
0x0a, 0x00, 0x00,
|
|
}
|