rpc.pb.go 8.11 KB
Newer Older
Jeromy's avatar
Jeromy committed
1 2 3 4 5 6 7 8 9 10 11 12 13
// 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
Jeromy's avatar
Jeromy committed
14
	TopicDescriptor
Jeromy's avatar
Jeromy committed
15 16 17 18 19 20 21 22 23 24 25 26
*/
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

Jeromy's avatar
Jeromy committed
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
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
}

Jeromy's avatar
Jeromy committed
99
type RPC struct {
Jeromy's avatar
Jeromy committed
100 101 102
	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:"-"`
Jeromy's avatar
Jeromy committed
103 104
}

Jeromy's avatar
Jeromy committed
105 106 107
func (m *RPC) Reset()         { *m = RPC{} }
func (m *RPC) String() string { return proto.CompactTextString(m) }
func (*RPC) ProtoMessage()    {}
Jeromy's avatar
Jeromy committed
108

Jeromy's avatar
Jeromy committed
109 110 111
func (m *RPC) GetSubscriptions() []*RPC_SubOpts {
	if m != nil {
		return m.Subscriptions
Jeromy's avatar
Jeromy committed
112
	}
Jeromy's avatar
Jeromy committed
113
	return nil
Jeromy's avatar
Jeromy committed
114 115
}

Jeromy's avatar
Jeromy committed
116
func (m *RPC) GetPublish() []*Message {
Jeromy's avatar
Jeromy committed
117
	if m != nil {
Jeromy's avatar
Jeromy committed
118
		return m.Publish
Jeromy's avatar
Jeromy committed
119 120 121 122
	}
	return nil
}

Jeromy's avatar
Jeromy committed
123 124 125 126 127 128 129 130 131 132 133 134 135
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
Jeromy's avatar
Jeromy committed
136
	}
Jeromy's avatar
Jeromy committed
137 138 139 140 141 142 143 144
	return false
}

func (m *RPC_SubOpts) GetTopicid() string {
	if m != nil && m.Topicid != nil {
		return *m.Topicid
	}
	return ""
Jeromy's avatar
Jeromy committed
145 146 147
}

type Message struct {
148
	From             []byte   `protobuf:"bytes,1,opt,name=from" json:"from,omitempty"`
Jeromy's avatar
Jeromy committed
149 150 151 152
	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:"-"`
Jeromy's avatar
Jeromy committed
153 154
}

Jeromy's avatar
Jeromy committed
155 156 157
func (m *Message) Reset()         { *m = Message{} }
func (m *Message) String() string { return proto.CompactTextString(m) }
func (*Message) ProtoMessage()    {}
Jeromy's avatar
Jeromy committed
158

159 160 161
func (m *Message) GetFrom() []byte {
	if m != nil {
		return m.From
Jeromy's avatar
Jeromy committed
162
	}
163
	return nil
Jeromy's avatar
Jeromy committed
164 165 166 167 168 169 170 171 172
}

func (m *Message) GetData() []byte {
	if m != nil {
		return m.Data
	}
	return nil
}

Jeromy's avatar
Jeromy committed
173 174 175 176 177 178 179 180 181 182
func (m *Message) GetSeqno() []byte {
	if m != nil {
		return m.Seqno
	}
	return nil
}

func (m *Message) GetTopicIDs() []string {
	if m != nil {
		return m.TopicIDs
Jeromy's avatar
Jeromy committed
183
	}
Jeromy's avatar
Jeromy committed
184
	return nil
Jeromy's avatar
Jeromy committed
185 186
}

Jeromy's avatar
Jeromy committed
187 188 189 190 191 192 193 194 195 196 197 198 199 200 201
// 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
Jeromy's avatar
Jeromy committed
202 203 204 205
	}
	return ""
}

Jeromy's avatar
Jeromy committed
206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267
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
}

Jeromy's avatar
Jeromy committed
268 269
func init() {
	proto.RegisterType((*RPC)(nil), "floodsub.pb.RPC")
Jeromy's avatar
Jeromy committed
270
	proto.RegisterType((*RPC_SubOpts)(nil), "floodsub.pb.RPC.SubOpts")
Jeromy's avatar
Jeromy committed
271
	proto.RegisterType((*Message)(nil), "floodsub.pb.Message")
Jeromy's avatar
Jeromy committed
272 273 274 275 276
	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)
Jeromy's avatar
Jeromy committed
277
}