From ca4bfd653932f7fe8f6a448c73ec5078fd8a25a4 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Wed, 8 Aug 2018 10:59:27 -0700 Subject: [PATCH] update gogo protobuf and rebuild protobuf file --- package.json | 12 +- pb/Makefile | 11 + pb/rpc.pb.go | 2592 ++++++++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 2554 insertions(+), 61 deletions(-) create mode 100644 pb/Makefile diff --git a/package.json b/package.json index 592720c..fd7cf25 100644 --- a/package.json +++ b/package.json @@ -7,12 +7,6 @@ "dvcsimport": "github.com/libp2p/go-floodsub" }, "gxDependencies": [ - { - "author": "whyrusleeping", - "hash": "QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV", - "name": "gogo-protobuf", - "version": "0.0.0" - }, { "author": "whyrusleeping", "hash": "QmYftoT56eEfUBTD3erR6heXuPSUhGRezSmhSU8LeczP8b", @@ -65,6 +59,12 @@ "hash": "QmemVjhp1UuWPQqrWSvPcaqH3QJRMjMqNm4T2RULMkDDQe", "name": "go-libp2p-swarm", "version": "3.0.6" + }, + { + "author": "whyrusleeping", + "hash": "QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8", + "name": "gogo-protobuf", + "version": "0.0.0" } ], "gxVersion": "0.9.0", diff --git a/pb/Makefile b/pb/Makefile new file mode 100644 index 0000000..eb14b57 --- /dev/null +++ b/pb/Makefile @@ -0,0 +1,11 @@ +PB = $(wildcard *.proto) +GO = $(PB:.proto=.pb.go) + +all: $(GO) + +%.pb.go: %.proto + protoc --proto_path=$(GOPATH)/src:. --gogofast_out=. $< + +clean: + rm -f *.pb.go + rm -f *.go diff --git a/pb/rpc.pb.go b/pb/rpc.pb.go index f970bbc..b4d7bcf 100644 --- a/pb/rpc.pb.go +++ b/pb/rpc.pb.go @@ -1,34 +1,25 @@ -// Code generated by protoc-gen-gogo. +// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: rpc.proto -// DO NOT EDIT! - -/* -Package floodsub_pb is a generated protocol buffer package. - -It is generated from these files: - rpc.proto - -It has these top-level messages: - RPC - Message - ControlMessage - ControlIHave - ControlIWant - ControlGraft - ControlPrune - TopicDescriptor -*/ + package floodsub_pb import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" +import io "io" + // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + type TopicDescriptor_AuthOpts_AuthMode int32 const ( @@ -64,6 +55,9 @@ func (x *TopicDescriptor_AuthOpts_AuthMode) UnmarshalJSON(data []byte) error { *x = TopicDescriptor_AuthOpts_AuthMode(value) return nil } +func (TopicDescriptor_AuthOpts_AuthMode) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_rpc_9f02422616139c62, []int{7, 0, 0} +} type TopicDescriptor_EncOpts_EncMode int32 @@ -100,17 +94,51 @@ func (x *TopicDescriptor_EncOpts_EncMode) UnmarshalJSON(data []byte) error { *x = TopicDescriptor_EncOpts_EncMode(value) return nil } +func (TopicDescriptor_EncOpts_EncMode) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_rpc_9f02422616139c62, []int{7, 1, 0} +} 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_unrecognized []byte `json:"-"` + 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:"-"` } func (m *RPC) Reset() { *m = RPC{} } func (m *RPC) String() string { return proto.CompactTextString(m) } func (*RPC) ProtoMessage() {} +func (*RPC) Descriptor() ([]byte, []int) { + return fileDescriptor_rpc_9f02422616139c62, []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 + } +} +func (dst *RPC) XXX_Merge(src proto.Message) { + xxx_messageInfo_RPC.Merge(dst, 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 func (m *RPC) GetSubscriptions() []*RPC_SubOpts { if m != nil { @@ -134,14 +162,45 @@ func (m *RPC) GetControl() *ControlMessage { } 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_unrecognized []byte `json:"-"` + 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:"-"` } 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) { + return fileDescriptor_rpc_9f02422616139c62, []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 + } +} +func (dst *RPC_SubOpts) XXX_Merge(src proto.Message) { + xxx_messageInfo_RPC_SubOpts.Merge(dst, 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 func (m *RPC_SubOpts) GetSubscribe() bool { if m != nil && m.Subscribe != nil { @@ -158,16 +217,47 @@ func (m *RPC_SubOpts) GetTopicid() string { } 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"` - XXX_unrecognized []byte `json:"-"` + 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"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *Message) Reset() { *m = Message{} } func (m *Message) String() string { return proto.CompactTextString(m) } func (*Message) ProtoMessage() {} +func (*Message) Descriptor() ([]byte, []int) { + return fileDescriptor_rpc_9f02422616139c62, []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 + } +} +func (dst *Message) XXX_Merge(src proto.Message) { + xxx_messageInfo_Message.Merge(dst, src) +} +func (m *Message) XXX_Size() int { + return m.Size() +} +func (m *Message) XXX_DiscardUnknown() { + xxx_messageInfo_Message.DiscardUnknown(m) +} + +var xxx_messageInfo_Message proto.InternalMessageInfo func (m *Message) GetFrom() []byte { if m != nil { @@ -198,16 +288,47 @@ func (m *Message) GetTopicIDs() []string { } 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_unrecognized []byte `json:"-"` + 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:"-"` } func (m *ControlMessage) Reset() { *m = ControlMessage{} } func (m *ControlMessage) String() string { return proto.CompactTextString(m) } func (*ControlMessage) ProtoMessage() {} +func (*ControlMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_rpc_9f02422616139c62, []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 + } +} +func (dst *ControlMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_ControlMessage.Merge(dst, 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 func (m *ControlMessage) GetIhave() []*ControlIHave { if m != nil { @@ -238,14 +359,45 @@ func (m *ControlMessage) GetPrune() []*ControlPrune { } 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_unrecognized []byte `json:"-"` + 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:"-"` } func (m *ControlIHave) Reset() { *m = ControlIHave{} } func (m *ControlIHave) String() string { return proto.CompactTextString(m) } func (*ControlIHave) ProtoMessage() {} +func (*ControlIHave) Descriptor() ([]byte, []int) { + return fileDescriptor_rpc_9f02422616139c62, []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 + } +} +func (dst *ControlIHave) XXX_Merge(src proto.Message) { + xxx_messageInfo_ControlIHave.Merge(dst, 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 func (m *ControlIHave) GetTopicID() string { if m != nil && m.TopicID != nil { @@ -262,13 +414,44 @@ func (m *ControlIHave) GetMessageIDs() []string { } type ControlIWant struct { - MessageIDs []string `protobuf:"bytes,1,rep,name=messageIDs" json:"messageIDs,omitempty"` - XXX_unrecognized []byte `json:"-"` + MessageIDs []string `protobuf:"bytes,1,rep,name=messageIDs" json:"messageIDs,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *ControlIWant) Reset() { *m = ControlIWant{} } func (m *ControlIWant) String() string { return proto.CompactTextString(m) } func (*ControlIWant) ProtoMessage() {} +func (*ControlIWant) Descriptor() ([]byte, []int) { + return fileDescriptor_rpc_9f02422616139c62, []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 + } +} +func (dst *ControlIWant) XXX_Merge(src proto.Message) { + xxx_messageInfo_ControlIWant.Merge(dst, 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 func (m *ControlIWant) GetMessageIDs() []string { if m != nil { @@ -278,13 +461,44 @@ func (m *ControlIWant) GetMessageIDs() []string { } type ControlGraft struct { - TopicID *string `protobuf:"bytes,1,opt,name=topicID" json:"topicID,omitempty"` - XXX_unrecognized []byte `json:"-"` + TopicID *string `protobuf:"bytes,1,opt,name=topicID" json:"topicID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *ControlGraft) Reset() { *m = ControlGraft{} } func (m *ControlGraft) String() string { return proto.CompactTextString(m) } func (*ControlGraft) ProtoMessage() {} +func (*ControlGraft) Descriptor() ([]byte, []int) { + return fileDescriptor_rpc_9f02422616139c62, []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 + } +} +func (dst *ControlGraft) XXX_Merge(src proto.Message) { + xxx_messageInfo_ControlGraft.Merge(dst, 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 func (m *ControlGraft) GetTopicID() string { if m != nil && m.TopicID != nil { @@ -294,13 +508,44 @@ func (m *ControlGraft) GetTopicID() string { } type ControlPrune struct { - TopicID *string `protobuf:"bytes,1,opt,name=topicID" json:"topicID,omitempty"` - XXX_unrecognized []byte `json:"-"` + TopicID *string `protobuf:"bytes,1,opt,name=topicID" json:"topicID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *ControlPrune) Reset() { *m = ControlPrune{} } func (m *ControlPrune) String() string { return proto.CompactTextString(m) } func (*ControlPrune) ProtoMessage() {} +func (*ControlPrune) Descriptor() ([]byte, []int) { + return fileDescriptor_rpc_9f02422616139c62, []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 + } +} +func (dst *ControlPrune) XXX_Merge(src proto.Message) { + xxx_messageInfo_ControlPrune.Merge(dst, 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 func (m *ControlPrune) GetTopicID() string { if m != nil && m.TopicID != nil { @@ -311,15 +556,46 @@ func (m *ControlPrune) GetTopicID() string { // topicID = hash(topicDescriptor); (not the topic.name) 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_unrecognized []byte `json:"-"` + 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:"-"` } 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_rpc_9f02422616139c62, []int{7} +} +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 + } +} +func (dst *TopicDescriptor) XXX_Merge(src proto.Message) { + xxx_messageInfo_TopicDescriptor.Merge(dst, 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 func (m *TopicDescriptor) GetName() string { if m != nil && m.Name != nil { @@ -343,14 +619,45 @@ func (m *TopicDescriptor) GetEnc() *TopicDescriptor_EncOpts { } type TopicDescriptor_AuthOpts struct { - Mode *TopicDescriptor_AuthOpts_AuthMode `protobuf:"varint,1,opt,name=mode,enum=floodsub.pb.TopicDescriptor_AuthOpts_AuthMode" json:"mode,omitempty"` - Keys [][]byte `protobuf:"bytes,2,rep,name=keys" json:"keys,omitempty"` - XXX_unrecognized []byte `json:"-"` + Mode *TopicDescriptor_AuthOpts_AuthMode `protobuf:"varint,1,opt,name=mode,enum=floodsub.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:"-"` } 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_rpc_9f02422616139c62, []int{7, 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 + } +} +func (dst *TopicDescriptor_AuthOpts) XXX_Merge(src proto.Message) { + xxx_messageInfo_TopicDescriptor_AuthOpts.Merge(dst, 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 func (m *TopicDescriptor_AuthOpts) GetMode() TopicDescriptor_AuthOpts_AuthMode { if m != nil && m.Mode != nil { @@ -367,14 +674,45 @@ func (m *TopicDescriptor_AuthOpts) GetKeys() [][]byte { } type TopicDescriptor_EncOpts struct { - Mode *TopicDescriptor_EncOpts_EncMode `protobuf:"varint,1,opt,name=mode,enum=floodsub.pb.TopicDescriptor_EncOpts_EncMode" json:"mode,omitempty"` - KeyHashes [][]byte `protobuf:"bytes,2,rep,name=keyHashes" json:"keyHashes,omitempty"` - XXX_unrecognized []byte `json:"-"` + Mode *TopicDescriptor_EncOpts_EncMode `protobuf:"varint,1,opt,name=mode,enum=floodsub.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:"-"` } 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_rpc_9f02422616139c62, []int{7, 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 + } +} +func (dst *TopicDescriptor_EncOpts) XXX_Merge(src proto.Message) { + xxx_messageInfo_TopicDescriptor_EncOpts.Merge(dst, 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 func (m *TopicDescriptor_EncOpts) GetMode() TopicDescriptor_EncOpts_EncMode { if m != nil && m.Mode != nil { @@ -405,3 +743,2147 @@ func init() { proto.RegisterEnum("floodsub.pb.TopicDescriptor_AuthOpts_AuthMode", TopicDescriptor_AuthOpts_AuthMode_name, TopicDescriptor_AuthOpts_AuthMode_value) proto.RegisterEnum("floodsub.pb.TopicDescriptor_EncOpts_EncMode", TopicDescriptor_EncOpts_EncMode_name, TopicDescriptor_EncOpts_EncMode_value) } +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, err := m.Control.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +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.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 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, err := m.Auth.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + if m.Enc != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintRpc(dAtA, i, uint64(m.Enc.Size())) + n3, err := m.Enc.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *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) { + 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) { + 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) { + 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.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ControlMessage) Size() (n int) { + 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) { + 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) { + 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) { + 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) { + 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 *TopicDescriptor) Size() (n int) { + 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) { + 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) { + 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++ + 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++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRpc + } + postIndex := iNdEx + msglen + 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++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRpc + } + postIndex := iNdEx + msglen + 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++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRpc + } + postIndex := iNdEx + msglen + 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 + } + 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++ + 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++ + 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++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRpc + } + postIndex := iNdEx + intStringLen + 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 + } + 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++ + 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++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthRpc + } + 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 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 > 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++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthRpc + } + 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 ErrIntOverflowRpc + } + 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 ErrInvalidLengthRpc + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TopicIDs = append(m.TopicIDs, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRpc(dAtA[iNdEx:]) + if err != nil { + return err + } + if 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++ + 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++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRpc + } + postIndex := iNdEx + msglen + 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++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRpc + } + postIndex := iNdEx + msglen + 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++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRpc + } + postIndex := iNdEx + msglen + 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++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRpc + } + postIndex := iNdEx + msglen + 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 + } + 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++ + 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++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRpc + } + postIndex := iNdEx + intStringLen + 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++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRpc + } + postIndex := iNdEx + intStringLen + 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 + } + 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++ + 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++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRpc + } + postIndex := iNdEx + intStringLen + 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 + } + 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++ + 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++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRpc + } + postIndex := iNdEx + intStringLen + 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 + } + 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++ + 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++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRpc + } + postIndex := iNdEx + intStringLen + 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 + } + 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++ + 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++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRpc + } + postIndex := iNdEx + intStringLen + 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++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRpc + } + postIndex := iNdEx + msglen + 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++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRpc + } + postIndex := iNdEx + msglen + 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 + } + 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++ + 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++ + 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++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthRpc + } + postIndex := iNdEx + byteLen + 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 + } + 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++ + 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++ + 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++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthRpc + } + postIndex := iNdEx + byteLen + 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 + } + 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 + } + } + iNdEx += length + if length < 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 + } + 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") +) + +func init() { proto.RegisterFile("rpc.proto", fileDescriptor_rpc_9f02422616139c62) } + +var fileDescriptor_rpc_9f02422616139c62 = []byte{ + // 577 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x4d, 0x6e, 0xd3, 0x40, + 0x14, 0xc7, 0x99, 0x38, 0x95, 0xe3, 0x17, 0xb7, 0x54, 0xa3, 0x2e, 0x4c, 0xa8, 0xa2, 0xc8, 0x02, + 0x64, 0x09, 0x64, 0xa4, 0x48, 0x20, 0xb1, 0x41, 0xb4, 0x4d, 0x44, 0x22, 0xd4, 0x26, 0x9a, 0x56, + 0xaa, 0x58, 0xda, 0xce, 0xa4, 0xb1, 0x9a, 0x78, 0x8c, 0x3f, 0x8a, 0x7a, 0x05, 0x0e, 0xc0, 0x71, + 0x58, 0xb3, 0x64, 0xc1, 0x01, 0x50, 0x2e, 0xc0, 0x15, 0xd0, 0xbc, 0x71, 0x3e, 0x1c, 0x9a, 0xaa, + 0xab, 0xbe, 0x99, 0xfe, 0x7e, 0x33, 0xff, 0xf7, 0x3c, 0x01, 0x23, 0x89, 0x03, 0x37, 0x4e, 0x44, + 0x26, 0x68, 0x7d, 0x3c, 0x15, 0x62, 0x94, 0xe6, 0xbe, 0x1b, 0xfb, 0xf6, 0x5f, 0x02, 0x1a, 0x1b, + 0x9e, 0xd0, 0xf7, 0xb0, 0x9b, 0xe6, 0x7e, 0x1a, 0x24, 0x61, 0x9c, 0x85, 0x22, 0x4a, 0x2d, 0xd2, + 0xd2, 0x9c, 0x7a, 0xdb, 0x72, 0xd7, 0x60, 0x97, 0x0d, 0x4f, 0xdc, 0xf3, 0xdc, 0x1f, 0xc4, 0x59, + 0xca, 0xca, 0x38, 0x75, 0x41, 0x8f, 0x73, 0x7f, 0x1a, 0xa6, 0x13, 0xab, 0x82, 0xe6, 0x41, 0xc9, + 0x3c, 0xe5, 0x69, 0xea, 0x5d, 0x71, 0xb6, 0x80, 0xe8, 0x1b, 0xd0, 0x03, 0x11, 0x65, 0x89, 0x98, + 0x5a, 0x5a, 0x8b, 0x38, 0xf5, 0xf6, 0xd3, 0x12, 0x7f, 0xa2, 0xfe, 0xb7, 0xd4, 0x0a, 0xb6, 0x71, + 0x04, 0x7a, 0x11, 0x80, 0x1e, 0x82, 0x51, 0x44, 0xf0, 0xb9, 0x45, 0x5a, 0xc4, 0xa9, 0xb1, 0xd5, + 0x06, 0xb5, 0x40, 0xcf, 0x44, 0x1c, 0x06, 0xe1, 0xc8, 0xaa, 0xb4, 0x88, 0x63, 0xb0, 0xc5, 0xd2, + 0x0e, 0x40, 0x2f, 0x8e, 0xa5, 0x14, 0xaa, 0xe3, 0x44, 0xcc, 0xd0, 0x36, 0x19, 0xd6, 0x72, 0x6f, + 0xe4, 0x65, 0x1e, 0x5a, 0x26, 0xc3, 0x9a, 0x1e, 0xc0, 0x4e, 0xca, 0xbf, 0x44, 0x02, 0xa3, 0x9a, + 0x4c, 0x2d, 0x68, 0x03, 0x6a, 0x78, 0x66, 0xbf, 0x93, 0x5a, 0xd5, 0x96, 0xe6, 0x18, 0x6c, 0xb9, + 0xb6, 0x7f, 0x13, 0xd8, 0x2b, 0xf7, 0x40, 0x5f, 0xc3, 0x4e, 0x38, 0xf1, 0x6e, 0x78, 0x31, 0xd9, + 0x27, 0x77, 0xf5, 0xdb, 0xef, 0x79, 0x37, 0x9c, 0x29, 0x0e, 0x85, 0xaf, 0x5e, 0x94, 0x15, 0x03, + 0xbd, 0x5b, 0xb8, 0xf4, 0xa2, 0x8c, 0x29, 0x4e, 0x0a, 0x57, 0x89, 0x37, 0xce, 0x2c, 0x6d, 0xbb, + 0xf0, 0x51, 0x02, 0x4c, 0x71, 0x52, 0x88, 0x93, 0x3c, 0xe2, 0x18, 0x7f, 0x8b, 0x30, 0x94, 0x00, + 0x53, 0x9c, 0xdd, 0x03, 0x73, 0x3d, 0xe9, 0x72, 0xca, 0xfd, 0x0e, 0xce, 0x70, 0x31, 0xe5, 0x7e, + 0x87, 0x36, 0x01, 0x66, 0xaa, 0x71, 0x39, 0x9e, 0x0a, 0x8e, 0x67, 0x6d, 0xc7, 0x76, 0x57, 0x27, + 0xc9, 0x16, 0x36, 0x78, 0xf2, 0x1f, 0xef, 0x2c, 0x79, 0xec, 0x60, 0xfb, 0xcd, 0x6b, 0x24, 0x46, + 0xbf, 0x87, 0xfc, 0xa1, 0xc1, 0xe3, 0x0b, 0x59, 0x77, 0xb8, 0x7a, 0xc9, 0x22, 0x91, 0x9f, 0x3f, + 0xf2, 0x66, 0xbc, 0x40, 0xb1, 0xa6, 0xef, 0xa0, 0xea, 0xe5, 0xd9, 0x04, 0x9f, 0x44, 0xbd, 0xfd, + 0xbc, 0x34, 0xa5, 0x0d, 0xdf, 0x3d, 0xca, 0xb3, 0x09, 0xfe, 0x3e, 0x50, 0xa1, 0x6f, 0x41, 0xe3, + 0x51, 0x50, 0x3c, 0xf1, 0x67, 0xf7, 0x9a, 0xdd, 0x28, 0x40, 0x51, 0x0a, 0x8d, 0x6f, 0x04, 0x6a, + 0x8b, 0xa3, 0xe8, 0x31, 0x54, 0x67, 0x62, 0xa4, 0x32, 0xed, 0xb5, 0xdd, 0x07, 0xdd, 0x8f, 0xc5, + 0xa9, 0x18, 0x71, 0x86, 0xae, 0xec, 0xeb, 0x9a, 0xdf, 0xaa, 0x2f, 0x61, 0x32, 0xac, 0xed, 0x17, + 0xea, 0x0e, 0x49, 0xd1, 0x1a, 0x54, 0xcf, 0x06, 0x67, 0xdd, 0xfd, 0x47, 0x54, 0x07, 0xed, 0x53, + 0xf7, 0xf3, 0x3e, 0x91, 0xc5, 0xe5, 0xe0, 0x62, 0xbf, 0xd2, 0xf8, 0x4e, 0x40, 0x2f, 0xd2, 0xd1, + 0x0f, 0xa5, 0x2c, 0xaf, 0x1e, 0xd2, 0x91, 0xfc, 0xbb, 0x96, 0xe4, 0x10, 0x8c, 0x6b, 0x7e, 0xdb, + 0xf3, 0xd2, 0x09, 0x5f, 0xc4, 0x59, 0x6d, 0xd8, 0x2f, 0xf1, 0xaa, 0x8d, 0x48, 0xbb, 0x60, 0x9c, + 0xf7, 0x8e, 0x58, 0xb7, 0x53, 0x0e, 0x76, 0x6c, 0xfe, 0x9c, 0x37, 0xc9, 0xaf, 0x79, 0x93, 0xfc, + 0x99, 0x37, 0xc9, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x80, 0x05, 0xeb, 0x9d, 0xe3, 0x04, 0x00, + 0x00, +} -- GitLab