rpc.pb.go 11.7 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
vyzo's avatar
vyzo committed
14 15 16 17 18
	ControlMessage
	ControlIHave
	ControlIWant
	ControlGraft
	ControlPrune
Jeromy's avatar
Jeromy committed
19
	TopicDescriptor
Jeromy's avatar
Jeromy committed
20 21 22 23 24 25 26 27 28 29 30 31
*/
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
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 99 100 101 102 103
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
104
type RPC struct {
vyzo's avatar
vyzo committed
105 106 107 108
	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:"-"`
Jeromy's avatar
Jeromy committed
109 110
}

Jeromy's avatar
Jeromy committed
111 112 113
func (m *RPC) Reset()         { *m = RPC{} }
func (m *RPC) String() string { return proto.CompactTextString(m) }
func (*RPC) ProtoMessage()    {}
Jeromy's avatar
Jeromy committed
114

Jeromy's avatar
Jeromy committed
115 116 117
func (m *RPC) GetSubscriptions() []*RPC_SubOpts {
	if m != nil {
		return m.Subscriptions
Jeromy's avatar
Jeromy committed
118
	}
Jeromy's avatar
Jeromy committed
119
	return nil
Jeromy's avatar
Jeromy committed
120 121
}

Jeromy's avatar
Jeromy committed
122
func (m *RPC) GetPublish() []*Message {
Jeromy's avatar
Jeromy committed
123
	if m != nil {
Jeromy's avatar
Jeromy committed
124
		return m.Publish
Jeromy's avatar
Jeromy committed
125 126 127 128
	}
	return nil
}

vyzo's avatar
vyzo committed
129 130 131 132 133 134 135
func (m *RPC) GetControl() *ControlMessage {
	if m != nil {
		return m.Control
	}
	return nil
}

Jeromy's avatar
Jeromy committed
136 137 138 139 140 141 142 143 144 145 146 147 148
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
149
	}
Jeromy's avatar
Jeromy committed
150 151 152 153 154 155 156 157
	return false
}

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

type Message struct {
161
	From             []byte   `protobuf:"bytes,1,opt,name=from" json:"from,omitempty"`
Jeromy's avatar
Jeromy committed
162 163 164 165
	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
166 167
}

Jeromy's avatar
Jeromy committed
168 169 170
func (m *Message) Reset()         { *m = Message{} }
func (m *Message) String() string { return proto.CompactTextString(m) }
func (*Message) ProtoMessage()    {}
Jeromy's avatar
Jeromy committed
171

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

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

Jeromy's avatar
Jeromy committed
186 187 188 189 190 191 192 193 194 195
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
196
	}
Jeromy's avatar
Jeromy committed
197
	return nil
Jeromy's avatar
Jeromy committed
198 199
}

vyzo's avatar
vyzo committed
200 201 202 203 204 205 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 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311
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:"-"`
}

func (m *ControlMessage) Reset()         { *m = ControlMessage{} }
func (m *ControlMessage) String() string { return proto.CompactTextString(m) }
func (*ControlMessage) ProtoMessage()    {}

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_unrecognized []byte   `json:"-"`
}

func (m *ControlIHave) Reset()         { *m = ControlIHave{} }
func (m *ControlIHave) String() string { return proto.CompactTextString(m) }
func (*ControlIHave) ProtoMessage()    {}

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_unrecognized []byte   `json:"-"`
}

func (m *ControlIWant) Reset()         { *m = ControlIWant{} }
func (m *ControlIWant) String() string { return proto.CompactTextString(m) }
func (*ControlIWant) ProtoMessage()    {}

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_unrecognized []byte  `json:"-"`
}

func (m *ControlGraft) Reset()         { *m = ControlGraft{} }
func (m *ControlGraft) String() string { return proto.CompactTextString(m) }
func (*ControlGraft) ProtoMessage()    {}

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"`
	XXX_unrecognized []byte  `json:"-"`
}

func (m *ControlPrune) Reset()         { *m = ControlPrune{} }
func (m *ControlPrune) String() string { return proto.CompactTextString(m) }
func (*ControlPrune) ProtoMessage()    {}

func (m *ControlPrune) GetTopicID() string {
	if m != nil && m.TopicID != nil {
		return *m.TopicID
	}
	return ""
}

Jeromy's avatar
Jeromy committed
312 313 314 315 316 317 318 319 320 321 322 323 324 325 326
// 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
327 328 329 330
	}
	return ""
}

Jeromy's avatar
Jeromy committed
331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392
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
393 394
func init() {
	proto.RegisterType((*RPC)(nil), "floodsub.pb.RPC")
Jeromy's avatar
Jeromy committed
395
	proto.RegisterType((*RPC_SubOpts)(nil), "floodsub.pb.RPC.SubOpts")
Jeromy's avatar
Jeromy committed
396
	proto.RegisterType((*Message)(nil), "floodsub.pb.Message")
vyzo's avatar
vyzo committed
397 398 399 400 401
	proto.RegisterType((*ControlMessage)(nil), "floodsub.pb.ControlMessage")
	proto.RegisterType((*ControlIHave)(nil), "floodsub.pb.ControlIHave")
	proto.RegisterType((*ControlIWant)(nil), "floodsub.pb.ControlIWant")
	proto.RegisterType((*ControlGraft)(nil), "floodsub.pb.ControlGraft")
	proto.RegisterType((*ControlPrune)(nil), "floodsub.pb.ControlPrune")
Jeromy's avatar
Jeromy committed
402 403 404 405 406
	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
407
}