2016-09-10 15:14:17 +00:00
|
|
|
// Code generated by protoc-gen-gogo.
|
|
|
|
// 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
|
2016-09-11 03:47:12 +00:00
|
|
|
TopicDescriptor
|
2016-09-10 15:14:17 +00:00
|
|
|
*/
|
|
|
|
package floodsub_pb
|
|
|
|
|
|
|
|
import proto "github.com/gogo/protobuf/proto"
|
|
|
|
import fmt "fmt"
|
|
|
|
import math "math"
|
|
|
|
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
|
|
var _ = proto.Marshal
|
|
|
|
var _ = fmt.Errorf
|
|
|
|
var _ = math.Inf
|
|
|
|
|
2016-09-11 03:47:12 +00: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",
|
|
|
|
}
|
|
|
|
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
|
|
|
|
}
|
|
|
|
func (x TopicDescriptor_AuthOpts_AuthMode) String() string {
|
|
|
|
return proto.EnumName(TopicDescriptor_AuthOpts_AuthMode_name, int32(x))
|
|
|
|
}
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
|
|
|
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",
|
|
|
|
}
|
|
|
|
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
|
|
|
|
}
|
|
|
|
func (x TopicDescriptor_EncOpts_EncMode) String() string {
|
|
|
|
return proto.EnumName(TopicDescriptor_EncOpts_EncMode_name, int32(x))
|
|
|
|
}
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2016-09-10 15:14:17 +00:00
|
|
|
type RPC struct {
|
2016-09-11 03:47:12 +00:00
|
|
|
Subscriptions []*RPC_SubOpts `protobuf:"bytes,1,rep,name=subscriptions" json:"subscriptions,omitempty"`
|
|
|
|
Publish []*Message `protobuf:"bytes,2,rep,name=publish" json:"publish,omitempty"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
2016-09-10 15:14:17 +00:00
|
|
|
}
|
|
|
|
|
2016-09-10 15:28:29 +00:00
|
|
|
func (m *RPC) Reset() { *m = RPC{} }
|
|
|
|
func (m *RPC) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*RPC) ProtoMessage() {}
|
2016-09-10 15:14:17 +00:00
|
|
|
|
2016-09-11 03:47:12 +00:00
|
|
|
func (m *RPC) GetSubscriptions() []*RPC_SubOpts {
|
|
|
|
if m != nil {
|
|
|
|
return m.Subscriptions
|
2016-09-10 15:14:17 +00:00
|
|
|
}
|
2016-09-11 03:47:12 +00:00
|
|
|
return nil
|
2016-09-10 15:14:17 +00:00
|
|
|
}
|
|
|
|
|
2016-09-11 03:47:12 +00:00
|
|
|
func (m *RPC) GetPublish() []*Message {
|
2016-09-10 15:14:17 +00:00
|
|
|
if m != nil {
|
2016-09-11 03:47:12 +00:00
|
|
|
return m.Publish
|
2016-09-10 15:14:17 +00:00
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2016-09-11 03:47:12 +00: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_unrecognized []byte `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *RPC_SubOpts) Reset() { *m = RPC_SubOpts{} }
|
|
|
|
func (m *RPC_SubOpts) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*RPC_SubOpts) ProtoMessage() {}
|
|
|
|
|
|
|
|
func (m *RPC_SubOpts) GetSubscribe() bool {
|
|
|
|
if m != nil && m.Subscribe != nil {
|
|
|
|
return *m.Subscribe
|
2016-09-10 15:14:17 +00:00
|
|
|
}
|
2016-09-11 03:47:12 +00:00
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *RPC_SubOpts) GetTopicid() string {
|
|
|
|
if m != nil && m.Topicid != nil {
|
|
|
|
return *m.Topicid
|
|
|
|
}
|
|
|
|
return ""
|
2016-09-10 15:14:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type Message struct {
|
2017-01-09 17:52:07 +00:00
|
|
|
From []byte `protobuf:"bytes,1,opt,name=from" json:"from,omitempty"`
|
2016-09-11 03:47:12 +00:00
|
|
|
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:"-"`
|
2016-09-10 15:14:17 +00:00
|
|
|
}
|
|
|
|
|
2016-09-10 15:28:29 +00:00
|
|
|
func (m *Message) Reset() { *m = Message{} }
|
|
|
|
func (m *Message) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*Message) ProtoMessage() {}
|
2016-09-10 15:14:17 +00:00
|
|
|
|
2017-01-09 17:52:07 +00:00
|
|
|
func (m *Message) GetFrom() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.From
|
2016-09-10 15:14:17 +00:00
|
|
|
}
|
2017-01-09 17:52:07 +00:00
|
|
|
return nil
|
2016-09-10 15:14:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Message) GetData() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.Data
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2016-09-11 03:47:12 +00: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 15:14:17 +00:00
|
|
|
}
|
2016-09-11 03:47:12 +00:00
|
|
|
return nil
|
2016-09-10 15:14:17 +00:00
|
|
|
}
|
|
|
|
|
2016-09-11 03:47:12 +00:00
|
|
|
// 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:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *TopicDescriptor) Reset() { *m = TopicDescriptor{} }
|
|
|
|
func (m *TopicDescriptor) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*TopicDescriptor) ProtoMessage() {}
|
|
|
|
|
|
|
|
func (m *TopicDescriptor) GetName() string {
|
|
|
|
if m != nil && m.Name != nil {
|
|
|
|
return *m.Name
|
2016-09-10 15:14:17 +00:00
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2016-09-11 03:47:12 +00: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=floodsub.pb.TopicDescriptor_AuthOpts_AuthMode" json:"mode,omitempty"`
|
|
|
|
Keys [][]byte `protobuf:"bytes,2,rep,name=keys" json:"keys,omitempty"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *TopicDescriptor_AuthOpts) Reset() { *m = TopicDescriptor_AuthOpts{} }
|
|
|
|
func (m *TopicDescriptor_AuthOpts) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*TopicDescriptor_AuthOpts) ProtoMessage() {}
|
|
|
|
|
|
|
|
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=floodsub.pb.TopicDescriptor_EncOpts_EncMode" json:"mode,omitempty"`
|
|
|
|
KeyHashes [][]byte `protobuf:"bytes,2,rep,name=keyHashes" json:"keyHashes,omitempty"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *TopicDescriptor_EncOpts) Reset() { *m = TopicDescriptor_EncOpts{} }
|
|
|
|
func (m *TopicDescriptor_EncOpts) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*TopicDescriptor_EncOpts) ProtoMessage() {}
|
|
|
|
|
|
|
|
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 15:14:17 +00:00
|
|
|
func init() {
|
|
|
|
proto.RegisterType((*RPC)(nil), "floodsub.pb.RPC")
|
2016-09-11 03:47:12 +00:00
|
|
|
proto.RegisterType((*RPC_SubOpts)(nil), "floodsub.pb.RPC.SubOpts")
|
2016-09-10 15:14:17 +00:00
|
|
|
proto.RegisterType((*Message)(nil), "floodsub.pb.Message")
|
2016-09-11 03:47:12 +00:00
|
|
|
proto.RegisterType((*TopicDescriptor)(nil), "floodsub.pb.TopicDescriptor")
|
|
|
|
proto.RegisterType((*TopicDescriptor_AuthOpts)(nil), "floodsub.pb.TopicDescriptor.AuthOpts")
|
|
|
|
proto.RegisterType((*TopicDescriptor_EncOpts)(nil), "floodsub.pb.TopicDescriptor.EncOpts")
|
|
|
|
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)
|
2016-09-10 15:14:17 +00:00
|
|
|
}
|