go-libp2p-pubsub/pb/rpc.pb.go

3436 lines
79 KiB
Go
Raw Normal View History

// Code generated by protoc-gen-gogo. DO NOT EDIT.
2016-09-10 08:14:17 -07:00
// source: rpc.proto
package pubsub_pb
2016-09-10 08:14:17 -07:00
2019-02-18 16:32:05 +01:00
import (
fmt "fmt"
proto "github.com/gogo/protobuf/proto"
io "io"
math "math"
)
2016-09-10 08:14:17 -07:00
// 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
2016-09-10 20:47:12 -07:00
type TopicDescriptor_AuthOpts_AuthMode int32
const (
TopicDescriptor_AuthOpts_NONE TopicDescriptor_AuthOpts_AuthMode = 0
TopicDescriptor_AuthOpts_KEY TopicDescriptor_AuthOpts_AuthMode = 1
TopicDescriptor_AuthOpts_WOT TopicDescriptor_AuthOpts_AuthMode = 2
)
var TopicDescriptor_AuthOpts_AuthMode_name = map[int32]string{
0: "NONE",
1: "KEY",
2: "WOT",
}
2019-02-18 16:32:05 +01:00
2016-09-10 20:47:12 -07:00
var TopicDescriptor_AuthOpts_AuthMode_value = map[string]int32{
"NONE": 0,
"KEY": 1,
"WOT": 2,
}
func (x TopicDescriptor_AuthOpts_AuthMode) Enum() *TopicDescriptor_AuthOpts_AuthMode {
p := new(TopicDescriptor_AuthOpts_AuthMode)
*p = x
return p
}
2019-02-18 16:32:05 +01:00
2016-09-10 20:47:12 -07:00
func (x TopicDescriptor_AuthOpts_AuthMode) String() string {
return proto.EnumName(TopicDescriptor_AuthOpts_AuthMode_name, int32(x))
}
2019-02-18 16:32:05 +01:00
2016-09-10 20:47:12 -07:00
func (x *TopicDescriptor_AuthOpts_AuthMode) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(TopicDescriptor_AuthOpts_AuthMode_value, data, "TopicDescriptor_AuthOpts_AuthMode")
if err != nil {
return err
}
*x = TopicDescriptor_AuthOpts_AuthMode(value)
return nil
}
2019-02-18 16:32:05 +01:00
func (TopicDescriptor_AuthOpts_AuthMode) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_77a6da22d6a3feb1, []int{8, 0, 0}
}
2016-09-10 20:47:12 -07:00
type TopicDescriptor_EncOpts_EncMode int32
const (
TopicDescriptor_EncOpts_NONE TopicDescriptor_EncOpts_EncMode = 0
TopicDescriptor_EncOpts_SHAREDKEY TopicDescriptor_EncOpts_EncMode = 1
TopicDescriptor_EncOpts_WOT TopicDescriptor_EncOpts_EncMode = 2
)
var TopicDescriptor_EncOpts_EncMode_name = map[int32]string{
0: "NONE",
1: "SHAREDKEY",
2: "WOT",
}
2019-02-18 16:32:05 +01:00
2016-09-10 20:47:12 -07:00
var TopicDescriptor_EncOpts_EncMode_value = map[string]int32{
"NONE": 0,
"SHAREDKEY": 1,
"WOT": 2,
}
func (x TopicDescriptor_EncOpts_EncMode) Enum() *TopicDescriptor_EncOpts_EncMode {
p := new(TopicDescriptor_EncOpts_EncMode)
*p = x
return p
}
2019-02-18 16:32:05 +01:00
2016-09-10 20:47:12 -07:00
func (x TopicDescriptor_EncOpts_EncMode) String() string {
return proto.EnumName(TopicDescriptor_EncOpts_EncMode_name, int32(x))
}
2019-02-18 16:32:05 +01:00
2016-09-10 20:47:12 -07:00
func (x *TopicDescriptor_EncOpts_EncMode) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(TopicDescriptor_EncOpts_EncMode_value, data, "TopicDescriptor_EncOpts_EncMode")
if err != nil {
return err
}
*x = TopicDescriptor_EncOpts_EncMode(value)
return nil
}
2019-02-18 16:32:05 +01:00
func (TopicDescriptor_EncOpts_EncMode) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_77a6da22d6a3feb1, []int{8, 1, 0}
}
2016-09-10 20:47:12 -07:00
2016-09-10 08:14:17 -07:00
type RPC struct {
Subscriptions []*RPC_SubOpts `protobuf:"bytes,1,rep,name=subscriptions" json:"subscriptions,omitempty"`
Publish []*Message `protobuf:"bytes,2,rep,name=publish" json:"publish,omitempty"`
Control *ControlMessage `protobuf:"bytes,3,opt,name=control" json:"control,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
2016-09-10 08:14:17 -07:00
}
2016-09-10 08:28:29 -07:00
func (m *RPC) Reset() { *m = RPC{} }
func (m *RPC) String() string { return proto.CompactTextString(m) }
func (*RPC) ProtoMessage() {}
func (*RPC) Descriptor() ([]byte, []int) {
2019-02-18 16:32:05 +01:00
return fileDescriptor_77a6da22d6a3feb1, []int{0}
}
func (m *RPC) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *RPC) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_RPC.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
2019-02-18 16:32:05 +01:00
func (m *RPC) XXX_Merge(src proto.Message) {
xxx_messageInfo_RPC.Merge(m, src)
}
func (m *RPC) XXX_Size() int {
return m.Size()
}
func (m *RPC) XXX_DiscardUnknown() {
xxx_messageInfo_RPC.DiscardUnknown(m)
}
var xxx_messageInfo_RPC proto.InternalMessageInfo
2016-09-10 08:14:17 -07:00
2016-09-10 20:47:12 -07:00
func (m *RPC) GetSubscriptions() []*RPC_SubOpts {
if m != nil {
return m.Subscriptions
2016-09-10 08:14:17 -07:00
}
2016-09-10 20:47:12 -07:00
return nil
2016-09-10 08:14:17 -07:00
}
2016-09-10 20:47:12 -07:00
func (m *RPC) GetPublish() []*Message {
2016-09-10 08:14:17 -07:00
if m != nil {
2016-09-10 20:47:12 -07:00
return m.Publish
2016-09-10 08:14:17 -07:00
}
return nil
}
2018-02-19 17:24:19 +02:00
func (m *RPC) GetControl() *ControlMessage {
if m != nil {
return m.Control
}
return nil
}
2016-09-10 20:47:12 -07:00
type RPC_SubOpts struct {
Subscribe *bool `protobuf:"varint,1,opt,name=subscribe" json:"subscribe,omitempty"`
Topicid *string `protobuf:"bytes,2,opt,name=topicid" json:"topicid,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
2016-09-10 20:47:12 -07:00
}
func (m *RPC_SubOpts) Reset() { *m = RPC_SubOpts{} }
func (m *RPC_SubOpts) String() string { return proto.CompactTextString(m) }
func (*RPC_SubOpts) ProtoMessage() {}
func (*RPC_SubOpts) Descriptor() ([]byte, []int) {
2019-02-18 16:32:05 +01:00
return fileDescriptor_77a6da22d6a3feb1, []int{0, 0}
}
func (m *RPC_SubOpts) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *RPC_SubOpts) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_RPC_SubOpts.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
2019-02-18 16:32:05 +01:00
func (m *RPC_SubOpts) XXX_Merge(src proto.Message) {
xxx_messageInfo_RPC_SubOpts.Merge(m, src)
}
func (m *RPC_SubOpts) XXX_Size() int {
return m.Size()
}
func (m *RPC_SubOpts) XXX_DiscardUnknown() {
xxx_messageInfo_RPC_SubOpts.DiscardUnknown(m)
}
var xxx_messageInfo_RPC_SubOpts proto.InternalMessageInfo
2016-09-10 20:47:12 -07:00
func (m *RPC_SubOpts) GetSubscribe() bool {
if m != nil && m.Subscribe != nil {
return *m.Subscribe
2016-09-10 08:14:17 -07:00
}
2016-09-10 20:47:12 -07:00
return false
}
func (m *RPC_SubOpts) GetTopicid() string {
if m != nil && m.Topicid != nil {
return *m.Topicid
}
return ""
2016-09-10 08:14:17 -07:00
}
type Message 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:"-"`
2016-09-10 08:14:17 -07:00
}
2016-09-10 08:28:29 -07:00
func (m *Message) Reset() { *m = Message{} }
func (m *Message) String() string { return proto.CompactTextString(m) }
func (*Message) ProtoMessage() {}
func (*Message) Descriptor() ([]byte, []int) {
2019-02-18 16:32:05 +01:00
return fileDescriptor_77a6da22d6a3feb1, []int{1}
}
func (m *Message) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Message.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
2019-02-18 16:32:05 +01:00
func (m *Message) XXX_Merge(src proto.Message) {
xxx_messageInfo_Message.Merge(m, src)
}
func (m *Message) XXX_Size() int {
return m.Size()
}
func (m *Message) XXX_DiscardUnknown() {
xxx_messageInfo_Message.DiscardUnknown(m)
}
var xxx_messageInfo_Message proto.InternalMessageInfo
2016-09-10 08:14:17 -07:00
func (m *Message) GetFrom() []byte {
if m != nil {
return m.From
2016-09-10 08:14:17 -07:00
}
return nil
2016-09-10 08:14:17 -07:00
}
func (m *Message) GetData() []byte {
if m != nil {
return m.Data
}
return nil
}
2016-09-10 20:47:12 -07:00
func (m *Message) GetSeqno() []byte {
if m != nil {
return m.Seqno
}
return nil
}
func (m *Message) GetTopicIDs() []string {
if m != nil {
return m.TopicIDs
2016-09-10 08:14:17 -07:00
}
2016-09-10 20:47:12 -07:00
return nil
2016-09-10 08:14:17 -07:00
}
func (m *Message) GetSignature() []byte {
if m != nil {
return m.Signature
}
return nil
}
func (m *Message) GetKey() []byte {
if m != nil {
return m.Key
}
return nil
}
2018-02-19 17:24:19 +02:00
type ControlMessage struct {
Ihave []*ControlIHave `protobuf:"bytes,1,rep,name=ihave" json:"ihave,omitempty"`
Iwant []*ControlIWant `protobuf:"bytes,2,rep,name=iwant" json:"iwant,omitempty"`
Graft []*ControlGraft `protobuf:"bytes,3,rep,name=graft" json:"graft,omitempty"`
Prune []*ControlPrune `protobuf:"bytes,4,rep,name=prune" json:"prune,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
2018-02-19 17:24:19 +02:00
}
func (m *ControlMessage) Reset() { *m = ControlMessage{} }
func (m *ControlMessage) String() string { return proto.CompactTextString(m) }
func (*ControlMessage) ProtoMessage() {}
func (*ControlMessage) Descriptor() ([]byte, []int) {
2019-02-18 16:32:05 +01:00
return fileDescriptor_77a6da22d6a3feb1, []int{2}
}
func (m *ControlMessage) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ControlMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ControlMessage.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
2019-02-18 16:32:05 +01:00
func (m *ControlMessage) XXX_Merge(src proto.Message) {
xxx_messageInfo_ControlMessage.Merge(m, src)
}
func (m *ControlMessage) XXX_Size() int {
return m.Size()
}
func (m *ControlMessage) XXX_DiscardUnknown() {
xxx_messageInfo_ControlMessage.DiscardUnknown(m)
}
var xxx_messageInfo_ControlMessage proto.InternalMessageInfo
2018-02-19 17:24:19 +02:00
func (m *ControlMessage) GetIhave() []*ControlIHave {
if m != nil {
return m.Ihave
}
return nil
}
func (m *ControlMessage) GetIwant() []*ControlIWant {
if m != nil {
return m.Iwant
}
return nil
}
func (m *ControlMessage) GetGraft() []*ControlGraft {
if m != nil {
return m.Graft
}
return nil
}
func (m *ControlMessage) GetPrune() []*ControlPrune {
if m != nil {
return m.Prune
}
return nil
}
type ControlIHave struct {
TopicID *string `protobuf:"bytes,1,opt,name=topicID" json:"topicID,omitempty"`
MessageIDs []string `protobuf:"bytes,2,rep,name=messageIDs" json:"messageIDs,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
2018-02-19 17:24:19 +02:00
}
func (m *ControlIHave) Reset() { *m = ControlIHave{} }
func (m *ControlIHave) String() string { return proto.CompactTextString(m) }
func (*ControlIHave) ProtoMessage() {}
func (*ControlIHave) Descriptor() ([]byte, []int) {
2019-02-18 16:32:05 +01:00
return fileDescriptor_77a6da22d6a3feb1, []int{3}
}
func (m *ControlIHave) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ControlIHave) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ControlIHave.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
2019-02-18 16:32:05 +01:00
func (m *ControlIHave) XXX_Merge(src proto.Message) {
xxx_messageInfo_ControlIHave.Merge(m, src)
}
func (m *ControlIHave) XXX_Size() int {
return m.Size()
}
func (m *ControlIHave) XXX_DiscardUnknown() {
xxx_messageInfo_ControlIHave.DiscardUnknown(m)
}
var xxx_messageInfo_ControlIHave proto.InternalMessageInfo
2018-02-19 17:24:19 +02:00
func (m *ControlIHave) GetTopicID() string {
if m != nil && m.TopicID != nil {
return *m.TopicID
}
return ""
}
func (m *ControlIHave) GetMessageIDs() []string {
if m != nil {
return m.MessageIDs
}
return nil
}
type ControlIWant struct {
MessageIDs []string `protobuf:"bytes,1,rep,name=messageIDs" json:"messageIDs,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
2018-02-19 17:24:19 +02:00
}
func (m *ControlIWant) Reset() { *m = ControlIWant{} }
func (m *ControlIWant) String() string { return proto.CompactTextString(m) }
func (*ControlIWant) ProtoMessage() {}
func (*ControlIWant) Descriptor() ([]byte, []int) {
2019-02-18 16:32:05 +01:00
return fileDescriptor_77a6da22d6a3feb1, []int{4}
}
func (m *ControlIWant) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ControlIWant) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ControlIWant.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
2019-02-18 16:32:05 +01:00
func (m *ControlIWant) XXX_Merge(src proto.Message) {
xxx_messageInfo_ControlIWant.Merge(m, src)
}
func (m *ControlIWant) XXX_Size() int {
return m.Size()
}
func (m *ControlIWant) XXX_DiscardUnknown() {
xxx_messageInfo_ControlIWant.DiscardUnknown(m)
}
var xxx_messageInfo_ControlIWant proto.InternalMessageInfo
2018-02-19 17:24:19 +02:00
func (m *ControlIWant) GetMessageIDs() []string {
if m != nil {
return m.MessageIDs
}
return nil
}
type ControlGraft struct {
TopicID *string `protobuf:"bytes,1,opt,name=topicID" json:"topicID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
2018-02-19 17:24:19 +02:00
}
func (m *ControlGraft) Reset() { *m = ControlGraft{} }
func (m *ControlGraft) String() string { return proto.CompactTextString(m) }
func (*ControlGraft) ProtoMessage() {}
func (*ControlGraft) Descriptor() ([]byte, []int) {
2019-02-18 16:32:05 +01:00
return fileDescriptor_77a6da22d6a3feb1, []int{5}
}
func (m *ControlGraft) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ControlGraft) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ControlGraft.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
2019-02-18 16:32:05 +01:00
func (m *ControlGraft) XXX_Merge(src proto.Message) {
xxx_messageInfo_ControlGraft.Merge(m, src)
}
func (m *ControlGraft) XXX_Size() int {
return m.Size()
}
func (m *ControlGraft) XXX_DiscardUnknown() {
xxx_messageInfo_ControlGraft.DiscardUnknown(m)
}
var xxx_messageInfo_ControlGraft proto.InternalMessageInfo
2018-02-19 17:24:19 +02:00
func (m *ControlGraft) GetTopicID() string {
if m != nil && m.TopicID != nil {
return *m.TopicID
}
return ""
}
type ControlPrune struct {
TopicID *string `protobuf:"bytes,1,opt,name=topicID" json:"topicID,omitempty"`
Peers []*PeerInfo `protobuf:"bytes,2,rep,name=peers" json:"peers,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
2018-02-19 17:24:19 +02:00
}
func (m *ControlPrune) Reset() { *m = ControlPrune{} }
func (m *ControlPrune) String() string { return proto.CompactTextString(m) }
func (*ControlPrune) ProtoMessage() {}
func (*ControlPrune) Descriptor() ([]byte, []int) {
2019-02-18 16:32:05 +01:00
return fileDescriptor_77a6da22d6a3feb1, []int{6}
}
func (m *ControlPrune) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ControlPrune) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ControlPrune.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
2019-02-18 16:32:05 +01:00
func (m *ControlPrune) XXX_Merge(src proto.Message) {
xxx_messageInfo_ControlPrune.Merge(m, src)
}
func (m *ControlPrune) XXX_Size() int {
return m.Size()
}
func (m *ControlPrune) XXX_DiscardUnknown() {
xxx_messageInfo_ControlPrune.DiscardUnknown(m)
}
var xxx_messageInfo_ControlPrune proto.InternalMessageInfo
2018-02-19 17:24:19 +02:00
func (m *ControlPrune) GetTopicID() string {
if m != nil && m.TopicID != nil {
return *m.TopicID
}
return ""
}
func (m *ControlPrune) GetPeers() []*PeerInfo {
if m != nil {
return m.Peers
}
return nil
}
type PeerInfo struct {
PeerID []byte `protobuf:"bytes,1,opt,name=peerID" json:"peerID,omitempty"`
SignedAddrs []byte `protobuf:"bytes,2,opt,name=signedAddrs" json:"signedAddrs,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_77a6da22d6a3feb1, []int{7}
}
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 (m *PeerInfo) XXX_Merge(src proto.Message) {
xxx_messageInfo_PeerInfo.Merge(m, 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) GetPeerID() []byte {
if m != nil {
return m.PeerID
}
return nil
}
func (m *PeerInfo) GetSignedAddrs() []byte {
if m != nil {
return m.SignedAddrs
}
return nil
}
2016-09-10 20:47:12 -07:00
type TopicDescriptor struct {
Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
Auth *TopicDescriptor_AuthOpts `protobuf:"bytes,2,opt,name=auth" json:"auth,omitempty"`
Enc *TopicDescriptor_EncOpts `protobuf:"bytes,3,opt,name=enc" json:"enc,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
2016-09-10 20:47:12 -07:00
}
func (m *TopicDescriptor) Reset() { *m = TopicDescriptor{} }
func (m *TopicDescriptor) String() string { return proto.CompactTextString(m) }
func (*TopicDescriptor) ProtoMessage() {}
func (*TopicDescriptor) Descriptor() ([]byte, []int) {
return fileDescriptor_77a6da22d6a3feb1, []int{8}
}
func (m *TopicDescriptor) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *TopicDescriptor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_TopicDescriptor.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
2019-02-18 16:32:05 +01:00
func (m *TopicDescriptor) XXX_Merge(src proto.Message) {
xxx_messageInfo_TopicDescriptor.Merge(m, src)
}
func (m *TopicDescriptor) XXX_Size() int {
return m.Size()
}
func (m *TopicDescriptor) XXX_DiscardUnknown() {
xxx_messageInfo_TopicDescriptor.DiscardUnknown(m)
}
var xxx_messageInfo_TopicDescriptor proto.InternalMessageInfo
2016-09-10 20:47:12 -07:00
func (m *TopicDescriptor) GetName() string {
if m != nil && m.Name != nil {
return *m.Name
2016-09-10 08:14:17 -07:00
}
return ""
}
2016-09-10 20:47:12 -07:00
func (m *TopicDescriptor) GetAuth() *TopicDescriptor_AuthOpts {
if m != nil {
return m.Auth
}
return nil
}
func (m *TopicDescriptor) GetEnc() *TopicDescriptor_EncOpts {
if m != nil {
return m.Enc
}
return nil
}
type TopicDescriptor_AuthOpts struct {
Mode *TopicDescriptor_AuthOpts_AuthMode `protobuf:"varint,1,opt,name=mode,enum=pubsub.pb.TopicDescriptor_AuthOpts_AuthMode" json:"mode,omitempty"`
Keys [][]byte `protobuf:"bytes,2,rep,name=keys" json:"keys,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
2016-09-10 20:47:12 -07:00
}
func (m *TopicDescriptor_AuthOpts) Reset() { *m = TopicDescriptor_AuthOpts{} }
func (m *TopicDescriptor_AuthOpts) String() string { return proto.CompactTextString(m) }
func (*TopicDescriptor_AuthOpts) ProtoMessage() {}
func (*TopicDescriptor_AuthOpts) Descriptor() ([]byte, []int) {
return fileDescriptor_77a6da22d6a3feb1, []int{8, 0}
}
func (m *TopicDescriptor_AuthOpts) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *TopicDescriptor_AuthOpts) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_TopicDescriptor_AuthOpts.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
2019-02-18 16:32:05 +01:00
func (m *TopicDescriptor_AuthOpts) XXX_Merge(src proto.Message) {
xxx_messageInfo_TopicDescriptor_AuthOpts.Merge(m, src)
}
func (m *TopicDescriptor_AuthOpts) XXX_Size() int {
return m.Size()
}
func (m *TopicDescriptor_AuthOpts) XXX_DiscardUnknown() {
xxx_messageInfo_TopicDescriptor_AuthOpts.DiscardUnknown(m)
}
var xxx_messageInfo_TopicDescriptor_AuthOpts proto.InternalMessageInfo
2016-09-10 20:47:12 -07:00
func (m *TopicDescriptor_AuthOpts) GetMode() TopicDescriptor_AuthOpts_AuthMode {
if m != nil && m.Mode != nil {
return *m.Mode
}
return TopicDescriptor_AuthOpts_NONE
}
func (m *TopicDescriptor_AuthOpts) GetKeys() [][]byte {
if m != nil {
return m.Keys
}
return nil
}
type TopicDescriptor_EncOpts struct {
Mode *TopicDescriptor_EncOpts_EncMode `protobuf:"varint,1,opt,name=mode,enum=pubsub.pb.TopicDescriptor_EncOpts_EncMode" json:"mode,omitempty"`
KeyHashes [][]byte `protobuf:"bytes,2,rep,name=keyHashes" json:"keyHashes,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
2016-09-10 20:47:12 -07:00
}
func (m *TopicDescriptor_EncOpts) Reset() { *m = TopicDescriptor_EncOpts{} }
func (m *TopicDescriptor_EncOpts) String() string { return proto.CompactTextString(m) }
func (*TopicDescriptor_EncOpts) ProtoMessage() {}
func (*TopicDescriptor_EncOpts) Descriptor() ([]byte, []int) {
return fileDescriptor_77a6da22d6a3feb1, []int{8, 1}
}
func (m *TopicDescriptor_EncOpts) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *TopicDescriptor_EncOpts) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_TopicDescriptor_EncOpts.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
2019-02-18 16:32:05 +01:00
func (m *TopicDescriptor_EncOpts) XXX_Merge(src proto.Message) {
xxx_messageInfo_TopicDescriptor_EncOpts.Merge(m, src)
}
func (m *TopicDescriptor_EncOpts) XXX_Size() int {
return m.Size()
}
func (m *TopicDescriptor_EncOpts) XXX_DiscardUnknown() {
xxx_messageInfo_TopicDescriptor_EncOpts.DiscardUnknown(m)
}
var xxx_messageInfo_TopicDescriptor_EncOpts proto.InternalMessageInfo
2016-09-10 20:47:12 -07:00
func (m *TopicDescriptor_EncOpts) GetMode() TopicDescriptor_EncOpts_EncMode {
if m != nil && m.Mode != nil {
return *m.Mode
}
return TopicDescriptor_EncOpts_NONE
}
func (m *TopicDescriptor_EncOpts) GetKeyHashes() [][]byte {
if m != nil {
return m.KeyHashes
}
return nil
}
2016-09-10 08:14:17 -07:00
func init() {
2019-02-18 16:32:05 +01:00
proto.RegisterEnum("pubsub.pb.TopicDescriptor_AuthOpts_AuthMode", TopicDescriptor_AuthOpts_AuthMode_name, TopicDescriptor_AuthOpts_AuthMode_value)
proto.RegisterEnum("pubsub.pb.TopicDescriptor_EncOpts_EncMode", TopicDescriptor_EncOpts_EncMode_name, TopicDescriptor_EncOpts_EncMode_value)
proto.RegisterType((*RPC)(nil), "pubsub.pb.RPC")
proto.RegisterType((*RPC_SubOpts)(nil), "pubsub.pb.RPC.SubOpts")
proto.RegisterType((*Message)(nil), "pubsub.pb.Message")
proto.RegisterType((*ControlMessage)(nil), "pubsub.pb.ControlMessage")
proto.RegisterType((*ControlIHave)(nil), "pubsub.pb.ControlIHave")
proto.RegisterType((*ControlIWant)(nil), "pubsub.pb.ControlIWant")
proto.RegisterType((*ControlGraft)(nil), "pubsub.pb.ControlGraft")
proto.RegisterType((*ControlPrune)(nil), "pubsub.pb.ControlPrune")
proto.RegisterType((*PeerInfo)(nil), "pubsub.pb.PeerInfo")
proto.RegisterType((*TopicDescriptor)(nil), "pubsub.pb.TopicDescriptor")
proto.RegisterType((*TopicDescriptor_AuthOpts)(nil), "pubsub.pb.TopicDescriptor.AuthOpts")
proto.RegisterType((*TopicDescriptor_EncOpts)(nil), "pubsub.pb.TopicDescriptor.EncOpts")
2016-09-10 08:14:17 -07:00
}
2019-02-18 16:32:05 +01:00
func init() { proto.RegisterFile("rpc.proto", fileDescriptor_77a6da22d6a3feb1) }
var fileDescriptor_77a6da22d6a3feb1 = []byte{
// 650 bytes of a gzipped FileDescriptorProto
2019-02-18 16:32:05 +01:00
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0xcd, 0x6e, 0xd3, 0x40,
0x10, 0xc7, 0xd9, 0x38, 0xa9, 0xe3, 0x89, 0x5b, 0xa2, 0x05, 0x15, 0x13, 0x55, 0x51, 0x64, 0x24,
0x14, 0xa0, 0xf8, 0x10, 0x90, 0xb8, 0x20, 0x44, 0x68, 0x22, 0x12, 0xa1, 0xb6, 0xd1, 0xb6, 0x52,
0xc5, 0xd1, 0x8e, 0xb7, 0x8d, 0xd5, 0xc6, 0x36, 0xfe, 0x28, 0xea, 0x1b, 0x70, 0x87, 0x67, 0xe1,
0x19, 0x38, 0x70, 0xe0, 0x11, 0x50, 0x6f, 0xbc, 0x05, 0xda, 0xd9, 0x4d, 0xe2, 0xa4, 0x1f, 0x70,
0xca, 0xec, 0xec, 0xef, 0x3f, 0xf3, 0x9f, 0x71, 0x16, 0x8c, 0x24, 0x1e, 0x3b, 0x71, 0x12, 0x65,
0x11, 0x35, 0xe2, 0xdc, 0x4b, 0x73, 0xcf, 0x89, 0x3d, 0xfb, 0x0f, 0x01, 0x8d, 0x8d, 0x76, 0xe8,
0x6b, 0x58, 0x4f, 0x73, 0x2f, 0x1d, 0x27, 0x41, 0x9c, 0x05, 0x51, 0x98, 0x5a, 0xa4, 0xa5, 0xb5,
0x6b, 0x9d, 0x4d, 0x67, 0x8e, 0x3a, 0x6c, 0xb4, 0xe3, 0x1c, 0xe4, 0xde, 0x7e, 0x9c, 0xa5, 0x6c,
0x19, 0xa6, 0xdb, 0xa0, 0xc7, 0xb9, 0x77, 0x16, 0xa4, 0x13, 0xab, 0x84, 0x3a, 0x5a, 0xd0, 0xed,
0xf2, 0x34, 0x75, 0x4f, 0x38, 0x9b, 0x21, 0xf4, 0x05, 0xe8, 0xe3, 0x28, 0xcc, 0x92, 0xe8, 0xcc,
0xd2, 0x5a, 0xa4, 0x5d, 0xeb, 0x3c, 0x2c, 0xd0, 0x3b, 0xf2, 0x66, 0x2e, 0x52, 0x64, 0xa3, 0x0b,
0xba, 0x6a, 0x4e, 0xb7, 0xc0, 0x50, 0xed, 0x3d, 0x6e, 0x91, 0x16, 0x69, 0x57, 0xd9, 0x22, 0x41,
0x2d, 0xd0, 0xb3, 0x28, 0x0e, 0xc6, 0x81, 0x6f, 0x95, 0x5a, 0xa4, 0x6d, 0xb0, 0xd9, 0xd1, 0xfe,
0x4a, 0x40, 0x57, 0x75, 0x29, 0x85, 0xf2, 0x71, 0x12, 0x4d, 0x51, 0x6e, 0x32, 0x8c, 0x45, 0xce,
0x77, 0x33, 0x17, 0x65, 0x26, 0xc3, 0x98, 0xde, 0x87, 0x4a, 0xca, 0x3f, 0x85, 0x11, 0x3a, 0x35,
0x99, 0x3c, 0xd0, 0x06, 0x54, 0xb1, 0xe8, 0xb0, 0x97, 0x5a, 0xe5, 0x96, 0xd6, 0x36, 0xd8, 0xfc,
0x8c, 0xee, 0x82, 0x93, 0xd0, 0xcd, 0xf2, 0x84, 0x5b, 0x15, 0x54, 0x2d, 0x12, 0xb4, 0x0e, 0xda,
0x29, 0xbf, 0xb0, 0xd6, 0x30, 0x2f, 0x42, 0xfb, 0x27, 0x81, 0x8d, 0xe5, 0xa1, 0xe9, 0x73, 0xa8,
0x04, 0x13, 0xf7, 0x9c, 0xab, 0x8f, 0xf0, 0xe0, 0xea, 0x7a, 0x86, 0x03, 0xf7, 0x9c, 0x33, 0x49,
0x21, 0xfe, 0xd9, 0x0d, 0x33, 0xb5, 0xfb, 0xeb, 0xf0, 0x23, 0x37, 0xcc, 0x98, 0xa4, 0x04, 0x7e,
0x92, 0xb8, 0xc7, 0x99, 0xa5, 0xdd, 0x84, 0xbf, 0x17, 0xd7, 0x4c, 0x52, 0x02, 0x8f, 0x93, 0x3c,
0xe4, 0x38, 0xe8, 0xb5, 0xf8, 0x48, 0x5c, 0x33, 0x49, 0xd9, 0x03, 0x30, 0x8b, 0x1e, 0xe7, 0x9f,
0x63, 0xd8, 0xc3, 0x5d, 0xcf, 0x3e, 0xc7, 0xb0, 0x47, 0x9b, 0x00, 0x53, 0x39, 0xb0, 0x58, 0x63,
0x09, 0xd7, 0x58, 0xc8, 0xd8, 0xce, 0xa2, 0x92, 0xb0, 0xbf, 0xc2, 0x93, 0x2b, 0x7c, 0x7b, 0xce,
0xa3, 0xff, 0x9b, 0x3b, 0xdb, 0x07, 0x73, 0x12, 0xad, 0xdf, 0xe2, 0xf1, 0x09, 0x54, 0x62, 0xce,
0x93, 0x54, 0xad, 0xf6, 0x5e, 0x61, 0xf8, 0x11, 0xe7, 0xc9, 0x30, 0x3c, 0x8e, 0x98, 0x24, 0xec,
0x1e, 0x54, 0x67, 0x29, 0xba, 0x09, 0x6b, 0x22, 0xa9, 0xea, 0x99, 0x4c, 0x9d, 0x68, 0x0b, 0x6a,
0xe2, 0xaf, 0xc0, 0xfd, 0xae, 0xef, 0x63, 0x51, 0x71, 0x59, 0x4c, 0xd9, 0xdf, 0x35, 0xb8, 0x7b,
0x28, 0x9a, 0xf7, 0xb8, 0x7c, 0x5f, 0x51, 0x22, 0xfe, 0x97, 0xa1, 0x3b, 0xe5, 0xca, 0x1b, 0xc6,
0xf4, 0x15, 0x94, 0xdd, 0x3c, 0x9b, 0x60, 0x89, 0x5a, 0xe7, 0x51, 0xc1, 0xd7, 0x8a, 0xda, 0xe9,
0xe6, 0xd9, 0x04, 0xdf, 0x2c, 0x0a, 0xe8, 0x4b, 0xd0, 0x78, 0x38, 0x56, 0x0f, 0xcf, 0xbe, 0x45,
0xd7, 0x0f, 0xc7, 0x28, 0x13, 0x78, 0xe3, 0x0b, 0x81, 0xea, 0xac, 0x10, 0x7d, 0x0b, 0xe5, 0x69,
0xe4, 0x4b, 0x3f, 0x1b, 0x9d, 0xed, 0xff, 0xe8, 0x8d, 0xc1, 0x6e, 0xe4, 0x73, 0x86, 0x4a, 0x31,
0xd1, 0x29, 0xbf, 0x90, 0x5b, 0x35, 0x19, 0xc6, 0xf6, 0x63, 0xd9, 0x41, 0x50, 0xb4, 0x0a, 0xe5,
0xbd, 0xfd, 0xbd, 0x7e, 0xfd, 0x0e, 0xd5, 0x41, 0xfb, 0xd0, 0xff, 0x58, 0x27, 0x22, 0x38, 0xda,
0x3f, 0xac, 0x97, 0x1a, 0xdf, 0x08, 0xe8, 0xca, 0x1b, 0x7d, 0xb3, 0xe4, 0xe4, 0xe9, 0xbf, 0xa7,
0x11, 0xbf, 0x05, 0x1f, 0x5b, 0x60, 0x9c, 0xf2, 0x8b, 0x81, 0x9b, 0x4e, 0xf8, 0xcc, 0xcc, 0x22,
0x61, 0x3f, 0xc3, 0x46, 0x2b, 0x86, 0xd6, 0xc1, 0x38, 0x18, 0x74, 0x59, 0xbf, 0xb7, 0x6c, 0xeb,
0x9d, 0xf9, 0xe3, 0xb2, 0x49, 0x7e, 0x5d, 0x36, 0xc9, 0xef, 0xcb, 0x26, 0xf9, 0x1b, 0x00, 0x00,
0xff, 0xff, 0xe3, 0x53, 0xd4, 0xac, 0x6d, 0x05, 0x00, 0x00,
2019-02-18 16:32:05 +01:00
}
func (m *RPC) 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 *RPC) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Subscriptions) > 0 {
for _, msg := range m.Subscriptions {
dAtA[i] = 0xa
i++
i = encodeVarintRpc(dAtA, i, uint64(msg.Size()))
n, err := msg.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n
}
}
if len(m.Publish) > 0 {
for _, msg := range m.Publish {
dAtA[i] = 0x12
i++
i = encodeVarintRpc(dAtA, i, uint64(msg.Size()))
n, err := msg.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n
}
}
if m.Control != nil {
dAtA[i] = 0x1a
i++
i = encodeVarintRpc(dAtA, i, uint64(m.Control.Size()))
n1, err1 := m.Control.MarshalTo(dAtA[i:])
if err1 != nil {
return 0, err1
}
i += n1
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *RPC_SubOpts) 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 *RPC_SubOpts) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Subscribe != nil {
dAtA[i] = 0x8
i++
if *m.Subscribe {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i++
}
if m.Topicid != nil {
dAtA[i] = 0x12
i++
i = encodeVarintRpc(dAtA, i, uint64(len(*m.Topicid)))
i += copy(dAtA[i:], *m.Topicid)
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *Message) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Message) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.From != nil {
dAtA[i] = 0xa
i++
i = encodeVarintRpc(dAtA, i, uint64(len(m.From)))
i += copy(dAtA[i:], m.From)
}
if m.Data != nil {
dAtA[i] = 0x12
i++
i = encodeVarintRpc(dAtA, i, uint64(len(m.Data)))
i += copy(dAtA[i:], m.Data)
}
if m.Seqno != nil {
dAtA[i] = 0x1a
i++
i = encodeVarintRpc(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 = encodeVarintRpc(dAtA, i, uint64(len(m.Signature)))
i += copy(dAtA[i:], m.Signature)
}
if m.Key != nil {
dAtA[i] = 0x32
i++
i = encodeVarintRpc(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 *ControlMessage) 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 *ControlMessage) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Ihave) > 0 {
for _, msg := range m.Ihave {
dAtA[i] = 0xa
i++
i = encodeVarintRpc(dAtA, i, uint64(msg.Size()))
n, err := msg.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n
}
}
if len(m.Iwant) > 0 {
for _, msg := range m.Iwant {
dAtA[i] = 0x12
i++
i = encodeVarintRpc(dAtA, i, uint64(msg.Size()))
n, err := msg.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n
}
}
if len(m.Graft) > 0 {
for _, msg := range m.Graft {
dAtA[i] = 0x1a
i++
i = encodeVarintRpc(dAtA, i, uint64(msg.Size()))
n, err := msg.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n
}
}
if len(m.Prune) > 0 {
for _, msg := range m.Prune {
dAtA[i] = 0x22
i++
i = encodeVarintRpc(dAtA, i, uint64(msg.Size()))
n, err := msg.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n
}
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *ControlIHave) 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 *ControlIHave) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.TopicID != nil {
dAtA[i] = 0xa
i++
i = encodeVarintRpc(dAtA, i, uint64(len(*m.TopicID)))
i += copy(dAtA[i:], *m.TopicID)
}
if len(m.MessageIDs) > 0 {
for _, s := range m.MessageIDs {
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 *ControlIWant) 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 *ControlIWant) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.MessageIDs) > 0 {
for _, s := range m.MessageIDs {
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 m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *ControlGraft) 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 *ControlGraft) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.TopicID != nil {
dAtA[i] = 0xa
i++
i = encodeVarintRpc(dAtA, i, uint64(len(*m.TopicID)))
i += copy(dAtA[i:], *m.TopicID)
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *ControlPrune) 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 *ControlPrune) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.TopicID != nil {
dAtA[i] = 0xa
i++
i = encodeVarintRpc(dAtA, i, uint64(len(*m.TopicID)))
i += copy(dAtA[i:], *m.TopicID)
}
if len(m.Peers) > 0 {
for _, msg := range m.Peers {
dAtA[i] = 0x12
i++
i = encodeVarintRpc(dAtA, i, uint64(msg.Size()))
n, err := msg.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n
}
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *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.PeerID != nil {
dAtA[i] = 0xa
i++
i = encodeVarintRpc(dAtA, i, uint64(len(m.PeerID)))
i += copy(dAtA[i:], m.PeerID)
}
if m.SignedAddrs != nil {
dAtA[i] = 0x12
i++
i = encodeVarintRpc(dAtA, i, uint64(len(m.SignedAddrs)))
i += copy(dAtA[i:], m.SignedAddrs)
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *TopicDescriptor) 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 *TopicDescriptor) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Name != nil {
dAtA[i] = 0xa
i++
i = encodeVarintRpc(dAtA, i, uint64(len(*m.Name)))
i += copy(dAtA[i:], *m.Name)
}
if m.Auth != nil {
dAtA[i] = 0x12
i++
i = encodeVarintRpc(dAtA, i, uint64(m.Auth.Size()))
n2, err2 := m.Auth.MarshalTo(dAtA[i:])
if err2 != nil {
return 0, err2
}
i += n2
}
if m.Enc != nil {
dAtA[i] = 0x1a
i++
i = encodeVarintRpc(dAtA, i, uint64(m.Enc.Size()))
n3, err3 := m.Enc.MarshalTo(dAtA[i:])
if err3 != nil {
return 0, err3
}
i += n3
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *TopicDescriptor_AuthOpts) 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 *TopicDescriptor_AuthOpts) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Mode != nil {
dAtA[i] = 0x8
i++
i = encodeVarintRpc(dAtA, i, uint64(*m.Mode))
}
if len(m.Keys) > 0 {
for _, b := range m.Keys {
dAtA[i] = 0x12
i++
i = encodeVarintRpc(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 *TopicDescriptor_EncOpts) 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 *TopicDescriptor_EncOpts) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Mode != nil {
dAtA[i] = 0x8
i++
i = encodeVarintRpc(dAtA, i, uint64(*m.Mode))
}
if len(m.KeyHashes) > 0 {
for _, b := range m.KeyHashes {
dAtA[i] = 0x12
i++
i = encodeVarintRpc(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 encodeVarintRpc(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 *RPC) Size() (n int) {
2019-02-18 16:32:05 +01:00
if m == nil {
return 0
}
var l int
_ = l
if len(m.Subscriptions) > 0 {
for _, e := range m.Subscriptions {
l = e.Size()
n += 1 + l + sovRpc(uint64(l))
}
}
if len(m.Publish) > 0 {
for _, e := range m.Publish {
l = e.Size()
n += 1 + l + sovRpc(uint64(l))
}
}
if m.Control != nil {
l = m.Control.Size()
n += 1 + l + sovRpc(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *RPC_SubOpts) Size() (n int) {
2019-02-18 16:32:05 +01:00
if m == nil {
return 0
}
var l int
_ = l
if m.Subscribe != nil {
n += 2
}
if m.Topicid != nil {
l = len(*m.Topicid)
n += 1 + l + sovRpc(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *Message) Size() (n int) {
2019-02-18 16:32:05 +01:00
if m == nil {
return 0
}
var l int
_ = l
if m.From != nil {
l = len(m.From)
n += 1 + l + sovRpc(uint64(l))
}
if m.Data != nil {
l = len(m.Data)
n += 1 + l + sovRpc(uint64(l))
}
if m.Seqno != nil {
l = len(m.Seqno)
n += 1 + l + sovRpc(uint64(l))
}
if len(m.TopicIDs) > 0 {
for _, s := range m.TopicIDs {
l = len(s)
n += 1 + l + sovRpc(uint64(l))
}
}
if m.Signature != nil {
l = len(m.Signature)
n += 1 + l + sovRpc(uint64(l))
}
if m.Key != nil {
l = len(m.Key)
n += 1 + l + sovRpc(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *ControlMessage) Size() (n int) {
2019-02-18 16:32:05 +01:00
if m == nil {
return 0
}
var l int
_ = l
if len(m.Ihave) > 0 {
for _, e := range m.Ihave {
l = e.Size()
n += 1 + l + sovRpc(uint64(l))
}
}
if len(m.Iwant) > 0 {
for _, e := range m.Iwant {
l = e.Size()
n += 1 + l + sovRpc(uint64(l))
}
}
if len(m.Graft) > 0 {
for _, e := range m.Graft {
l = e.Size()
n += 1 + l + sovRpc(uint64(l))
}
}
if len(m.Prune) > 0 {
for _, e := range m.Prune {
l = e.Size()
n += 1 + l + sovRpc(uint64(l))
}
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *ControlIHave) Size() (n int) {
2019-02-18 16:32:05 +01:00
if m == nil {
return 0
}
var l int
_ = l
if m.TopicID != nil {
l = len(*m.TopicID)
n += 1 + l + sovRpc(uint64(l))
}
if len(m.MessageIDs) > 0 {
for _, s := range m.MessageIDs {
l = len(s)
n += 1 + l + sovRpc(uint64(l))
}
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *ControlIWant) Size() (n int) {
2019-02-18 16:32:05 +01:00
if m == nil {
return 0
}
var l int
_ = l
if len(m.MessageIDs) > 0 {
for _, s := range m.MessageIDs {
l = len(s)
n += 1 + l + sovRpc(uint64(l))
}
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *ControlGraft) Size() (n int) {
2019-02-18 16:32:05 +01:00
if m == nil {
return 0
}
var l int
_ = l
if m.TopicID != nil {
l = len(*m.TopicID)
n += 1 + l + sovRpc(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *ControlPrune) Size() (n int) {
2019-02-18 16:32:05 +01:00
if m == nil {
return 0
}
var l int
_ = l
if m.TopicID != nil {
l = len(*m.TopicID)
n += 1 + l + sovRpc(uint64(l))
}
if len(m.Peers) > 0 {
for _, e := range m.Peers {
l = e.Size()
n += 1 + l + sovRpc(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.PeerID != nil {
l = len(m.PeerID)
n += 1 + l + sovRpc(uint64(l))
}
if m.SignedAddrs != nil {
l = len(m.SignedAddrs)
n += 1 + l + sovRpc(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *TopicDescriptor) Size() (n int) {
2019-02-18 16:32:05 +01:00
if m == nil {
return 0
}
var l int
_ = l
if m.Name != nil {
l = len(*m.Name)
n += 1 + l + sovRpc(uint64(l))
}
if m.Auth != nil {
l = m.Auth.Size()
n += 1 + l + sovRpc(uint64(l))
}
if m.Enc != nil {
l = m.Enc.Size()
n += 1 + l + sovRpc(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *TopicDescriptor_AuthOpts) Size() (n int) {
2019-02-18 16:32:05 +01:00
if m == nil {
return 0
}
var l int
_ = l
if m.Mode != nil {
n += 1 + sovRpc(uint64(*m.Mode))
}
if len(m.Keys) > 0 {
for _, b := range m.Keys {
l = len(b)
n += 1 + l + sovRpc(uint64(l))
}
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *TopicDescriptor_EncOpts) Size() (n int) {
2019-02-18 16:32:05 +01:00
if m == nil {
return 0
}
var l int
_ = l
if m.Mode != nil {
n += 1 + sovRpc(uint64(*m.Mode))
}
if len(m.KeyHashes) > 0 {
for _, b := range m.KeyHashes {
l = len(b)
n += 1 + l + sovRpc(uint64(l))
}
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func sovRpc(x uint64) (n int) {
for {
n++
x >>= 7
if x == 0 {
break
}
}
return n
}
func sozRpc(x uint64) (n int) {
return sovRpc(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *RPC) 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 ErrIntOverflowRpc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
2019-02-18 16:32:05 +01:00
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: RPC: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: RPC: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Subscriptions", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRpc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
2019-02-18 16:32:05 +01:00
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthRpc
}
postIndex := iNdEx + msglen
2019-02-18 16:32:05 +01:00
if postIndex < 0 {
return ErrInvalidLengthRpc
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Subscriptions = append(m.Subscriptions, &RPC_SubOpts{})
if err := m.Subscriptions[len(m.Subscriptions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Publish", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRpc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
2019-02-18 16:32:05 +01:00
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthRpc
}
postIndex := iNdEx + msglen
2019-02-18 16:32:05 +01:00
if postIndex < 0 {
return ErrInvalidLengthRpc
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Publish = append(m.Publish, &Message{})
if err := m.Publish[len(m.Publish)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Control", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRpc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
2019-02-18 16:32:05 +01:00
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthRpc
}
postIndex := iNdEx + msglen
2019-02-18 16:32:05 +01:00
if postIndex < 0 {
return ErrInvalidLengthRpc
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Control == nil {
m.Control = &ControlMessage{}
}
if err := m.Control.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipRpc(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthRpc
}
2019-02-18 16:32:05 +01:00
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthRpc
}
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 *RPC_SubOpts) 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 ErrIntOverflowRpc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
2019-02-18 16:32:05 +01:00
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: SubOpts: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: SubOpts: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Subscribe", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRpc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
2019-02-18 16:32:05 +01:00
v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
b := bool(v != 0)
m.Subscribe = &b
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Topicid", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRpc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
2019-02-18 16:32:05 +01:00
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthRpc
}
postIndex := iNdEx + intStringLen
2019-02-18 16:32:05 +01:00
if postIndex < 0 {
return ErrInvalidLengthRpc
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
s := string(dAtA[iNdEx:postIndex])
m.Topicid = &s
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipRpc(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthRpc
}
2019-02-18 16:32:05 +01:00
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthRpc
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Message) 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 ErrIntOverflowRpc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
2019-02-18 16:32:05 +01:00
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: Message: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Message: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 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 ErrIntOverflowRpc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
2019-02-18 16:32:05 +01:00
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthRpc
}
postIndex := iNdEx + byteLen
2019-02-18 16:32:05 +01:00
if postIndex < 0 {
return ErrInvalidLengthRpc
}
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 ErrIntOverflowRpc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
2019-02-18 16:32:05 +01:00
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthRpc
}
postIndex := iNdEx + byteLen
2019-02-18 16:32:05 +01:00
if postIndex < 0 {
return ErrInvalidLengthRpc
}
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 ErrIntOverflowRpc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
2019-02-18 16:32:05 +01:00
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthRpc
}
postIndex := iNdEx + byteLen
2019-02-18 16:32:05 +01:00
if postIndex < 0 {
return ErrInvalidLengthRpc
}
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 ErrIntOverflowRpc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
2019-02-18 16:32:05 +01:00
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthRpc
}
postIndex := iNdEx + intStringLen
2019-02-18 16:32:05 +01:00
if postIndex < 0 {
return ErrInvalidLengthRpc
}
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 ErrIntOverflowRpc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
2019-02-18 16:32:05 +01:00
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthRpc
}
postIndex := iNdEx + byteLen
2019-02-18 16:32:05 +01:00
if postIndex < 0 {
return ErrInvalidLengthRpc
}
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 ErrIntOverflowRpc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
2019-02-18 16:32:05 +01:00
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthRpc
}
postIndex := iNdEx + byteLen
2019-02-18 16:32:05 +01:00
if postIndex < 0 {
return ErrInvalidLengthRpc
}
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 := skipRpc(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthRpc
}
2019-02-18 16:32:05 +01:00
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthRpc
}
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 *ControlMessage) 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 ErrIntOverflowRpc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
2019-02-18 16:32:05 +01:00
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: ControlMessage: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: ControlMessage: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Ihave", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRpc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
2019-02-18 16:32:05 +01:00
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthRpc
}
postIndex := iNdEx + msglen
2019-02-18 16:32:05 +01:00
if postIndex < 0 {
return ErrInvalidLengthRpc
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Ihave = append(m.Ihave, &ControlIHave{})
if err := m.Ihave[len(m.Ihave)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Iwant", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRpc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
2019-02-18 16:32:05 +01:00
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthRpc
}
postIndex := iNdEx + msglen
2019-02-18 16:32:05 +01:00
if postIndex < 0 {
return ErrInvalidLengthRpc
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Iwant = append(m.Iwant, &ControlIWant{})
if err := m.Iwant[len(m.Iwant)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Graft", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRpc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
2019-02-18 16:32:05 +01:00
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthRpc
}
postIndex := iNdEx + msglen
2019-02-18 16:32:05 +01:00
if postIndex < 0 {
return ErrInvalidLengthRpc
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Graft = append(m.Graft, &ControlGraft{})
if err := m.Graft[len(m.Graft)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Prune", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRpc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
2019-02-18 16:32:05 +01:00
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthRpc
}
postIndex := iNdEx + msglen
2019-02-18 16:32:05 +01:00
if postIndex < 0 {
return ErrInvalidLengthRpc
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Prune = append(m.Prune, &ControlPrune{})
if err := m.Prune[len(m.Prune)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipRpc(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthRpc
}
2019-02-18 16:32:05 +01:00
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthRpc
}
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 *ControlIHave) 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 ErrIntOverflowRpc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
2019-02-18 16:32:05 +01:00
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: ControlIHave: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: ControlIHave: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field TopicID", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRpc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
2019-02-18 16:32:05 +01:00
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthRpc
}
postIndex := iNdEx + intStringLen
2019-02-18 16:32:05 +01:00
if postIndex < 0 {
return ErrInvalidLengthRpc
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
s := string(dAtA[iNdEx:postIndex])
m.TopicID = &s
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field MessageIDs", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRpc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
2019-02-18 16:32:05 +01:00
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthRpc
}
postIndex := iNdEx + intStringLen
2019-02-18 16:32:05 +01:00
if postIndex < 0 {
return ErrInvalidLengthRpc
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.MessageIDs = append(m.MessageIDs, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipRpc(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthRpc
}
2019-02-18 16:32:05 +01:00
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthRpc
}
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 *ControlIWant) 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 ErrIntOverflowRpc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
2019-02-18 16:32:05 +01:00
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: ControlIWant: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: ControlIWant: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field MessageIDs", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRpc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
2019-02-18 16:32:05 +01:00
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthRpc
}
postIndex := iNdEx + intStringLen
2019-02-18 16:32:05 +01:00
if postIndex < 0 {
return ErrInvalidLengthRpc
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.MessageIDs = append(m.MessageIDs, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipRpc(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthRpc
}
2019-02-18 16:32:05 +01:00
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthRpc
}
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 *ControlGraft) 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 ErrIntOverflowRpc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
2019-02-18 16:32:05 +01:00
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: ControlGraft: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: ControlGraft: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field TopicID", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRpc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
2019-02-18 16:32:05 +01:00
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthRpc
}
postIndex := iNdEx + intStringLen
2019-02-18 16:32:05 +01:00
if postIndex < 0 {
return ErrInvalidLengthRpc
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
s := string(dAtA[iNdEx:postIndex])
m.TopicID = &s
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipRpc(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthRpc
}
2019-02-18 16:32:05 +01:00
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthRpc
}
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 *ControlPrune) 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 ErrIntOverflowRpc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
2019-02-18 16:32:05 +01:00
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: ControlPrune: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: ControlPrune: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field TopicID", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRpc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
2019-02-18 16:32:05 +01:00
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthRpc
}
postIndex := iNdEx + intStringLen
2019-02-18 16:32:05 +01:00
if postIndex < 0 {
return ErrInvalidLengthRpc
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
s := string(dAtA[iNdEx:postIndex])
m.TopicID = &s
iNdEx = postIndex
case 2:
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 ErrIntOverflowRpc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthRpc
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthRpc
}
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
default:
iNdEx = preIndex
skippy, err := skipRpc(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthRpc
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthRpc
}
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 *PeerInfo) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRpc
}
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 PeerID", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRpc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthRpc
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthRpc
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.PeerID = append(m.PeerID[:0], dAtA[iNdEx:postIndex]...)
if m.PeerID == nil {
m.PeerID = []byte{}
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field SignedAddrs", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRpc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthRpc
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthRpc
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.SignedAddrs = append(m.SignedAddrs[:0], dAtA[iNdEx:postIndex]...)
if m.SignedAddrs == nil {
m.SignedAddrs = []byte{}
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipRpc(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthRpc
}
2019-02-18 16:32:05 +01:00
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthRpc
}
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 *TopicDescriptor) 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 ErrIntOverflowRpc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
2019-02-18 16:32:05 +01:00
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: TopicDescriptor: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: TopicDescriptor: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRpc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
2019-02-18 16:32:05 +01:00
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthRpc
}
postIndex := iNdEx + intStringLen
2019-02-18 16:32:05 +01:00
if postIndex < 0 {
return ErrInvalidLengthRpc
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
s := string(dAtA[iNdEx:postIndex])
m.Name = &s
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Auth", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRpc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
2019-02-18 16:32:05 +01:00
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthRpc
}
postIndex := iNdEx + msglen
2019-02-18 16:32:05 +01:00
if postIndex < 0 {
return ErrInvalidLengthRpc
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Auth == nil {
m.Auth = &TopicDescriptor_AuthOpts{}
}
if err := m.Auth.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Enc", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRpc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
2019-02-18 16:32:05 +01:00
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthRpc
}
postIndex := iNdEx + msglen
2019-02-18 16:32:05 +01:00
if postIndex < 0 {
return ErrInvalidLengthRpc
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Enc == nil {
m.Enc = &TopicDescriptor_EncOpts{}
}
if err := m.Enc.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipRpc(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthRpc
}
2019-02-18 16:32:05 +01:00
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthRpc
}
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 *TopicDescriptor_AuthOpts) 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 ErrIntOverflowRpc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
2019-02-18 16:32:05 +01:00
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: AuthOpts: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: AuthOpts: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType)
}
var v TopicDescriptor_AuthOpts_AuthMode
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRpc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
2019-02-18 16:32:05 +01:00
v |= TopicDescriptor_AuthOpts_AuthMode(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.Mode = &v
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Keys", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRpc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
2019-02-18 16:32:05 +01:00
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthRpc
}
postIndex := iNdEx + byteLen
2019-02-18 16:32:05 +01:00
if postIndex < 0 {
return ErrInvalidLengthRpc
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Keys = append(m.Keys, make([]byte, postIndex-iNdEx))
copy(m.Keys[len(m.Keys)-1], dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipRpc(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthRpc
}
2019-02-18 16:32:05 +01:00
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthRpc
}
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 *TopicDescriptor_EncOpts) 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 ErrIntOverflowRpc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
2019-02-18 16:32:05 +01:00
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: EncOpts: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: EncOpts: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType)
}
var v TopicDescriptor_EncOpts_EncMode
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRpc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
2019-02-18 16:32:05 +01:00
v |= TopicDescriptor_EncOpts_EncMode(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.Mode = &v
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field KeyHashes", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRpc
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
2019-02-18 16:32:05 +01:00
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthRpc
}
postIndex := iNdEx + byteLen
2019-02-18 16:32:05 +01:00
if postIndex < 0 {
return ErrInvalidLengthRpc
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.KeyHashes = append(m.KeyHashes, make([]byte, postIndex-iNdEx))
copy(m.KeyHashes[len(m.KeyHashes)-1], dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipRpc(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthRpc
}
2019-02-18 16:32:05 +01:00
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthRpc
}
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 skipRpc(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, ErrIntOverflowRpc
}
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, ErrIntOverflowRpc
}
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, ErrIntOverflowRpc
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLengthRpc
}
2019-02-18 16:32:05 +01:00
iNdEx += length
if iNdEx < 0 {
return 0, ErrInvalidLengthRpc
}
return iNdEx, nil
case 3:
for {
var innerWire uint64
var start int = iNdEx
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowRpc
}
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 := skipRpc(dAtA[start:])
if err != nil {
return 0, err
}
iNdEx = start + next
if iNdEx < 0 {
return 0, ErrInvalidLengthRpc
}
}
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 (
ErrInvalidLengthRpc = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowRpc = fmt.Errorf("proto: integer overflow")
)