| 1 |
// Code generated by protoc-gen-gogo. DO NOT EDIT. |
| 2 |
// source: control.proto |
| 3 |
|
| 4 |
/* |
| 5 |
Package controlpb is a generated protocol buffer package. |
| 6 |
|
| 7 |
It is generated from these files: |
| 8 |
control.proto |
| 9 |
|
| 10 |
It has these top-level messages: |
| 11 |
Command |
| 12 |
Node |
| 13 |
Metrics |
| 14 |
Unsubscribe |
| 15 |
Disconnect |
| 16 |
SurveyRequest |
| 17 |
SurveyResponse |
| 18 |
*/ |
| 19 |
package controlpb |
| 20 |
|
| 21 |
import proto "github.com/gogo/protobuf/proto" |
| 22 |
import fmt "fmt" |
| 23 |
import math "math" |
| 24 |
import _ "github.com/gogo/protobuf/gogoproto" |
| 25 |
|
| 26 |
import bytes "bytes" |
| 27 |
|
| 28 |
import binary "encoding/binary" |
| 29 |
|
| 30 |
import io "io" |
| 31 |
|
| 32 |
// Reference imports to suppress errors if they are not otherwise used. |
| 33 |
var _ = proto.Marshal |
| 34 |
var _ = fmt.Errorf |
| 35 |
var _ = math.Inf |
| 36 |
|
| 37 |
// This is a compile-time assertion to ensure that this generated file |
| 38 |
// is compatible with the proto package it is being compiled against. |
| 39 |
// A compilation error at this line likely means your copy of the |
| 40 |
// proto package needs to be updated. |
| 41 |
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package |
| 42 |
|
| 43 |
type MethodType int32 |
| 44 |
|
| 45 |
const ( |
| 46 |
MethodTypeNode MethodType = 0 |
| 47 |
MethodTypeUnsubscribe MethodType = 1 |
| 48 |
MethodTypeDisconnect MethodType = 2 |
| 49 |
MethodTypeShutdown MethodType = 3 |
| 50 |
MethodTypeSurveyRequest MethodType = 4 |
| 51 |
MethodTypeSurveyResponse MethodType = 5 |
| 52 |
) |
| 53 |
|
| 54 |
var MethodType_name = map[int32]string{ |
| 55 |
0: "NODE", |
| 56 |
1: "UNSUBSCRIBE", |
| 57 |
2: "DISCONNECT", |
| 58 |
3: "SHUTDOWN", |
| 59 |
4: "SURVEY_REQUEST", |
| 60 |
5: "SURVEY_RESPONSE", |
| 61 |
} |
| 62 |
var MethodType_value = map[string]int32{ |
| 63 |
"NODE": 0, |
| 64 |
"UNSUBSCRIBE": 1, |
| 65 |
"DISCONNECT": 2, |
| 66 |
"SHUTDOWN": 3, |
| 67 |
"SURVEY_REQUEST": 4, |
| 68 |
"SURVEY_RESPONSE": 5, |
| 69 |
} |
| 70 |
|
| 71 |
func (x MethodType) String() string { |
| 72 |
return proto.EnumName(MethodType_name, int32(x)) |
| 73 |
} |
| 74 |
func (MethodType) EnumDescriptor() ([]byte, []int) { return fileDescriptorControl, []int{0} } |
| 75 |
|
| 76 |
type Command struct { |
| 77 |
UID string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"` |
| 78 |
Method MethodType `protobuf:"varint,2,opt,name=method,proto3,enum=controlpb.MethodType" json:"method"` |
| 79 |
Params Raw `protobuf:"bytes,3,opt,name=params,proto3,customtype=Raw" json:"params"` |
| 80 |
} |
| 81 |
|
| 82 |
func (m *Command) Reset() { *m = Command{} } |
| 83 |
func (m *Command) String() string { return proto.CompactTextString(m) } |
| 84 |
func (*Command) ProtoMessage() {} |
| 85 |
func (*Command) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{0} } |
| 86 |
|
| 87 |
func (m *Command) GetUID() string { |
| 88 |
if m != nil { |
| 89 |
return m.UID |
| 90 |
} |
| 91 |
return "" |
| 92 |
} |
| 93 |
|
| 94 |
func (m *Command) GetMethod() MethodType { |
| 95 |
if m != nil { |
| 96 |
return m.Method |
| 97 |
} |
| 98 |
return MethodTypeNode |
| 99 |
} |
| 100 |
|
| 101 |
type Node struct { |
| 102 |
UID string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"` |
| 103 |
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name"` |
| 104 |
Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version"` |
| 105 |
NumClients uint32 `protobuf:"varint,4,opt,name=num_clients,json=numClients,proto3" json:"num_clients"` |
| 106 |
NumUsers uint32 `protobuf:"varint,5,opt,name=num_users,json=numUsers,proto3" json:"num_users"` |
| 107 |
NumChannels uint32 `protobuf:"varint,6,opt,name=num_channels,json=numChannels,proto3" json:"num_channels"` |
| 108 |
Uptime uint32 `protobuf:"varint,7,opt,name=uptime,proto3" json:"uptime"` |
| 109 |
Metrics *Metrics `protobuf:"bytes,8,opt,name=metrics" json:"metrics"` |
| 110 |
} |
| 111 |
|
| 112 |
func (m *Node) Reset() { *m = Node{} } |
| 113 |
func (m *Node) String() string { return proto.CompactTextString(m) } |
| 114 |
func (*Node) ProtoMessage() {} |
| 115 |
func (*Node) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{1} } |
| 116 |
|
| 117 |
func (m *Node) GetUID() string { |
| 118 |
if m != nil { |
| 119 |
return m.UID |
| 120 |
} |
| 121 |
return "" |
| 122 |
} |
| 123 |
|
| 124 |
func (m *Node) GetName() string { |
| 125 |
if m != nil { |
| 126 |
return m.Name |
| 127 |
} |
| 128 |
return "" |
| 129 |
} |
| 130 |
|
| 131 |
func (m *Node) GetVersion() string { |
| 132 |
if m != nil { |
| 133 |
return m.Version |
| 134 |
} |
| 135 |
return "" |
| 136 |
} |
| 137 |
|
| 138 |
func (m *Node) GetNumClients() uint32 { |
| 139 |
if m != nil { |
| 140 |
return m.NumClients |
| 141 |
} |
| 142 |
return 0 |
| 143 |
} |
| 144 |
|
| 145 |
func (m *Node) GetNumUsers() uint32 { |
| 146 |
if m != nil { |
| 147 |
return m.NumUsers |
| 148 |
} |
| 149 |
return 0 |
| 150 |
} |
| 151 |
|
| 152 |
func (m *Node) GetNumChannels() uint32 { |
| 153 |
if m != nil { |
| 154 |
return m.NumChannels |
| 155 |
} |
| 156 |
return 0 |
| 157 |
} |
| 158 |
|
| 159 |
func (m *Node) GetUptime() uint32 { |
| 160 |
if m != nil { |
| 161 |
return m.Uptime |
| 162 |
} |
| 163 |
return 0 |
| 164 |
} |
| 165 |
|
| 166 |
func (m *Node) GetMetrics() *Metrics { |
| 167 |
if m != nil { |
| 168 |
return m.Metrics |
| 169 |
} |
| 170 |
return nil |
| 171 |
} |
| 172 |
|
| 173 |
type Metrics struct { |
| 174 |
Interval float64 `protobuf:"fixed64,1,opt,name=interval,proto3" json:"interval"` |
| 175 |
Items map[string]float64 `protobuf:"bytes,2,rep,name=items" json:"items" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` |
| 176 |
} |
| 177 |
|
| 178 |
func (m *Metrics) Reset() { *m = Metrics{} } |
| 179 |
func (m *Metrics) String() string { return proto.CompactTextString(m) } |
| 180 |
func (*Metrics) ProtoMessage() {} |
| 181 |
func (*Metrics) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{2} } |
| 182 |
|
| 183 |
func (m *Metrics) GetInterval() float64 { |
| 184 |
if m != nil { |
| 185 |
return m.Interval |
| 186 |
} |
| 187 |
return 0 |
| 188 |
} |
| 189 |
|
| 190 |
func (m *Metrics) GetItems() map[string]float64 { |
| 191 |
if m != nil { |
| 192 |
return m.Items |
| 193 |
} |
| 194 |
return nil |
| 195 |
} |
| 196 |
|
| 197 |
type Unsubscribe struct { |
| 198 |
Channel string `protobuf:"bytes,1,opt,name=channel,proto3" json:"channel"` |
| 199 |
User string `protobuf:"bytes,2,opt,name=user,proto3" json:"user"` |
| 200 |
} |
| 201 |
|
| 202 |
func (m *Unsubscribe) Reset() { *m = Unsubscribe{} } |
| 203 |
func (m *Unsubscribe) String() string { return proto.CompactTextString(m) } |
| 204 |
func (*Unsubscribe) ProtoMessage() {} |
| 205 |
func (*Unsubscribe) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{3} } |
| 206 |
|
| 207 |
func (m *Unsubscribe) GetChannel() string { |
| 208 |
if m != nil { |
| 209 |
return m.Channel |
| 210 |
} |
| 211 |
return "" |
| 212 |
} |
| 213 |
|
| 214 |
func (m *Unsubscribe) GetUser() string { |
| 215 |
if m != nil { |
| 216 |
return m.User |
| 217 |
} |
| 218 |
return "" |
| 219 |
} |
| 220 |
|
| 221 |
type Disconnect struct { |
| 222 |
User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user"` |
| 223 |
Whitelist []string `protobuf:"bytes,2,rep,name=whitelist" json:"whitelist"` |
| 224 |
Code uint32 `protobuf:"varint,3,opt,name=code,proto3" json:"code"` |
| 225 |
Reason string `protobuf:"bytes,4,opt,name=reason,proto3" json:"reason"` |
| 226 |
Reconnect bool `protobuf:"varint,5,opt,name=reconnect,proto3" json:"reconnect"` |
| 227 |
} |
| 228 |
|
| 229 |
func (m *Disconnect) Reset() { *m = Disconnect{} } |
| 230 |
func (m *Disconnect) String() string { return proto.CompactTextString(m) } |
| 231 |
func (*Disconnect) ProtoMessage() {} |
| 232 |
func (*Disconnect) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{4} } |
| 233 |
|
| 234 |
func (m *Disconnect) GetUser() string { |
| 235 |
if m != nil { |
| 236 |
return m.User |
| 237 |
} |
| 238 |
return "" |
| 239 |
} |
| 240 |
|
| 241 |
func (m *Disconnect) GetWhitelist() []string { |
| 242 |
if m != nil { |
| 243 |
return m.Whitelist |
| 244 |
} |
| 245 |
return nil |
| 246 |
} |
| 247 |
|
| 248 |
func (m *Disconnect) GetCode() uint32 { |
| 249 |
if m != nil { |
| 250 |
return m.Code |
| 251 |
} |
| 252 |
return 0 |
| 253 |
} |
| 254 |
|
| 255 |
func (m *Disconnect) GetReason() string { |
| 256 |
if m != nil { |
| 257 |
return m.Reason |
| 258 |
} |
| 259 |
return "" |
| 260 |
} |
| 261 |
|
| 262 |
func (m *Disconnect) GetReconnect() bool { |
| 263 |
if m != nil { |
| 264 |
return m.Reconnect |
| 265 |
} |
| 266 |
return false |
| 267 |
} |
| 268 |
|
| 269 |
type SurveyRequest struct { |
| 270 |
ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id"` |
| 271 |
Op string `protobuf:"bytes,2,opt,name=op,proto3" json:"op"` |
| 272 |
Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data"` |
| 273 |
} |
| 274 |
|
| 275 |
func (m *SurveyRequest) Reset() { *m = SurveyRequest{} } |
| 276 |
func (m *SurveyRequest) String() string { return proto.CompactTextString(m) } |
| 277 |
func (*SurveyRequest) ProtoMessage() {} |
| 278 |
func (*SurveyRequest) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{5} } |
| 279 |
|
| 280 |
func (m *SurveyRequest) GetID() uint64 { |
| 281 |
if m != nil { |
| 282 |
return m.ID |
| 283 |
} |
| 284 |
return 0 |
| 285 |
} |
| 286 |
|
| 287 |
func (m *SurveyRequest) GetOp() string { |
| 288 |
if m != nil { |
| 289 |
return m.Op |
| 290 |
} |
| 291 |
return "" |
| 292 |
} |
| 293 |
|
| 294 |
func (m *SurveyRequest) GetData() []byte { |
| 295 |
if m != nil { |
| 296 |
return m.Data |
| 297 |
} |
| 298 |
return nil |
| 299 |
} |
| 300 |
|
| 301 |
type SurveyResponse struct { |
| 302 |
ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id"` |
| 303 |
Code uint32 `protobuf:"varint,3,opt,name=code,proto3" json:"code"` |
| 304 |
Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data"` |
| 305 |
} |
| 306 |
|
| 307 |
func (m *SurveyResponse) Reset() { *m = SurveyResponse{} } |
| 308 |
func (m *SurveyResponse) String() string { return proto.CompactTextString(m) } |
| 309 |
func (*SurveyResponse) ProtoMessage() {} |
| 310 |
func (*SurveyResponse) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{6} } |
| 311 |
|
| 312 |
func (m *SurveyResponse) GetID() uint64 { |
| 313 |
if m != nil { |
| 314 |
return m.ID |
| 315 |
} |
| 316 |
return 0 |
| 317 |
} |
| 318 |
|
| 319 |
func (m *SurveyResponse) GetCode() uint32 { |
| 320 |
if m != nil { |
| 321 |
return m.Code |
| 322 |
} |
| 323 |
return 0 |
| 324 |
} |
| 325 |
|
| 326 |
func (m *SurveyResponse) GetData() []byte { |
| 327 |
if m != nil { |
| 328 |
return m.Data |
| 329 |
} |
| 330 |
return nil |
| 331 |
} |
| 332 |
|
| 333 |
func init() { |
| 334 |
proto.RegisterType((*Command)(nil), "controlpb.Command") |
| 335 |
proto.RegisterType((*Node)(nil), "controlpb.Node") |
| 336 |
proto.RegisterType((*Metrics)(nil), "controlpb.Metrics") |
| 337 |
proto.RegisterType((*Unsubscribe)(nil), "controlpb.Unsubscribe") |
| 338 |
proto.RegisterType((*Disconnect)(nil), "controlpb.Disconnect") |
| 339 |
proto.RegisterType((*SurveyRequest)(nil), "controlpb.SurveyRequest") |
| 340 |
proto.RegisterType((*SurveyResponse)(nil), "controlpb.SurveyResponse") |
| 341 |
proto.RegisterEnum("controlpb.MethodType", MethodType_name, MethodType_value) |
| 342 |
} |
| 343 |
func (this *Command) Equal(that interface{}) bool { |
| 344 |
if that == nil { |
| 345 |
return this == nil |
| 346 |
} |
| 347 |
|
| 348 |
that1, ok := that.(*Command) |
| 349 |
if !ok { |
| 350 |
that2, ok := that.(Command) |
| 351 |
if ok { |
| 352 |
that1 = &that2 |
| 353 |
} else { |
| 354 |
return false |
| 355 |
} |
| 356 |
} |
| 357 |
if that1 == nil { |
| 358 |
return this == nil |
| 359 |
} else if this == nil { |
| 360 |
return false |
| 361 |
} |
| 362 |
if this.UID != that1.UID { |
| 363 |
return false |
| 364 |
} |
| 365 |
if this.Method != that1.Method { |
| 366 |
return false |
| 367 |
} |
| 368 |
if !this.Params.Equal(that1.Params) { |
| 369 |
return false |
| 370 |
} |
| 371 |
return true |
| 372 |
} |
| 373 |
func (this *Node) Equal(that interface{}) bool { |
| 374 |
if that == nil { |
| 375 |
return this == nil |
| 376 |
} |
| 377 |
|
| 378 |
that1, ok := that.(*Node) |
| 379 |
if !ok { |
| 380 |
that2, ok := that.(Node) |
| 381 |
if ok { |
| 382 |
that1 = &that2 |
| 383 |
} else { |
| 384 |
return false |
| 385 |
} |
| 386 |
} |
| 387 |
if that1 == nil { |
| 388 |
return this == nil |
| 389 |
} else if this == nil { |
| 390 |
return false |
| 391 |
} |
| 392 |
if this.UID != that1.UID { |
| 393 |
return false |
| 394 |
} |
| 395 |
if this.Name != that1.Name { |
| 396 |
return false |
| 397 |
} |
| 398 |
if this.Version != that1.Version { |
| 399 |
return false |
| 400 |
} |
| 401 |
if this.NumClients != that1.NumClients { |
| 402 |
return false |
| 403 |
} |
| 404 |
if this.NumUsers != that1.NumUsers { |
| 405 |
return false |
| 406 |
} |
| 407 |
if this.NumChannels != that1.NumChannels { |
| 408 |
return false |
| 409 |
} |
| 410 |
if this.Uptime != that1.Uptime { |
| 411 |
return false |
| 412 |
} |
| 413 |
if !this.Metrics.Equal(that1.Metrics) { |
| 414 |
return false |
| 415 |
} |
| 416 |
return true |
| 417 |
} |
| 418 |
func (this *Metrics) Equal(that interface{}) bool { |
| 419 |
if that == nil { |
| 420 |
return this == nil |
| 421 |
} |
| 422 |
|
| 423 |
that1, ok := that.(*Metrics) |
| 424 |
if !ok { |
| 425 |
that2, ok := that.(Metrics) |
| 426 |
if ok { |
| 427 |
that1 = &that2 |
| 428 |
} else { |
| 429 |
return false |
| 430 |
} |
| 431 |
} |
| 432 |
if that1 == nil { |
| 433 |
return this == nil |
| 434 |
} else if this == nil { |
| 435 |
return false |
| 436 |
} |
| 437 |
if this.Interval != that1.Interval { |
| 438 |
return false |
| 439 |
} |
| 440 |
if len(this.Items) != len(that1.Items) { |
| 441 |
return false |
| 442 |
} |
| 443 |
for i := range this.Items { |
| 444 |
if this.Items[i] != that1.Items[i] { |
| 445 |
return false |
| 446 |
} |
| 447 |
} |
| 448 |
return true |
| 449 |
} |
| 450 |
func (this *Unsubscribe) Equal(that interface{}) bool { |
| 451 |
if that == nil { |
| 452 |
return this == nil |
| 453 |
} |
| 454 |
|
| 455 |
that1, ok := that.(*Unsubscribe) |
| 456 |
if !ok { |
| 457 |
that2, ok := that.(Unsubscribe) |
| 458 |
if ok { |
| 459 |
that1 = &that2 |
| 460 |
} else { |
| 461 |
return false |
| 462 |
} |
| 463 |
} |
| 464 |
if that1 == nil { |
| 465 |
return this == nil |
| 466 |
} else if this == nil { |
| 467 |
return false |
| 468 |
} |
| 469 |
if this.Channel != that1.Channel { |
| 470 |
return false |
| 471 |
} |
| 472 |
if this.User != that1.User { |
| 473 |
return false |
| 474 |
} |
| 475 |
return true |
| 476 |
} |
| 477 |
func (this *Disconnect) Equal(that interface{}) bool { |
| 478 |
if that == nil { |
| 479 |
return this == nil |
| 480 |
} |
| 481 |
|
| 482 |
that1, ok := that.(*Disconnect) |
| 483 |
if !ok { |
| 484 |
that2, ok := that.(Disconnect) |
| 485 |
if ok { |
| 486 |
that1 = &that2 |
| 487 |
} else { |
| 488 |
return false |
| 489 |
} |
| 490 |
} |
| 491 |
if that1 == nil { |
| 492 |
return this == nil |
| 493 |
} else if this == nil { |
| 494 |
return false |
| 495 |
} |
| 496 |
if this.User != that1.User { |
| 497 |
return false |
| 498 |
} |
| 499 |
if len(this.Whitelist) != len(that1.Whitelist) { |
| 500 |
return false |
| 501 |
} |
| 502 |
for i := range this.Whitelist { |
| 503 |
if this.Whitelist[i] != that1.Whitelist[i] { |
| 504 |
return false |
| 505 |
} |
| 506 |
} |
| 507 |
if this.Code != that1.Code { |
| 508 |
return false |
| 509 |
} |
| 510 |
if this.Reason != that1.Reason { |
| 511 |
return false |
| 512 |
} |
| 513 |
if this.Reconnect != that1.Reconnect { |
| 514 |
return false |
| 515 |
} |
| 516 |
return true |
| 517 |
} |
| 518 |
func (this *SurveyRequest) Equal(that interface{}) bool { |
| 519 |
if that == nil { |
| 520 |
return this == nil |
| 521 |
} |
| 522 |
|
| 523 |
that1, ok := that.(*SurveyRequest) |
| 524 |
if !ok { |
| 525 |
that2, ok := that.(SurveyRequest) |
| 526 |
if ok { |
| 527 |
that1 = &that2 |
| 528 |
} else { |
| 529 |
return false |
| 530 |
} |
| 531 |
} |
| 532 |
if that1 == nil { |
| 533 |
return this == nil |
| 534 |
} else if this == nil { |
| 535 |
return false |
| 536 |
} |
| 537 |
if this.ID != that1.ID { |
| 538 |
return false |
| 539 |
} |
| 540 |
if this.Op != that1.Op { |
| 541 |
return false |
| 542 |
} |
| 543 |
if !bytes.Equal(this.Data, that1.Data) { |
| 544 |
return false |
| 545 |
} |
| 546 |
return true |
| 547 |
} |
| 548 |
func (this *SurveyResponse) Equal(that interface{}) bool { |
| 549 |
if that == nil { |
| 550 |
return this == nil |
| 551 |
} |
| 552 |
|
| 553 |
that1, ok := that.(*SurveyResponse) |
| 554 |
if !ok { |
| 555 |
that2, ok := that.(SurveyResponse) |
| 556 |
if ok { |
| 557 |
that1 = &that2 |
| 558 |
} else { |
| 559 |
return false |
| 560 |
} |
| 561 |
} |
| 562 |
if that1 == nil { |
| 563 |
return this == nil |
| 564 |
} else if this == nil { |
| 565 |
return false |
| 566 |
} |
| 567 |
if this.ID != that1.ID { |
| 568 |
return false |
| 569 |
} |
| 570 |
if this.Code != that1.Code { |
| 571 |
return false |
| 572 |
} |
| 573 |
if !bytes.Equal(this.Data, that1.Data) { |
| 574 |
return false |
| 575 |
} |
| 576 |
return true |
| 577 |
} |
| 578 |
func (m *Command) Marshal() (dAtA []byte, err error) { |
| 579 |
size := m.Size() |
| 580 |
dAtA = make([]byte, size) |
| 581 |
n, err := m.MarshalTo(dAtA) |
| 582 |
if err != nil { |
| 583 |
return nil, err |
| 584 |
} |
| 585 |
return dAtA[:n], nil |
| 586 |
} |
| 587 |
|
| 588 |
func (m *Command) MarshalTo(dAtA []byte) (int, error) { |
| 589 |
var i int |
| 590 |
_ = i |
| 591 |
var l int |
| 592 |
_ = l |
| 593 |
if len(m.UID) > 0 { |
| 594 |
dAtA[i] = 0xa |
| 595 |
i++ |
| 596 |
i = encodeVarintControl(dAtA, i, uint64(len(m.UID))) |
| 597 |
i += copy(dAtA[i:], m.UID) |
| 598 |
} |
| 599 |
if m.Method != 0 { |
| 600 |
dAtA[i] = 0x10 |
| 601 |
i++ |
| 602 |
i = encodeVarintControl(dAtA, i, uint64(m.Method)) |
| 603 |
} |
| 604 |
dAtA[i] = 0x1a |
| 605 |
i++ |
| 606 |
i = encodeVarintControl(dAtA, i, uint64(m.Params.Size())) |
| 607 |
n1, err := m.Params.MarshalTo(dAtA[i:]) |
| 608 |
if err != nil { |
| 609 |
return 0, err |
| 610 |
} |
| 611 |
i += n1 |
| 612 |
return i, nil |
| 613 |
} |
| 614 |
|
| 615 |
func (m *Node) Marshal() (dAtA []byte, err error) { |
| 616 |
size := m.Size() |
| 617 |
dAtA = make([]byte, size) |
| 618 |
n, err := m.MarshalTo(dAtA) |
| 619 |
if err != nil { |
| 620 |
return nil, err |
| 621 |
} |
| 622 |
return dAtA[:n], nil |
| 623 |
} |
| 624 |
|
| 625 |
func (m *Node) MarshalTo(dAtA []byte) (int, error) { |
| 626 |
var i int |
| 627 |
_ = i |
| 628 |
var l int |
| 629 |
_ = l |
| 630 |
if len(m.UID) > 0 { |
| 631 |
dAtA[i] = 0xa |
| 632 |
i++ |
| 633 |
i = encodeVarintControl(dAtA, i, uint64(len(m.UID))) |
| 634 |
i += copy(dAtA[i:], m.UID) |
| 635 |
} |
| 636 |
if len(m.Name) > 0 { |
| 637 |
dAtA[i] = 0x12 |
| 638 |
i++ |
| 639 |
i = encodeVarintControl(dAtA, i, uint64(len(m.Name))) |
| 640 |
i += copy(dAtA[i:], m.Name) |
| 641 |
} |
| 642 |
if len(m.Version) > 0 { |
| 643 |
dAtA[i] = 0x1a |
| 644 |
i++ |
| 645 |
i = encodeVarintControl(dAtA, i, uint64(len(m.Version))) |
| 646 |
i += copy(dAtA[i:], m.Version) |
| 647 |
} |
| 648 |
if m.NumClients != 0 { |
| 649 |
dAtA[i] = 0x20 |
| 650 |
i++ |
| 651 |
i = encodeVarintControl(dAtA, i, uint64(m.NumClients)) |
| 652 |
} |
| 653 |
if m.NumUsers != 0 { |
| 654 |
dAtA[i] = 0x28 |
| 655 |
i++ |
| 656 |
i = encodeVarintControl(dAtA, i, uint64(m.NumUsers)) |
| 657 |
} |
| 658 |
if m.NumChannels != 0 { |
| 659 |
dAtA[i] = 0x30 |
| 660 |
i++ |
| 661 |
i = encodeVarintControl(dAtA, i, uint64(m.NumChannels)) |
| 662 |
} |
| 663 |
if m.Uptime != 0 { |
| 664 |
dAtA[i] = 0x38 |
| 665 |
i++ |
| 666 |
i = encodeVarintControl(dAtA, i, uint64(m.Uptime)) |
| 667 |
} |
| 668 |
if m.Metrics != nil { |
| 669 |
dAtA[i] = 0x42 |
| 670 |
i++ |
| 671 |
i = encodeVarintControl(dAtA, i, uint64(m.Metrics.Size())) |
| 672 |
n2, err := m.Metrics.MarshalTo(dAtA[i:]) |
| 673 |
if err != nil { |
| 674 |
return 0, err |
| 675 |
} |
| 676 |
i += n2 |
| 677 |
} |
| 678 |
return i, nil |
| 679 |
} |
| 680 |
|
| 681 |
func (m *Metrics) Marshal() (dAtA []byte, err error) { |
| 682 |
size := m.Size() |
| 683 |
dAtA = make([]byte, size) |
| 684 |
n, err := m.MarshalTo(dAtA) |
| 685 |
if err != nil { |
| 686 |
return nil, err |
| 687 |
} |
| 688 |
return dAtA[:n], nil |
| 689 |
} |
| 690 |
|
| 691 |
func (m *Metrics) MarshalTo(dAtA []byte) (int, error) { |
| 692 |
var i int |
| 693 |
_ = i |
| 694 |
var l int |
| 695 |
_ = l |
| 696 |
if m.Interval != 0 { |
| 697 |
dAtA[i] = 0x9 |
| 698 |
i++ |
| 699 |
binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Interval)))) |
| 700 |
i += 8 |
| 701 |
} |
| 702 |
if len(m.Items) > 0 { |
| 703 |
for k, _ := range m.Items { |
| 704 |
dAtA[i] = 0x12 |
| 705 |
i++ |
| 706 |
v := m.Items[k] |
| 707 |
mapSize := 1 + len(k) + sovControl(uint64(len(k))) + 1 + 8 |
| 708 |
i = encodeVarintControl(dAtA, i, uint64(mapSize)) |
| 709 |
dAtA[i] = 0xa |
| 710 |
i++ |
| 711 |
i = encodeVarintControl(dAtA, i, uint64(len(k))) |
| 712 |
i += copy(dAtA[i:], k) |
| 713 |
dAtA[i] = 0x11 |
| 714 |
i++ |
| 715 |
binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) |
| 716 |
i += 8 |
| 717 |
} |
| 718 |
} |
| 719 |
return i, nil |
| 720 |
} |
| 721 |
|
| 722 |
func (m *Unsubscribe) Marshal() (dAtA []byte, err error) { |
| 723 |
size := m.Size() |
| 724 |
dAtA = make([]byte, size) |
| 725 |
n, err := m.MarshalTo(dAtA) |
| 726 |
if err != nil { |
| 727 |
return nil, err |
| 728 |
} |
| 729 |
return dAtA[:n], nil |
| 730 |
} |
| 731 |
|
| 732 |
func (m *Unsubscribe) MarshalTo(dAtA []byte) (int, error) { |
| 733 |
var i int |
| 734 |
_ = i |
| 735 |
var l int |
| 736 |
_ = l |
| 737 |
if len(m.Channel) > 0 { |
| 738 |
dAtA[i] = 0xa |
| 739 |
i++ |
| 740 |
i = encodeVarintControl(dAtA, i, uint64(len(m.Channel))) |
| 741 |
i += copy(dAtA[i:], m.Channel) |
| 742 |
} |
| 743 |
if len(m.User) > 0 { |
| 744 |
dAtA[i] = 0x12 |
| 745 |
i++ |
| 746 |
i = encodeVarintControl(dAtA, i, uint64(len(m.User))) |
| 747 |
i += copy(dAtA[i:], m.User) |
| 748 |
} |
| 749 |
return i, nil |
| 750 |
} |
| 751 |
|
| 752 |
func (m *Disconnect) Marshal() (dAtA []byte, err error) { |
| 753 |
size := m.Size() |
| 754 |
dAtA = make([]byte, size) |
| 755 |
n, err := m.MarshalTo(dAtA) |
| 756 |
if err != nil { |
| 757 |
return nil, err |
| 758 |
} |
| 759 |
return dAtA[:n], nil |
| 760 |
} |
| 761 |
|
| 762 |
func (m *Disconnect) MarshalTo(dAtA []byte) (int, error) { |
| 763 |
var i int |
| 764 |
_ = i |
| 765 |
var l int |
| 766 |
_ = l |
| 767 |
if len(m.User) > 0 { |
| 768 |
dAtA[i] = 0xa |
| 769 |
i++ |
| 770 |
i = encodeVarintControl(dAtA, i, uint64(len(m.User))) |
| 771 |
i += copy(dAtA[i:], m.User) |
| 772 |
} |
| 773 |
if len(m.Whitelist) > 0 { |
| 774 |
for _, s := range m.Whitelist { |
| 775 |
dAtA[i] = 0x12 |
| 776 |
i++ |
| 777 |
l = len(s) |
| 778 |
for l >= 1<<7 { |
| 779 |
dAtA[i] = uint8(uint64(l)&0x7f | 0x80) |
| 780 |
l >>= 7 |
| 781 |
i++ |
| 782 |
} |
| 783 |
dAtA[i] = uint8(l) |
| 784 |
i++ |
| 785 |
i += copy(dAtA[i:], s) |
| 786 |
} |
| 787 |
} |
| 788 |
if m.Code != 0 { |
| 789 |
dAtA[i] = 0x18 |
| 790 |
i++ |
| 791 |
i = encodeVarintControl(dAtA, i, uint64(m.Code)) |
| 792 |
} |
| 793 |
if len(m.Reason) > 0 { |
| 794 |
dAtA[i] = 0x22 |
| 795 |
i++ |
| 796 |
i = encodeVarintControl(dAtA, i, uint64(len(m.Reason))) |
| 797 |
i += copy(dAtA[i:], m.Reason) |
| 798 |
} |
| 799 |
if m.Reconnect { |
| 800 |
dAtA[i] = 0x28 |
| 801 |
i++ |
| 802 |
if m.Reconnect { |
| 803 |
dAtA[i] = 1 |
| 804 |
} else { |
| 805 |
dAtA[i] = 0 |
| 806 |
} |
| 807 |
i++ |
| 808 |
} |
| 809 |
return i, nil |
| 810 |
} |
| 811 |
|
| 812 |
func (m *SurveyRequest) Marshal() (dAtA []byte, err error) { |
| 813 |
size := m.Size() |
| 814 |
dAtA = make([]byte, size) |
| 815 |
n, err := m.MarshalTo(dAtA) |
| 816 |
if err != nil { |
| 817 |
return nil, err |
| 818 |
} |
| 819 |
return dAtA[:n], nil |
| 820 |
} |
| 821 |
|
| 822 |
func (m *SurveyRequest) MarshalTo(dAtA []byte) (int, error) { |
| 823 |
var i int |
| 824 |
_ = i |
| 825 |
var l int |
| 826 |
_ = l |
| 827 |
if m.ID != 0 { |
| 828 |
dAtA[i] = 0x8 |
| 829 |
i++ |
| 830 |
i = encodeVarintControl(dAtA, i, uint64(m.ID)) |
| 831 |
} |
| 832 |
if len(m.Op) > 0 { |
| 833 |
dAtA[i] = 0x12 |
| 834 |
i++ |
| 835 |
i = encodeVarintControl(dAtA, i, uint64(len(m.Op))) |
| 836 |
i += copy(dAtA[i:], m.Op) |
| 837 |
} |
| 838 |
if len(m.Data) > 0 { |
| 839 |
dAtA[i] = 0x1a |
| 840 |
i++ |
| 841 |
i = encodeVarintControl(dAtA, i, uint64(len(m.Data))) |
| 842 |
i += copy(dAtA[i:], m.Data) |
| 843 |
} |
| 844 |
return i, nil |
| 845 |
} |
| 846 |
|
| 847 |
func (m *SurveyResponse) Marshal() (dAtA []byte, err error) { |
| 848 |
size := m.Size() |
| 849 |
dAtA = make([]byte, size) |
| 850 |
n, err := m.MarshalTo(dAtA) |
| 851 |
if err != nil { |
| 852 |
return nil, err |
| 853 |
} |
| 854 |
return dAtA[:n], nil |
| 855 |
} |
| 856 |
|
| 857 |
func (m *SurveyResponse) MarshalTo(dAtA []byte) (int, error) { |
| 858 |
var i int |
| 859 |
_ = i |
| 860 |
var l int |
| 861 |
_ = l |
| 862 |
if m.ID != 0 { |
| 863 |
dAtA[i] = 0x8 |
| 864 |
i++ |
| 865 |
i = encodeVarintControl(dAtA, i, uint64(m.ID)) |
| 866 |
} |
| 867 |
if m.Code != 0 { |
| 868 |
dAtA[i] = 0x18 |
| 869 |
i++ |
| 870 |
i = encodeVarintControl(dAtA, i, uint64(m.Code)) |
| 871 |
} |
| 872 |
if len(m.Data) > 0 { |
| 873 |
dAtA[i] = 0x22 |
| 874 |
i++ |
| 875 |
i = encodeVarintControl(dAtA, i, uint64(len(m.Data))) |
| 876 |
i += copy(dAtA[i:], m.Data) |
| 877 |
} |
| 878 |
return i, nil |
| 879 |
} |
| 880 |
|
| 881 |
func encodeVarintControl(dAtA []byte, offset int, v uint64) int { |
| 882 |
for v >= 1<<7 { |
| 883 |
dAtA[offset] = uint8(v&0x7f | 0x80) |
| 884 |
v >>= 7 |
| 885 |
offset++ |
| 886 |
} |
| 887 |
dAtA[offset] = uint8(v) |
| 888 |
return offset + 1 |
| 889 |
} |
| 890 |
func NewPopulatedCommand(r randyControl, easy bool) *Command { |
| 891 |
this := &Command{} |
| 892 |
this.UID = string(randStringControl(r)) |
| 893 |
this.Method = MethodType([]int32{0, 1, 2, 3, 4, 5}[r.Intn(6)]) |
| 894 |
v1 := NewPopulatedRaw(r) |
| 895 |
this.Params = *v1 |
| 896 |
if !easy && r.Intn(10) != 0 { |
| 897 |
} |
| 898 |
return this |
| 899 |
} |
| 900 |
|
| 901 |
func NewPopulatedNode(r randyControl, easy bool) *Node { |
| 902 |
this := &Node{} |
| 903 |
this.UID = string(randStringControl(r)) |
| 904 |
this.Name = string(randStringControl(r)) |
| 905 |
this.Version = string(randStringControl(r)) |
| 906 |
this.NumClients = uint32(r.Uint32()) |
| 907 |
this.NumUsers = uint32(r.Uint32()) |
| 908 |
this.NumChannels = uint32(r.Uint32()) |
| 909 |
this.Uptime = uint32(r.Uint32()) |
| 910 |
if r.Intn(10) != 0 { |
| 911 |
this.Metrics = NewPopulatedMetrics(r, easy) |
| 912 |
} |
| 913 |
if !easy && r.Intn(10) != 0 { |
| 914 |
} |
| 915 |
return this |
| 916 |
} |
| 917 |
|
| 918 |
func NewPopulatedMetrics(r randyControl, easy bool) *Metrics { |
| 919 |
this := &Metrics{} |
| 920 |
this.Interval = float64(r.Float64()) |
| 921 |
if r.Intn(2) == 0 { |
| 922 |
this.Interval *= -1 |
| 923 |
} |
| 924 |
if r.Intn(10) != 0 { |
| 925 |
v2 := r.Intn(10) |
| 926 |
this.Items = make(map[string]float64) |
| 927 |
for i := 0; i < v2; i++ { |
| 928 |
v3 := randStringControl(r) |
| 929 |
this.Items[v3] = float64(r.Float64()) |
| 930 |
if r.Intn(2) == 0 { |
| 931 |
this.Items[v3] *= -1 |
| 932 |
} |
| 933 |
} |
| 934 |
} |
| 935 |
if !easy && r.Intn(10) != 0 { |
| 936 |
} |
| 937 |
return this |
| 938 |
} |
| 939 |
|
| 940 |
func NewPopulatedUnsubscribe(r randyControl, easy bool) *Unsubscribe { |
| 941 |
this := &Unsubscribe{} |
| 942 |
this.Channel = string(randStringControl(r)) |
| 943 |
this.User = string(randStringControl(r)) |
| 944 |
if !easy && r.Intn(10) != 0 { |
| 945 |
} |
| 946 |
return this |
| 947 |
} |
| 948 |
|
| 949 |
func NewPopulatedDisconnect(r randyControl, easy bool) *Disconnect { |
| 950 |
this := &Disconnect{} |
| 951 |
this.User = string(randStringControl(r)) |
| 952 |
v4 := r.Intn(10) |
| 953 |
this.Whitelist = make([]string, v4) |
| 954 |
for i := 0; i < v4; i++ { |
| 955 |
this.Whitelist[i] = string(randStringControl(r)) |
| 956 |
} |
| 957 |
this.Code = uint32(r.Uint32()) |
| 958 |
this.Reason = string(randStringControl(r)) |
| 959 |
this.Reconnect = bool(bool(r.Intn(2) == 0)) |
| 960 |
if !easy && r.Intn(10) != 0 { |
| 961 |
} |
| 962 |
return this |
| 963 |
} |
| 964 |
|
| 965 |
func NewPopulatedSurveyRequest(r randyControl, easy bool) *SurveyRequest { |
| 966 |
this := &SurveyRequest{} |
| 967 |
this.ID = uint64(uint64(r.Uint32())) |
| 968 |
this.Op = string(randStringControl(r)) |
| 969 |
v5 := r.Intn(100) |
| 970 |
this.Data = make([]byte, v5) |
| 971 |
for i := 0; i < v5; i++ { |
| 972 |
this.Data[i] = byte(r.Intn(256)) |
| 973 |
} |
| 974 |
if !easy && r.Intn(10) != 0 { |
| 975 |
} |
| 976 |
return this |
| 977 |
} |
| 978 |
|
| 979 |
func NewPopulatedSurveyResponse(r randyControl, easy bool) *SurveyResponse { |
| 980 |
this := &SurveyResponse{} |
| 981 |
this.ID = uint64(uint64(r.Uint32())) |
| 982 |
this.Code = uint32(r.Uint32()) |
| 983 |
v6 := r.Intn(100) |
| 984 |
this.Data = make([]byte, v6) |
| 985 |
for i := 0; i < v6; i++ { |
| 986 |
this.Data[i] = byte(r.Intn(256)) |
| 987 |
} |
| 988 |
if !easy && r.Intn(10) != 0 { |
| 989 |
} |
| 990 |
return this |
| 991 |
} |
| 992 |
|
| 993 |
type randyControl interface { |
| 994 |
Float32() float32 |
| 995 |
Float64() float64 |
| 996 |
Int63() int64 |
| 997 |
Int31() int32 |
| 998 |
Uint32() uint32 |
| 999 |
Intn(n int) int |
| 1000 |
} |
| 1001 |
|
| 1002 |
func randUTF8RuneControl(r randyControl) rune { |
| 1003 |
ru := r.Intn(62) |
| 1004 |
if ru < 10 { |
| 1005 |
return rune(ru + 48) |
| 1006 |
} else if ru < 36 { |
| 1007 |
return rune(ru + 55) |
| 1008 |
} |
| 1009 |
return rune(ru + 61) |
| 1010 |
} |
| 1011 |
func randStringControl(r randyControl) string { |
| 1012 |
v7 := r.Intn(100) |
| 1013 |
tmps := make([]rune, v7) |
| 1014 |
for i := 0; i < v7; i++ { |
| 1015 |
tmps[i] = randUTF8RuneControl(r) |
| 1016 |
} |
| 1017 |
return string(tmps) |
| 1018 |
} |
| 1019 |
func randUnrecognizedControl(r randyControl, maxFieldNumber int) (dAtA []byte) { |
| 1020 |
l := r.Intn(5) |
| 1021 |
for i := 0; i < l; i++ { |
| 1022 |
wire := r.Intn(4) |
| 1023 |
if wire == 3 { |
| 1024 |
wire = 5 |
| 1025 |
} |
| 1026 |
fieldNumber := maxFieldNumber + r.Intn(100) |
| 1027 |
dAtA = randFieldControl(dAtA, r, fieldNumber, wire) |
| 1028 |
} |
| 1029 |
return dAtA |
| 1030 |
} |
| 1031 |
func randFieldControl(dAtA []byte, r randyControl, fieldNumber int, wire int) []byte { |
| 1032 |
key := uint32(fieldNumber)<<3 | uint32(wire) |
| 1033 |
switch wire { |
| 1034 |
case 0: |
| 1035 |
dAtA = encodeVarintPopulateControl(dAtA, uint64(key)) |
| 1036 |
v8 := r.Int63() |
| 1037 |
if r.Intn(2) == 0 { |
| 1038 |
v8 *= -1 |
| 1039 |
} |
| 1040 |
dAtA = encodeVarintPopulateControl(dAtA, uint64(v8)) |
| 1041 |
case 1: |
| 1042 |
dAtA = encodeVarintPopulateControl(dAtA, uint64(key)) |
| 1043 |
dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) |
| 1044 |
case 2: |
| 1045 |
dAtA = encodeVarintPopulateControl(dAtA, uint64(key)) |
| 1046 |
ll := r.Intn(100) |
| 1047 |
dAtA = encodeVarintPopulateControl(dAtA, uint64(ll)) |
| 1048 |
for j := 0; j < ll; j++ { |
| 1049 |
dAtA = append(dAtA, byte(r.Intn(256))) |
| 1050 |
} |
| 1051 |
default: |
| 1052 |
dAtA = encodeVarintPopulateControl(dAtA, uint64(key)) |
| 1053 |
dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) |
| 1054 |
} |
| 1055 |
return dAtA |
| 1056 |
} |
| 1057 |
func encodeVarintPopulateControl(dAtA []byte, v uint64) []byte { |
| 1058 |
for v >= 1<<7 { |
| 1059 |
dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) |
| 1060 |
v >>= 7 |
| 1061 |
} |
| 1062 |
dAtA = append(dAtA, uint8(v)) |
| 1063 |
return dAtA |
| 1064 |
} |
| 1065 |
func (m *Command) Size() (n int) { |
| 1066 |
var l int |
| 1067 |
_ = l |
| 1068 |
l = len(m.UID) |
| 1069 |
if l > 0 { |
| 1070 |
n += 1 + l + sovControl(uint64(l)) |
| 1071 |
} |
| 1072 |
if m.Method != 0 { |
| 1073 |
n += 1 + sovControl(uint64(m.Method)) |
| 1074 |
} |
| 1075 |
l = m.Params.Size() |
| 1076 |
n += 1 + l + sovControl(uint64(l)) |
| 1077 |
return n |
| 1078 |
} |
| 1079 |
|
| 1080 |
func (m *Node) Size() (n int) { |
| 1081 |
var l int |
| 1082 |
_ = l |
| 1083 |
l = len(m.UID) |
| 1084 |
if l > 0 { |
| 1085 |
n += 1 + l + sovControl(uint64(l)) |
| 1086 |
} |
| 1087 |
l = len(m.Name) |
| 1088 |
if l > 0 { |
| 1089 |
n += 1 + l + sovControl(uint64(l)) |
| 1090 |
} |
| 1091 |
l = len(m.Version) |
| 1092 |
if l > 0 { |
| 1093 |
n += 1 + l + sovControl(uint64(l)) |
| 1094 |
} |
| 1095 |
if m.NumClients != 0 { |
| 1096 |
n += 1 + sovControl(uint64(m.NumClients)) |
| 1097 |
} |
| 1098 |
if m.NumUsers != 0 { |
| 1099 |
n += 1 + sovControl(uint64(m.NumUsers)) |
| 1100 |
} |
| 1101 |
if m.NumChannels != 0 { |
| 1102 |
n += 1 + sovControl(uint64(m.NumChannels)) |
| 1103 |
} |
| 1104 |
if m.Uptime != 0 { |
| 1105 |
n += 1 + sovControl(uint64(m.Uptime)) |
| 1106 |
} |
| 1107 |
if m.Metrics != nil { |
| 1108 |
l = m.Metrics.Size() |
| 1109 |
n += 1 + l + sovControl(uint64(l)) |
| 1110 |
} |
| 1111 |
return n |
| 1112 |
} |
| 1113 |
|
| 1114 |
func (m *Metrics) Size() (n int) { |
| 1115 |
var l int |
| 1116 |
_ = l |
| 1117 |
if m.Interval != 0 { |
| 1118 |
n += 9 |
| 1119 |
} |
| 1120 |
if len(m.Items) > 0 { |
| 1121 |
for k, v := range m.Items { |
| 1122 |
_ = k |
| 1123 |
_ = v |
| 1124 |
mapEntrySize := 1 + len(k) + sovControl(uint64(len(k))) + 1 + 8 |
| 1125 |
n += mapEntrySize + 1 + sovControl(uint64(mapEntrySize)) |
| 1126 |
} |
| 1127 |
} |
| 1128 |
return n |
| 1129 |
} |
| 1130 |
|
| 1131 |
func (m *Unsubscribe) Size() (n int) { |
| 1132 |
var l int |
| 1133 |
_ = l |
| 1134 |
l = len(m.Channel) |
| 1135 |
if l > 0 { |
| 1136 |
n += 1 + l + sovControl(uint64(l)) |
| 1137 |
} |
| 1138 |
l = len(m.User) |
| 1139 |
if l > 0 { |
| 1140 |
n += 1 + l + sovControl(uint64(l)) |
| 1141 |
} |
| 1142 |
return n |
| 1143 |
} |
| 1144 |
|
| 1145 |
func (m *Disconnect) Size() (n int) { |
| 1146 |
var l int |
| 1147 |
_ = l |
| 1148 |
l = len(m.User) |
| 1149 |
if l > 0 { |
| 1150 |
n += 1 + l + sovControl(uint64(l)) |
| 1151 |
} |
| 1152 |
if len(m.Whitelist) > 0 { |
| 1153 |
for _, s := range m.Whitelist { |
| 1154 |
l = len(s) |
| 1155 |
n += 1 + l + sovControl(uint64(l)) |
| 1156 |
} |
| 1157 |
} |
| 1158 |
if m.Code != 0 { |
| 1159 |
n += 1 + sovControl(uint64(m.Code)) |
| 1160 |
} |
| 1161 |
l = len(m.Reason) |
| 1162 |
if l > 0 { |
| 1163 |
n += 1 + l + sovControl(uint64(l)) |
| 1164 |
} |
| 1165 |
if m.Reconnect { |
| 1166 |
n += 2 |
| 1167 |
} |
| 1168 |
return n |
| 1169 |
} |
| 1170 |
|
| 1171 |
func (m *SurveyRequest) Size() (n int) { |
| 1172 |
var l int |
| 1173 |
_ = l |
| 1174 |
if m.ID != 0 { |
| 1175 |
n += 1 + sovControl(uint64(m.ID)) |
| 1176 |
} |
| 1177 |
l = len(m.Op) |
| 1178 |
if l > 0 { |
| 1179 |
n += 1 + l + sovControl(uint64(l)) |
| 1180 |
} |
| 1181 |
l = len(m.Data) |
| 1182 |
if l > 0 { |
| 1183 |
n += 1 + l + sovControl(uint64(l)) |
| 1184 |
} |
| 1185 |
return n |
| 1186 |
} |
| 1187 |
|
| 1188 |
func (m *SurveyResponse) Size() (n int) { |
| 1189 |
var l int |
| 1190 |
_ = l |
| 1191 |
if m.ID != 0 { |
| 1192 |
n += 1 + sovControl(uint64(m.ID)) |
| 1193 |
} |
| 1194 |
if m.Code != 0 { |
| 1195 |
n += 1 + sovControl(uint64(m.Code)) |
| 1196 |
} |
| 1197 |
l = len(m.Data) |
| 1198 |
if l > 0 { |
| 1199 |
n += 1 + l + sovControl(uint64(l)) |
| 1200 |
} |
| 1201 |
return n |
| 1202 |
} |
| 1203 |
|
| 1204 |
func sovControl(x uint64) (n int) { |
| 1205 |
for { |
| 1206 |
n++ |
| 1207 |
x >>= 7 |
| 1208 |
if x == 0 { |
| 1209 |
break |
| 1210 |
} |
| 1211 |
} |
| 1212 |
return n |
| 1213 |
} |
| 1214 |
func sozControl(x uint64) (n int) { |
| 1215 |
return sovControl(uint64((x << 1) ^ uint64((int64(x) >> 63)))) |
| 1216 |
} |
| 1217 |
func (m *Command) Unmarshal(dAtA []byte) error { |
| 1218 |
l := len(dAtA) |
| 1219 |
iNdEx := 0 |
| 1220 |
for iNdEx < l { |
| 1221 |
preIndex := iNdEx |
| 1222 |
var wire uint64 |
| 1223 |
for shift := uint(0); ; shift += 7 { |
| 1224 |
if shift >= 64 { |
| 1225 |
return ErrIntOverflowControl |
| 1226 |
} |
| 1227 |
if iNdEx >= l { |
| 1228 |
return io.ErrUnexpectedEOF |
| 1229 |
} |
| 1230 |
b := dAtA[iNdEx] |
| 1231 |
iNdEx++ |
| 1232 |
wire |= (uint64(b) & 0x7F) << shift |
| 1233 |
if b < 0x80 { |
| 1234 |
break |
| 1235 |
} |
| 1236 |
} |
| 1237 |
fieldNum := int32(wire >> 3) |
| 1238 |
wireType := int(wire & 0x7) |
| 1239 |
if wireType == 4 { |
| 1240 |
return fmt.Errorf("proto: Command: wiretype end group for non-group") |
| 1241 |
} |
| 1242 |
if fieldNum <= 0 { |
| 1243 |
return fmt.Errorf("proto: Command: illegal tag %d (wire type %d)", fieldNum, wire) |
| 1244 |
} |
| 1245 |
switch fieldNum { |
| 1246 |
case 1: |
| 1247 |
if wireType != 2 { |
| 1248 |
return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType) |
| 1249 |
} |
| 1250 |
var stringLen uint64 |
| 1251 |
for shift := uint(0); ; shift += 7 { |
| 1252 |
if shift >= 64 { |
| 1253 |
return ErrIntOverflowControl |
| 1254 |
} |
| 1255 |
if iNdEx >= l { |
| 1256 |
return io.ErrUnexpectedEOF |
| 1257 |
} |
| 1258 |
b := dAtA[iNdEx] |
| 1259 |
iNdEx++ |
| 1260 |
stringLen |= (uint64(b) & 0x7F) << shift |
| 1261 |
if b < 0x80 { |
| 1262 |
break |
| 1263 |
} |
| 1264 |
} |
| 1265 |
intStringLen := int(stringLen) |
| 1266 |
if intStringLen < 0 { |
| 1267 |
return ErrInvalidLengthControl |
| 1268 |
} |
| 1269 |
postIndex := iNdEx + intStringLen |
| 1270 |
if postIndex > l { |
| 1271 |
return io.ErrUnexpectedEOF |
| 1272 |
} |
| 1273 |
m.UID = string(dAtA[iNdEx:postIndex]) |
| 1274 |
iNdEx = postIndex |
| 1275 |
case 2: |
| 1276 |
if wireType != 0 { |
| 1277 |
return fmt.Errorf("proto: wrong wireType = %d for field Method", wireType) |
| 1278 |
} |
| 1279 |
m.Method = 0 |
| 1280 |
for shift := uint(0); ; shift += 7 { |
| 1281 |
if shift >= 64 { |
| 1282 |
return ErrIntOverflowControl |
| 1283 |
} |
| 1284 |
if iNdEx >= l { |
| 1285 |
return io.ErrUnexpectedEOF |
| 1286 |
} |
| 1287 |
b := dAtA[iNdEx] |
| 1288 |
iNdEx++ |
| 1289 |
m.Method |= (MethodType(b) & 0x7F) << shift |
| 1290 |
if b < 0x80 { |
| 1291 |
break |
| 1292 |
} |
| 1293 |
} |
| 1294 |
case 3: |
| 1295 |
if wireType != 2 { |
| 1296 |
return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) |
| 1297 |
} |
| 1298 |
var byteLen int |
| 1299 |
for shift := uint(0); ; shift += 7 { |
| 1300 |
if shift >= 64 { |
| 1301 |
return ErrIntOverflowControl |
| 1302 |
} |
| 1303 |
if iNdEx >= l { |
| 1304 |
return io.ErrUnexpectedEOF |
| 1305 |
} |
| 1306 |
b := dAtA[iNdEx] |
| 1307 |
iNdEx++ |
| 1308 |
byteLen |= (int(b) & 0x7F) << shift |
| 1309 |
if b < 0x80 { |
| 1310 |
break |
| 1311 |
} |
| 1312 |
} |
| 1313 |
if byteLen < 0 { |
| 1314 |
return ErrInvalidLengthControl |
| 1315 |
} |
| 1316 |
postIndex := iNdEx + byteLen |
| 1317 |
if postIndex > l { |
| 1318 |
return io.ErrUnexpectedEOF |
| 1319 |
} |
| 1320 |
if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
| 1321 |
return err |
| 1322 |
} |
| 1323 |
iNdEx = postIndex |
| 1324 |
default: |
| 1325 |
iNdEx = preIndex |
| 1326 |
skippy, err := skipControl(dAtA[iNdEx:]) |
| 1327 |
if err != nil { |
| 1328 |
return err |
| 1329 |
} |
| 1330 |
if skippy < 0 { |
| 1331 |
return ErrInvalidLengthControl |
| 1332 |
} |
| 1333 |
if (iNdEx + skippy) > l { |
| 1334 |
return io.ErrUnexpectedEOF |
| 1335 |
} |
| 1336 |
iNdEx += skippy |
| 1337 |
} |
| 1338 |
} |
| 1339 |
|
| 1340 |
if iNdEx > l { |
| 1341 |
return io.ErrUnexpectedEOF |
| 1342 |
} |
| 1343 |
return nil |
| 1344 |
} |
| 1345 |
func (m *Node) Unmarshal(dAtA []byte) error { |
| 1346 |
l := len(dAtA) |
| 1347 |
iNdEx := 0 |
| 1348 |
for iNdEx < l { |
| 1349 |
preIndex := iNdEx |
| 1350 |
var wire uint64 |
| 1351 |
for shift := uint(0); ; shift += 7 { |
| 1352 |
if shift >= 64 { |
| 1353 |
return ErrIntOverflowControl |
| 1354 |
} |
| 1355 |
if iNdEx >= l { |
| 1356 |
return io.ErrUnexpectedEOF |
| 1357 |
} |
| 1358 |
b := dAtA[iNdEx] |
| 1359 |
iNdEx++ |
| 1360 |
wire |= (uint64(b) & 0x7F) << shift |
| 1361 |
if b < 0x80 { |
| 1362 |
break |
| 1363 |
} |
| 1364 |
} |
| 1365 |
fieldNum := int32(wire >> 3) |
| 1366 |
wireType := int(wire & 0x7) |
| 1367 |
if wireType == 4 { |
| 1368 |
return fmt.Errorf("proto: Node: wiretype end group for non-group") |
| 1369 |
} |
| 1370 |
if fieldNum <= 0 { |
| 1371 |
return fmt.Errorf("proto: Node: illegal tag %d (wire type %d)", fieldNum, wire) |
| 1372 |
} |
| 1373 |
switch fieldNum { |
| 1374 |
case 1: |
| 1375 |
if wireType != 2 { |
| 1376 |
return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType) |
| 1377 |
} |
| 1378 |
var stringLen uint64 |
| 1379 |
for shift := uint(0); ; shift += 7 { |
| 1380 |
if shift >= 64 { |
| 1381 |
return ErrIntOverflowControl |
| 1382 |
} |
| 1383 |
if iNdEx >= l { |
| 1384 |
return io.ErrUnexpectedEOF |
| 1385 |
} |
| 1386 |
b := dAtA[iNdEx] |
| 1387 |
iNdEx++ |
| 1388 |
stringLen |= (uint64(b) & 0x7F) << shift |
| 1389 |
if b < 0x80 { |
| 1390 |
break |
| 1391 |
} |
| 1392 |
} |
| 1393 |
intStringLen := int(stringLen) |
| 1394 |
if intStringLen < 0 { |
| 1395 |
return ErrInvalidLengthControl |
| 1396 |
} |
| 1397 |
postIndex := iNdEx + intStringLen |
| 1398 |
if postIndex > l { |
| 1399 |
return io.ErrUnexpectedEOF |
| 1400 |
} |
| 1401 |
m.UID = string(dAtA[iNdEx:postIndex]) |
| 1402 |
iNdEx = postIndex |
| 1403 |
case 2: |
| 1404 |
if wireType != 2 { |
| 1405 |
return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) |
| 1406 |
} |
| 1407 |
var stringLen uint64 |
| 1408 |
for shift := uint(0); ; shift += 7 { |
| 1409 |
if shift >= 64 { |
| 1410 |
return ErrIntOverflowControl |
| 1411 |
} |
| 1412 |
if iNdEx >= l { |
| 1413 |
return io.ErrUnexpectedEOF |
| 1414 |
} |
| 1415 |
b := dAtA[iNdEx] |
| 1416 |
iNdEx++ |
| 1417 |
stringLen |= (uint64(b) & 0x7F) << shift |
| 1418 |
if b < 0x80 { |
| 1419 |
break |
| 1420 |
} |
| 1421 |
} |
| 1422 |
intStringLen := int(stringLen) |
| 1423 |
if intStringLen < 0 { |
| 1424 |
return ErrInvalidLengthControl |
| 1425 |
} |
| 1426 |
postIndex := iNdEx + intStringLen |
| 1427 |
if postIndex > l { |
| 1428 |
return io.ErrUnexpectedEOF |
| 1429 |
} |
| 1430 |
m.Name = string(dAtA[iNdEx:postIndex]) |
| 1431 |
iNdEx = postIndex |
| 1432 |
case 3: |
| 1433 |
if wireType != 2 { |
| 1434 |
return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) |
| 1435 |
} |
| 1436 |
var stringLen uint64 |
| 1437 |
for shift := uint(0); ; shift += 7 { |
| 1438 |
if shift >= 64 { |
| 1439 |
return ErrIntOverflowControl |
| 1440 |
} |
| 1441 |
if iNdEx >= l { |
| 1442 |
return io.ErrUnexpectedEOF |
| 1443 |
} |
| 1444 |
b := dAtA[iNdEx] |
| 1445 |
iNdEx++ |
| 1446 |
stringLen |= (uint64(b) & 0x7F) << shift |
| 1447 |
if b < 0x80 { |
| 1448 |
break |
| 1449 |
} |
| 1450 |
} |
| 1451 |
intStringLen := int(stringLen) |
| 1452 |
if intStringLen < 0 { |
| 1453 |
return ErrInvalidLengthControl |
| 1454 |
} |
| 1455 |
postIndex := iNdEx + intStringLen |
| 1456 |
if postIndex > l { |
| 1457 |
return io.ErrUnexpectedEOF |
| 1458 |
} |
| 1459 |
m.Version = string(dAtA[iNdEx:postIndex]) |
| 1460 |
iNdEx = postIndex |
| 1461 |
case 4: |
| 1462 |
if wireType != 0 { |
| 1463 |
return fmt.Errorf("proto: wrong wireType = %d for field NumClients", wireType) |
| 1464 |
} |
| 1465 |
m.NumClients = 0 |
| 1466 |
for shift := uint(0); ; shift += 7 { |
| 1467 |
if shift >= 64 { |
| 1468 |
return ErrIntOverflowControl |
| 1469 |
} |
| 1470 |
if iNdEx >= l { |
| 1471 |
return io.ErrUnexpectedEOF |
| 1472 |
} |
| 1473 |
b := dAtA[iNdEx] |
| 1474 |
iNdEx++ |
| 1475 |
m.NumClients |= (uint32(b) & 0x7F) << shift |
| 1476 |
if b < 0x80 { |
| 1477 |
break |
| 1478 |
} |
| 1479 |
} |
| 1480 |
case 5: |
| 1481 |
if wireType != 0 { |
| 1482 |
return fmt.Errorf("proto: wrong wireType = %d for field NumUsers", wireType) |
| 1483 |
} |
| 1484 |
m.NumUsers = 0 |
| 1485 |
for shift := uint(0); ; shift += 7 { |
| 1486 |
if shift >= 64 { |
| 1487 |
return ErrIntOverflowControl |
| 1488 |
} |
| 1489 |
if iNdEx >= l { |
| 1490 |
return io.ErrUnexpectedEOF |
| 1491 |
} |
| 1492 |
b := dAtA[iNdEx] |
| 1493 |
iNdEx++ |
| 1494 |
m.NumUsers |= (uint32(b) & 0x7F) << shift |
| 1495 |
if b < 0x80 { |
| 1496 |
break |
| 1497 |
} |
| 1498 |
} |
| 1499 |
case 6: |
| 1500 |
if wireType != 0 { |
| 1501 |
return fmt.Errorf("proto: wrong wireType = %d for field NumChannels", wireType) |
| 1502 |
} |
| 1503 |
m.NumChannels = 0 |
| 1504 |
for shift := uint(0); ; shift += 7 { |
| 1505 |
if shift >= 64 { |
| 1506 |
return ErrIntOverflowControl |
| 1507 |
} |
| 1508 |
if iNdEx >= l { |
| 1509 |
return io.ErrUnexpectedEOF |
| 1510 |
} |
| 1511 |
b := dAtA[iNdEx] |
| 1512 |
iNdEx++ |
| 1513 |
m.NumChannels |= (uint32(b) & 0x7F) << shift |
| 1514 |
if b < 0x80 { |
| 1515 |
break |
| 1516 |
} |
| 1517 |
} |
| 1518 |
case 7: |
| 1519 |
if wireType != 0 { |
| 1520 |
return fmt.Errorf("proto: wrong wireType = %d for field Uptime", wireType) |
| 1521 |
} |
| 1522 |
m.Uptime = 0 |
| 1523 |
for shift := uint(0); ; shift += 7 { |
| 1524 |
if shift >= 64 { |
| 1525 |
return ErrIntOverflowControl |
| 1526 |
} |
| 1527 |
if iNdEx >= l { |
| 1528 |
return io.ErrUnexpectedEOF |
| 1529 |
} |
| 1530 |
b := dAtA[iNdEx] |
| 1531 |
iNdEx++ |
| 1532 |
m.Uptime |= (uint32(b) & 0x7F) << shift |
| 1533 |
if b < 0x80 { |
| 1534 |
break |
| 1535 |
} |
| 1536 |
} |
| 1537 |
case 8: |
| 1538 |
if wireType != 2 { |
| 1539 |
return fmt.Errorf("proto: wrong wireType = %d for field Metrics", wireType) |
| 1540 |
} |
| 1541 |
var msglen int |
| 1542 |
for shift := uint(0); ; shift += 7 { |
| 1543 |
if shift >= 64 { |
| 1544 |
return ErrIntOverflowControl |
| 1545 |
} |
| 1546 |
if iNdEx >= l { |
| 1547 |
return io.ErrUnexpectedEOF |
| 1548 |
} |
| 1549 |
b := dAtA[iNdEx] |
| 1550 |
iNdEx++ |
| 1551 |
msglen |= (int(b) & 0x7F) << shift |
| 1552 |
if b < 0x80 { |
| 1553 |
break |
| 1554 |
} |
| 1555 |
} |
| 1556 |
if msglen < 0 { |
| 1557 |
return ErrInvalidLengthControl |
| 1558 |
} |
| 1559 |
postIndex := iNdEx + msglen |
| 1560 |
if postIndex > l { |
| 1561 |
return io.ErrUnexpectedEOF |
| 1562 |
} |
| 1563 |
if m.Metrics == nil { |
| 1564 |
m.Metrics = &Metrics{} |
| 1565 |
} |
| 1566 |
if err := m.Metrics.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
| 1567 |
return err |
| 1568 |
} |
| 1569 |
iNdEx = postIndex |
| 1570 |
default: |
| 1571 |
iNdEx = preIndex |
| 1572 |
skippy, err := skipControl(dAtA[iNdEx:]) |
| 1573 |
if err != nil { |
| 1574 |
return err |
| 1575 |
} |
| 1576 |
if skippy < 0 { |
| 1577 |
return ErrInvalidLengthControl |
| 1578 |
} |
| 1579 |
if (iNdEx + skippy) > l { |
| 1580 |
return io.ErrUnexpectedEOF |
| 1581 |
} |
| 1582 |
iNdEx += skippy |
| 1583 |
} |
| 1584 |
} |
| 1585 |
|
| 1586 |
if iNdEx > l { |
| 1587 |
return io.ErrUnexpectedEOF |
| 1588 |
} |
| 1589 |
return nil |
| 1590 |
} |
| 1591 |
func (m *Metrics) Unmarshal(dAtA []byte) error { |
| 1592 |
l := len(dAtA) |
| 1593 |
iNdEx := 0 |
| 1594 |
for iNdEx < l { |
| 1595 |
preIndex := iNdEx |
| 1596 |
var wire uint64 |
| 1597 |
for shift := uint(0); ; shift += 7 { |
| 1598 |
if shift >= 64 { |
| 1599 |
return ErrIntOverflowControl |
| 1600 |
} |
| 1601 |
if iNdEx >= l { |
| 1602 |
return io.ErrUnexpectedEOF |
| 1603 |
} |
| 1604 |
b := dAtA[iNdEx] |
| 1605 |
iNdEx++ |
| 1606 |
wire |= (uint64(b) & 0x7F) << shift |
| 1607 |
if b < 0x80 { |
| 1608 |
break |
| 1609 |
} |
| 1610 |
} |
| 1611 |
fieldNum := int32(wire >> 3) |
| 1612 |
wireType := int(wire & 0x7) |
| 1613 |
if wireType == 4 { |
| 1614 |
return fmt.Errorf("proto: Metrics: wiretype end group for non-group") |
| 1615 |
} |
| 1616 |
if fieldNum <= 0 { |
| 1617 |
return fmt.Errorf("proto: Metrics: illegal tag %d (wire type %d)", fieldNum, wire) |
| 1618 |
} |
| 1619 |
switch fieldNum { |
| 1620 |
case 1: |
| 1621 |
if wireType != 1 { |
| 1622 |
return fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) |
| 1623 |
} |
| 1624 |
var v uint64 |
| 1625 |
if (iNdEx + 8) > l { |
| 1626 |
return io.ErrUnexpectedEOF |
| 1627 |
} |
| 1628 |
v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) |
| 1629 |
iNdEx += 8 |
| 1630 |
m.Interval = float64(math.Float64frombits(v)) |
| 1631 |
case 2: |
| 1632 |
if wireType != 2 { |
| 1633 |
return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) |
| 1634 |
} |
| 1635 |
var msglen int |
| 1636 |
for shift := uint(0); ; shift += 7 { |
| 1637 |
if shift >= 64 { |
| 1638 |
return ErrIntOverflowControl |
| 1639 |
} |
| 1640 |
if iNdEx >= l { |
| 1641 |
return io.ErrUnexpectedEOF |
| 1642 |
} |
| 1643 |
b := dAtA[iNdEx] |
| 1644 |
iNdEx++ |
| 1645 |
msglen |= (int(b) & 0x7F) << shift |
| 1646 |
if b < 0x80 { |
| 1647 |
break |
| 1648 |
} |
| 1649 |
} |
| 1650 |
if msglen < 0 { |
| 1651 |
return ErrInvalidLengthControl |
| 1652 |
} |
| 1653 |
postIndex := iNdEx + msglen |
| 1654 |
if postIndex > l { |
| 1655 |
return io.ErrUnexpectedEOF |
| 1656 |
} |
| 1657 |
if m.Items == nil { |
| 1658 |
m.Items = make(map[string]float64) |
| 1659 |
} |
| 1660 |
var mapkey string |
| 1661 |
var mapvalue float64 |
| 1662 |
for iNdEx < postIndex { |
| 1663 |
entryPreIndex := iNdEx |
| 1664 |
var wire uint64 |
| 1665 |
for shift := uint(0); ; shift += 7 { |
| 1666 |
if shift >= 64 { |
| 1667 |
return ErrIntOverflowControl |
| 1668 |
} |
| 1669 |
if iNdEx >= l { |
| 1670 |
return io.ErrUnexpectedEOF |
| 1671 |
} |
| 1672 |
b := dAtA[iNdEx] |
| 1673 |
iNdEx++ |
| 1674 |
wire |= (uint64(b) & 0x7F) << shift |
| 1675 |
if b < 0x80 { |
| 1676 |
break |
| 1677 |
} |
| 1678 |
} |
| 1679 |
fieldNum := int32(wire >> 3) |
| 1680 |
if fieldNum == 1 { |
| 1681 |
var stringLenmapkey uint64 |
| 1682 |
for shift := uint(0); ; shift += 7 { |
| 1683 |
if shift >= 64 { |
| 1684 |
return ErrIntOverflowControl |
| 1685 |
} |
| 1686 |
if iNdEx >= l { |
| 1687 |
return io.ErrUnexpectedEOF |
| 1688 |
} |
| 1689 |
b := dAtA[iNdEx] |
| 1690 |
iNdEx++ |
| 1691 |
stringLenmapkey |= (uint64(b) & 0x7F) << shift |
| 1692 |
if b < 0x80 { |
| 1693 |
break |
| 1694 |
} |
| 1695 |
} |
| 1696 |
intStringLenmapkey := int(stringLenmapkey) |
| 1697 |
if intStringLenmapkey < 0 { |
| 1698 |
return ErrInvalidLengthControl |
| 1699 |
} |
| 1700 |
postStringIndexmapkey := iNdEx + intStringLenmapkey |
| 1701 |
if postStringIndexmapkey > l { |
| 1702 |
return io.ErrUnexpectedEOF |
| 1703 |
} |
| 1704 |
mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) |
| 1705 |
iNdEx = postStringIndexmapkey |
| 1706 |
} else if fieldNum == 2 { |
| 1707 |
var mapvaluetemp uint64 |
| 1708 |
if (iNdEx + 8) > l { |
| 1709 |
return io.ErrUnexpectedEOF |
| 1710 |
} |
| 1711 |
mapvaluetemp = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) |
| 1712 |
iNdEx += 8 |
| 1713 |
mapvalue = math.Float64frombits(mapvaluetemp) |
| 1714 |
} else { |
| 1715 |
iNdEx = entryPreIndex |
| 1716 |
skippy, err := skipControl(dAtA[iNdEx:]) |
| 1717 |
if err != nil { |
| 1718 |
return err |
| 1719 |
} |
| 1720 |
if skippy < 0 { |
| 1721 |
return ErrInvalidLengthControl |
| 1722 |
} |
| 1723 |
if (iNdEx + skippy) > postIndex { |
| 1724 |
return io.ErrUnexpectedEOF |
| 1725 |
} |
| 1726 |
iNdEx += skippy |
| 1727 |
} |
| 1728 |
} |
| 1729 |
m.Items[mapkey] = mapvalue |
| 1730 |
iNdEx = postIndex |
| 1731 |
default: |
| 1732 |
iNdEx = preIndex |
| 1733 |
skippy, err := skipControl(dAtA[iNdEx:]) |
| 1734 |
if err != nil { |
| 1735 |
return err |
| 1736 |
} |
| 1737 |
if skippy < 0 { |
| 1738 |
return ErrInvalidLengthControl |
| 1739 |
} |
| 1740 |
if (iNdEx + skippy) > l { |
| 1741 |
return io.ErrUnexpectedEOF |
| 1742 |
} |
| 1743 |
iNdEx += skippy |
| 1744 |
} |
| 1745 |
} |
| 1746 |
|
| 1747 |
if iNdEx > l { |
| 1748 |
return io.ErrUnexpectedEOF |
| 1749 |
} |
| 1750 |
return nil |
| 1751 |
} |
| 1752 |
func (m *Unsubscribe) Unmarshal(dAtA []byte) error { |
| 1753 |
l := len(dAtA) |
| 1754 |
iNdEx := 0 |
| 1755 |
for iNdEx < l { |
| 1756 |
preIndex := iNdEx |
| 1757 |
var wire uint64 |
| 1758 |
for shift := uint(0); ; shift += 7 { |
| 1759 |
if shift >= 64 { |
| 1760 |
return ErrIntOverflowControl |
| 1761 |
} |
| 1762 |
if iNdEx >= l { |
| 1763 |
return io.ErrUnexpectedEOF |
| 1764 |
} |
| 1765 |
b := dAtA[iNdEx] |
| 1766 |
iNdEx++ |
| 1767 |
wire |= (uint64(b) & 0x7F) << shift |
| 1768 |
if b < 0x80 { |
| 1769 |
break |
| 1770 |
} |
| 1771 |
} |
| 1772 |
fieldNum := int32(wire >> 3) |
| 1773 |
wireType := int(wire & 0x7) |
| 1774 |
if wireType == 4 { |
| 1775 |
return fmt.Errorf("proto: Unsubscribe: wiretype end group for non-group") |
| 1776 |
} |
| 1777 |
if fieldNum <= 0 { |
| 1778 |
return fmt.Errorf("proto: Unsubscribe: illegal tag %d (wire type %d)", fieldNum, wire) |
| 1779 |
} |
| 1780 |
switch fieldNum { |
| 1781 |
case 1: |
| 1782 |
if wireType != 2 { |
| 1783 |
return fmt.Errorf("proto: wrong wireType = %d for field Channel", wireType) |
| 1784 |
} |
| 1785 |
var stringLen uint64 |
| 1786 |
for shift := uint(0); ; shift += 7 { |
| 1787 |
if shift >= 64 { |
| 1788 |
return ErrIntOverflowControl |
| 1789 |
} |
| 1790 |
if iNdEx >= l { |
| 1791 |
return io.ErrUnexpectedEOF |
| 1792 |
} |
| 1793 |
b := dAtA[iNdEx] |
| 1794 |
iNdEx++ |
| 1795 |
stringLen |= (uint64(b) & 0x7F) << shift |
| 1796 |
if b < 0x80 { |
| 1797 |
break |
| 1798 |
} |
| 1799 |
} |
| 1800 |
intStringLen := int(stringLen) |
| 1801 |
if intStringLen < 0 { |
| 1802 |
return ErrInvalidLengthControl |
| 1803 |
} |
| 1804 |
postIndex := iNdEx + intStringLen |
| 1805 |
if postIndex > l { |
| 1806 |
return io.ErrUnexpectedEOF |
| 1807 |
} |
| 1808 |
m.Channel = string(dAtA[iNdEx:postIndex]) |
| 1809 |
iNdEx = postIndex |
| 1810 |
case 2: |
| 1811 |
if wireType != 2 { |
| 1812 |
return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) |
| 1813 |
} |
| 1814 |
var stringLen uint64 |
| 1815 |
for shift := uint(0); ; shift += 7 { |
| 1816 |
if shift >= 64 { |
| 1817 |
return ErrIntOverflowControl |
| 1818 |
} |
| 1819 |
if iNdEx >= l { |
| 1820 |
return io.ErrUnexpectedEOF |
| 1821 |
} |
| 1822 |
b := dAtA[iNdEx] |
| 1823 |
iNdEx++ |
| 1824 |
stringLen |= (uint64(b) & 0x7F) << shift |
| 1825 |
if b < 0x80 { |
| 1826 |
break |
| 1827 |
} |
| 1828 |
} |
| 1829 |
intStringLen := int(stringLen) |
| 1830 |
if intStringLen < 0 { |
| 1831 |
return ErrInvalidLengthControl |
| 1832 |
} |
| 1833 |
postIndex := iNdEx + intStringLen |
| 1834 |
if postIndex > l { |
| 1835 |
return io.ErrUnexpectedEOF |
| 1836 |
} |
| 1837 |
m.User = string(dAtA[iNdEx:postIndex]) |
| 1838 |
iNdEx = postIndex |
| 1839 |
default: |
| 1840 |
iNdEx = preIndex |
| 1841 |
skippy, err := skipControl(dAtA[iNdEx:]) |
| 1842 |
if err != nil { |
| 1843 |
return err |
| 1844 |
} |
| 1845 |
if skippy < 0 { |
| 1846 |
return ErrInvalidLengthControl |
| 1847 |
} |
| 1848 |
if (iNdEx + skippy) > l { |
| 1849 |
return io.ErrUnexpectedEOF |
| 1850 |
} |
| 1851 |
iNdEx += skippy |
| 1852 |
} |
| 1853 |
} |
| 1854 |
|
| 1855 |
if iNdEx > l { |
| 1856 |
return io.ErrUnexpectedEOF |
| 1857 |
} |
| 1858 |
return nil |
| 1859 |
} |
| 1860 |
func (m *Disconnect) Unmarshal(dAtA []byte) error { |
| 1861 |
l := len(dAtA) |
| 1862 |
iNdEx := 0 |
| 1863 |
for iNdEx < l { |
| 1864 |
preIndex := iNdEx |
| 1865 |
var wire uint64 |
| 1866 |
for shift := uint(0); ; shift += 7 { |
| 1867 |
if shift >= 64 { |
| 1868 |
return ErrIntOverflowControl |
| 1869 |
} |
| 1870 |
if iNdEx >= l { |
| 1871 |
return io.ErrUnexpectedEOF |
| 1872 |
} |
| 1873 |
b := dAtA[iNdEx] |
| 1874 |
iNdEx++ |
| 1875 |
wire |= (uint64(b) & 0x7F) << shift |
| 1876 |
if b < 0x80 { |
| 1877 |
break |
| 1878 |
} |
| 1879 |
} |
| 1880 |
fieldNum := int32(wire >> 3) |
| 1881 |
wireType := int(wire & 0x7) |
| 1882 |
if wireType == 4 { |
| 1883 |
return fmt.Errorf("proto: Disconnect: wiretype end group for non-group") |
| 1884 |
} |
| 1885 |
if fieldNum <= 0 { |
| 1886 |
return fmt.Errorf("proto: Disconnect: illegal tag %d (wire type %d)", fieldNum, wire) |
| 1887 |
} |
| 1888 |
switch fieldNum { |
| 1889 |
case 1: |
| 1890 |
if wireType != 2 { |
| 1891 |
return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) |
| 1892 |
} |
| 1893 |
var stringLen uint64 |
| 1894 |
for shift := uint(0); ; shift += 7 { |
| 1895 |
if shift >= 64 { |
| 1896 |
return ErrIntOverflowControl |
| 1897 |
} |
| 1898 |
if iNdEx >= l { |
| 1899 |
return io.ErrUnexpectedEOF |
| 1900 |
} |
| 1901 |
b := dAtA[iNdEx] |
| 1902 |
iNdEx++ |
| 1903 |
stringLen |= (uint64(b) & 0x7F) << shift |
| 1904 |
if b < 0x80 { |
| 1905 |
break |
| 1906 |
} |
| 1907 |
} |
| 1908 |
intStringLen := int(stringLen) |
| 1909 |
if intStringLen < 0 { |
| 1910 |
return ErrInvalidLengthControl |
| 1911 |
} |
| 1912 |
postIndex := iNdEx + intStringLen |
| 1913 |
if postIndex > l { |
| 1914 |
return io.ErrUnexpectedEOF |
| 1915 |
} |
| 1916 |
m.User = string(dAtA[iNdEx:postIndex]) |
| 1917 |
iNdEx = postIndex |
| 1918 |
case 2: |
| 1919 |
if wireType != 2 { |
| 1920 |
return fmt.Errorf("proto: wrong wireType = %d for field Whitelist", wireType) |
| 1921 |
} |
| 1922 |
var stringLen uint64 |
| 1923 |
for shift := uint(0); ; shift += 7 { |
| 1924 |
if shift >= 64 { |
| 1925 |
return ErrIntOverflowControl |
| 1926 |
} |
| 1927 |
if iNdEx >= l { |
| 1928 |
return io.ErrUnexpectedEOF |
| 1929 |
} |
| 1930 |
b := dAtA[iNdEx] |
| 1931 |
iNdEx++ |
| 1932 |
stringLen |= (uint64(b) & 0x7F) << shift |
| 1933 |
if b < 0x80 { |
| 1934 |
break |
| 1935 |
} |
| 1936 |
} |
| 1937 |
intStringLen := int(stringLen) |
| 1938 |
if intStringLen < 0 { |
| 1939 |
return ErrInvalidLengthControl |
| 1940 |
} |
| 1941 |
postIndex := iNdEx + intStringLen |
| 1942 |
if postIndex > l { |
| 1943 |
return io.ErrUnexpectedEOF |
| 1944 |
} |
| 1945 |
m.Whitelist = append(m.Whitelist, string(dAtA[iNdEx:postIndex])) |
| 1946 |
iNdEx = postIndex |
| 1947 |
case 3: |
| 1948 |
if wireType != 0 { |
| 1949 |
return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) |
| 1950 |
} |
| 1951 |
m.Code = 0 |
| 1952 |
for shift := uint(0); ; shift += 7 { |
| 1953 |
if shift >= 64 { |
| 1954 |
return ErrIntOverflowControl |
| 1955 |
} |
| 1956 |
if iNdEx >= l { |
| 1957 |
return io.ErrUnexpectedEOF |
| 1958 |
} |
| 1959 |
b := dAtA[iNdEx] |
| 1960 |
iNdEx++ |
| 1961 |
m.Code |= (uint32(b) & 0x7F) << shift |
| 1962 |
if b < 0x80 { |
| 1963 |
break |
| 1964 |
} |
| 1965 |
} |
| 1966 |
case 4: |
| 1967 |
if wireType != 2 { |
| 1968 |
return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) |
| 1969 |
} |
| 1970 |
var stringLen uint64 |
| 1971 |
for shift := uint(0); ; shift += 7 { |
| 1972 |
if shift >= 64 { |
| 1973 |
return ErrIntOverflowControl |
| 1974 |
} |
| 1975 |
if iNdEx >= l { |
| 1976 |
return io.ErrUnexpectedEOF |
| 1977 |
} |
| 1978 |
b := dAtA[iNdEx] |
| 1979 |
iNdEx++ |
| 1980 |
stringLen |= (uint64(b) & 0x7F) << shift |
| 1981 |
if b < 0x80 { |
| 1982 |
break |
| 1983 |
} |
| 1984 |
} |
| 1985 |
intStringLen := int(stringLen) |
| 1986 |
if intStringLen < 0 { |
| 1987 |
return ErrInvalidLengthControl |
| 1988 |
} |
| 1989 |
postIndex := iNdEx + intStringLen |
| 1990 |
if postIndex > l { |
| 1991 |
return io.ErrUnexpectedEOF |
| 1992 |
} |
| 1993 |
m.Reason = string(dAtA[iNdEx:postIndex]) |
| 1994 |
iNdEx = postIndex |
| 1995 |
case 5: |
| 1996 |
if wireType != 0 { |
| 1997 |
return fmt.Errorf("proto: wrong wireType = %d for field Reconnect", wireType) |
| 1998 |
} |
| 1999 |
var v int |
| 2000 |
for shift := uint(0); ; shift += 7 { |
| 2001 |
if shift >= 64 { |
| 2002 |
return ErrIntOverflowControl |
| 2003 |
} |
| 2004 |
if iNdEx >= l { |
| 2005 |
return io.ErrUnexpectedEOF |
| 2006 |
} |
| 2007 |
b := dAtA[iNdEx] |
| 2008 |
iNdEx++ |
| 2009 |
v |= (int(b) & 0x7F) << shift |
| 2010 |
if b < 0x80 { |
| 2011 |
break |
| 2012 |
} |
| 2013 |
} |
| 2014 |
m.Reconnect = bool(v != 0) |
| 2015 |
default: |
| 2016 |
iNdEx = preIndex |
| 2017 |
skippy, err := skipControl(dAtA[iNdEx:]) |
| 2018 |
if err != nil { |
| 2019 |
return err |
| 2020 |
} |
| 2021 |
if skippy < 0 { |
| 2022 |
return ErrInvalidLengthControl |
| 2023 |
} |
| 2024 |
if (iNdEx + skippy) > l { |
| 2025 |
return io.ErrUnexpectedEOF |
| 2026 |
} |
| 2027 |
iNdEx += skippy |
| 2028 |
} |
| 2029 |
} |
| 2030 |
|
| 2031 |
if iNdEx > l { |
| 2032 |
return io.ErrUnexpectedEOF |
| 2033 |
} |
| 2034 |
return nil |
| 2035 |
} |
| 2036 |
func (m *SurveyRequest) Unmarshal(dAtA []byte) error { |
| 2037 |
l := len(dAtA) |
| 2038 |
iNdEx := 0 |
| 2039 |
for iNdEx < l { |
| 2040 |
preIndex := iNdEx |
| 2041 |
var wire uint64 |
| 2042 |
for shift := uint(0); ; shift += 7 { |
| 2043 |
if shift >= 64 { |
| 2044 |
return ErrIntOverflowControl |
| 2045 |
} |
| 2046 |
if iNdEx >= l { |
| 2047 |
return io.ErrUnexpectedEOF |
| 2048 |
} |
| 2049 |
b := dAtA[iNdEx] |
| 2050 |
iNdEx++ |
| 2051 |
wire |= (uint64(b) & 0x7F) << shift |
| 2052 |
if b < 0x80 { |
| 2053 |
break |
| 2054 |
} |
| 2055 |
} |
| 2056 |
fieldNum := int32(wire >> 3) |
| 2057 |
wireType := int(wire & 0x7) |
| 2058 |
if wireType == 4 { |
| 2059 |
return fmt.Errorf("proto: SurveyRequest: wiretype end group for non-group") |
| 2060 |
} |
| 2061 |
if fieldNum <= 0 { |
| 2062 |
return fmt.Errorf("proto: SurveyRequest: illegal tag %d (wire type %d)", fieldNum, wire) |
| 2063 |
} |
| 2064 |
switch fieldNum { |
| 2065 |
case 1: |
| 2066 |
if wireType != 0 { |
| 2067 |
return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) |
| 2068 |
} |
| 2069 |
m.ID = 0 |
| 2070 |
for shift := uint(0); ; shift += 7 { |
| 2071 |
if shift >= 64 { |
| 2072 |
return ErrIntOverflowControl |
| 2073 |
} |
| 2074 |
if iNdEx >= l { |
| 2075 |
return io.ErrUnexpectedEOF |
| 2076 |
} |
| 2077 |
b := dAtA[iNdEx] |
| 2078 |
iNdEx++ |
| 2079 |
m.ID |= (uint64(b) & 0x7F) << shift |
| 2080 |
if b < 0x80 { |
| 2081 |
break |
| 2082 |
} |
| 2083 |
} |
| 2084 |
case 2: |
| 2085 |
if wireType != 2 { |
| 2086 |
return fmt.Errorf("proto: wrong wireType = %d for field Op", wireType) |
| 2087 |
} |
| 2088 |
var stringLen uint64 |
| 2089 |
for shift := uint(0); ; shift += 7 { |
| 2090 |
if shift >= 64 { |
| 2091 |
return ErrIntOverflowControl |
| 2092 |
} |
| 2093 |
if iNdEx >= l { |
| 2094 |
return io.ErrUnexpectedEOF |
| 2095 |
} |
| 2096 |
b := dAtA[iNdEx] |
| 2097 |
iNdEx++ |
| 2098 |
stringLen |= (uint64(b) & 0x7F) << shift |
| 2099 |
if b < 0x80 { |
| 2100 |
break |
| 2101 |
} |
| 2102 |
} |
| 2103 |
intStringLen := int(stringLen) |
| 2104 |
if intStringLen < 0 { |
| 2105 |
return ErrInvalidLengthControl |
| 2106 |
} |
| 2107 |
postIndex := iNdEx + intStringLen |
| 2108 |
if postIndex > l { |
| 2109 |
return io.ErrUnexpectedEOF |
| 2110 |
} |
| 2111 |
m.Op = string(dAtA[iNdEx:postIndex]) |
| 2112 |
iNdEx = postIndex |
| 2113 |
case 3: |
| 2114 |
if wireType != 2 { |
| 2115 |
return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) |
| 2116 |
} |
| 2117 |
var byteLen int |
| 2118 |
for shift := uint(0); ; shift += 7 { |
| 2119 |
if shift >= 64 { |
| 2120 |
return ErrIntOverflowControl |
| 2121 |
} |
| 2122 |
if iNdEx >= l { |
| 2123 |
return io.ErrUnexpectedEOF |
| 2124 |
} |
| 2125 |
b := dAtA[iNdEx] |
| 2126 |
iNdEx++ |
| 2127 |
byteLen |= (int(b) & 0x7F) << shift |
| 2128 |
if b < 0x80 { |
| 2129 |
break |
| 2130 |
} |
| 2131 |
} |
| 2132 |
if byteLen < 0 { |
| 2133 |
return ErrInvalidLengthControl |
| 2134 |
} |
| 2135 |
postIndex := iNdEx + byteLen |
| 2136 |
if postIndex > l { |
| 2137 |
return io.ErrUnexpectedEOF |
| 2138 |
} |
| 2139 |
m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) |
| 2140 |
if m.Data == nil { |
| 2141 |
m.Data = []byte{} |
| 2142 |
} |
| 2143 |
iNdEx = postIndex |
| 2144 |
default: |
| 2145 |
iNdEx = preIndex |
| 2146 |
skippy, err := skipControl(dAtA[iNdEx:]) |
| 2147 |
if err != nil { |
| 2148 |
return err |
| 2149 |
} |
| 2150 |
if skippy < 0 { |
| 2151 |
return ErrInvalidLengthControl |
| 2152 |
} |
| 2153 |
if (iNdEx + skippy) > l { |
| 2154 |
return io.ErrUnexpectedEOF |
| 2155 |
} |
| 2156 |
iNdEx += skippy |
| 2157 |
} |
| 2158 |
} |
| 2159 |
|
| 2160 |
if iNdEx > l { |
| 2161 |
return io.ErrUnexpectedEOF |
| 2162 |
} |
| 2163 |
return nil |
| 2164 |
} |
| 2165 |
func (m *SurveyResponse) Unmarshal(dAtA []byte) error { |
| 2166 |
l := len(dAtA) |
| 2167 |
iNdEx := 0 |
| 2168 |
for iNdEx < l { |
| 2169 |
preIndex := iNdEx |
| 2170 |
var wire uint64 |
| 2171 |
for shift := uint(0); ; shift += 7 { |
| 2172 |
if shift >= 64 { |
| 2173 |
return ErrIntOverflowControl |
| 2174 |
} |
| 2175 |
if iNdEx >= l { |
| 2176 |
return io.ErrUnexpectedEOF |
| 2177 |
} |
| 2178 |
b := dAtA[iNdEx] |
| 2179 |
iNdEx++ |
| 2180 |
wire |= (uint64(b) & 0x7F) << shift |
| 2181 |
if b < 0x80 { |
| 2182 |
break |
| 2183 |
} |
| 2184 |
} |
| 2185 |
fieldNum := int32(wire >> 3) |
| 2186 |
wireType := int(wire & 0x7) |
| 2187 |
if wireType == 4 { |
| 2188 |
return fmt.Errorf("proto: SurveyResponse: wiretype end group for non-group") |
| 2189 |
} |
| 2190 |
if fieldNum <= 0 { |
| 2191 |
return fmt.Errorf("proto: SurveyResponse: illegal tag %d (wire type %d)", fieldNum, wire) |
| 2192 |
} |
| 2193 |
switch fieldNum { |
| 2194 |
case 1: |
| 2195 |
if wireType != 0 { |
| 2196 |
return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) |
| 2197 |
} |
| 2198 |
m.ID = 0 |
| 2199 |
for shift := uint(0); ; shift += 7 { |
| 2200 |
if shift >= 64 { |
| 2201 |
return ErrIntOverflowControl |
| 2202 |
} |
| 2203 |
if iNdEx >= l { |
| 2204 |
return io.ErrUnexpectedEOF |
| 2205 |
} |
| 2206 |
b := dAtA[iNdEx] |
| 2207 |
iNdEx++ |
| 2208 |
m.ID |= (uint64(b) & 0x7F) << shift |
| 2209 |
if b < 0x80 { |
| 2210 |
break |
| 2211 |
} |
| 2212 |
} |
| 2213 |
case 3: |
| 2214 |
if wireType != 0 { |
| 2215 |
return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) |
| 2216 |
} |
| 2217 |
m.Code = 0 |
| 2218 |
for shift := uint(0); ; shift += 7 { |
| 2219 |
if shift >= 64 { |
| 2220 |
return ErrIntOverflowControl |
| 2221 |
} |
| 2222 |
if iNdEx >= l { |
| 2223 |
return io.ErrUnexpectedEOF |
| 2224 |
} |
| 2225 |
b := dAtA[iNdEx] |
| 2226 |
iNdEx++ |
| 2227 |
m.Code |= (uint32(b) & 0x7F) << shift |
| 2228 |
if b < 0x80 { |
| 2229 |
break |
| 2230 |
} |
| 2231 |
} |
| 2232 |
case 4: |
| 2233 |
if wireType != 2 { |
| 2234 |
return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) |
| 2235 |
} |
| 2236 |
var byteLen int |
| 2237 |
for shift := uint(0); ; shift += 7 { |
| 2238 |
if shift >= 64 { |
| 2239 |
return ErrIntOverflowControl |
| 2240 |
} |
| 2241 |
if iNdEx >= l { |
| 2242 |
return io.ErrUnexpectedEOF |
| 2243 |
} |
| 2244 |
b := dAtA[iNdEx] |
| 2245 |
iNdEx++ |
| 2246 |
byteLen |= (int(b) & 0x7F) << shift |
| 2247 |
if b < 0x80 { |
| 2248 |
break |
| 2249 |
} |
| 2250 |
} |
| 2251 |
if byteLen < 0 { |
| 2252 |
return ErrInvalidLengthControl |
| 2253 |
} |
| 2254 |
postIndex := iNdEx + byteLen |
| 2255 |
if postIndex > l { |
| 2256 |
return io.ErrUnexpectedEOF |
| 2257 |
} |
| 2258 |
m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) |
| 2259 |
if m.Data == nil { |
| 2260 |
m.Data = []byte{} |
| 2261 |
} |
| 2262 |
iNdEx = postIndex |
| 2263 |
default: |
| 2264 |
iNdEx = preIndex |
| 2265 |
skippy, err := skipControl(dAtA[iNdEx:]) |
| 2266 |
if err != nil { |
| 2267 |
return err |
| 2268 |
} |
| 2269 |
if skippy < 0 { |
| 2270 |
return ErrInvalidLengthControl |
| 2271 |
} |
| 2272 |
if (iNdEx + skippy) > l { |
| 2273 |
return io.ErrUnexpectedEOF |
| 2274 |
} |
| 2275 |
iNdEx += skippy |
| 2276 |
} |
| 2277 |
} |
| 2278 |
|
| 2279 |
if iNdEx > l { |
| 2280 |
return io.ErrUnexpectedEOF |
| 2281 |
} |
| 2282 |
return nil |
| 2283 |
} |
| 2284 |
func skipControl(dAtA []byte) (n int, err error) { |
| 2285 |
l := len(dAtA) |
| 2286 |
iNdEx := 0 |
| 2287 |
for iNdEx < l { |
| 2288 |
var wire uint64 |
| 2289 |
for shift := uint(0); ; shift += 7 { |
| 2290 |
if shift >= 64 { |
| 2291 |
return 0, ErrIntOverflowControl |
| 2292 |
} |
| 2293 |
if iNdEx >= l { |
| 2294 |
return 0, io.ErrUnexpectedEOF |
| 2295 |
} |
| 2296 |
b := dAtA[iNdEx] |
| 2297 |
iNdEx++ |
| 2298 |
wire |= (uint64(b) & 0x7F) << shift |
| 2299 |
if b < 0x80 { |
| 2300 |
break |
| 2301 |
} |
| 2302 |
} |
| 2303 |
wireType := int(wire & 0x7) |
| 2304 |
switch wireType { |
| 2305 |
case 0: |
| 2306 |
for shift := uint(0); ; shift += 7 { |
| 2307 |
if shift >= 64 { |
| 2308 |
return 0, ErrIntOverflowControl |
| 2309 |
} |
| 2310 |
if iNdEx >= l { |
| 2311 |
return 0, io.ErrUnexpectedEOF |
| 2312 |
} |
| 2313 |
iNdEx++ |
| 2314 |
if dAtA[iNdEx-1] < 0x80 { |
| 2315 |
break |
| 2316 |
} |
| 2317 |
} |
| 2318 |
return iNdEx, nil |
| 2319 |
case 1: |
| 2320 |
iNdEx += 8 |
| 2321 |
return iNdEx, nil |
| 2322 |
case 2: |
| 2323 |
var length int |
| 2324 |
for shift := uint(0); ; shift += 7 { |
| 2325 |
if shift >= 64 { |
| 2326 |
return 0, ErrIntOverflowControl |
| 2327 |
} |
| 2328 |
if iNdEx >= l { |
| 2329 |
return 0, io.ErrUnexpectedEOF |
| 2330 |
} |
| 2331 |
b := dAtA[iNdEx] |
| 2332 |
iNdEx++ |
| 2333 |
length |= (int(b) & 0x7F) << shift |
| 2334 |
if b < 0x80 { |
| 2335 |
break |
| 2336 |
} |
| 2337 |
} |
| 2338 |
iNdEx += length |
| 2339 |
if length < 0 { |
| 2340 |
return 0, ErrInvalidLengthControl |
| 2341 |
} |
| 2342 |
return iNdEx, nil |
| 2343 |
case 3: |
| 2344 |
for { |
| 2345 |
var innerWire uint64 |
| 2346 |
var start int = iNdEx |
| 2347 |
for shift := uint(0); ; shift += 7 { |
| 2348 |
if shift >= 64 { |
| 2349 |
return 0, ErrIntOverflowControl |
| 2350 |
} |
| 2351 |
if iNdEx >= l { |
| 2352 |
return 0, io.ErrUnexpectedEOF |
| 2353 |
} |
| 2354 |
b := dAtA[iNdEx] |
| 2355 |
iNdEx++ |
| 2356 |
innerWire |= (uint64(b) & 0x7F) << shift |
| 2357 |
if b < 0x80 { |
| 2358 |
break |
| 2359 |
} |
| 2360 |
} |
| 2361 |
innerWireType := int(innerWire & 0x7) |
| 2362 |
if innerWireType == 4 { |
| 2363 |
break |
| 2364 |
} |
| 2365 |
next, err := skipControl(dAtA[start:]) |
| 2366 |
if err != nil { |
| 2367 |
return 0, err |
| 2368 |
} |
| 2369 |
iNdEx = start + next |
| 2370 |
} |
| 2371 |
return iNdEx, nil |
| 2372 |
case 4: |
| 2373 |
return iNdEx, nil |
| 2374 |
case 5: |
| 2375 |
iNdEx += 4 |
| 2376 |
return iNdEx, nil |
| 2377 |
default: |
| 2378 |
return 0, fmt.Errorf("proto: illegal wireType %d", wireType) |
| 2379 |
} |
| 2380 |
} |
| 2381 |
panic("unreachable") |
| 2382 |
} |
| 2383 |
|
| 2384 |
var ( |
| 2385 |
ErrInvalidLengthControl = fmt.Errorf("proto: negative length found during unmarshaling") |
| 2386 |
ErrIntOverflowControl = fmt.Errorf("proto: integer overflow") |
| 2387 |
) |
| 2388 |
|
| 2389 |
func init() { proto.RegisterFile("control.proto", fileDescriptorControl) } |
| 2390 |
|
| 2391 |
var fileDescriptorControl = []byte{ |
| 2392 |
// 855 bytes of a gzipped FileDescriptorProto |
| 2393 |
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0x3f, 0x8f, 0xe3, 0x44, |
| 2394 |
0x14, 0xdf, 0x71, 0xb2, 0xf9, 0xf3, 0xb2, 0xc9, 0x45, 0xa3, 0xdb, 0xc3, 0x98, 0x25, 0xb6, 0x22, |
| 2395 |
0x90, 0xa2, 0x45, 0x97, 0x85, 0xbd, 0xe6, 0x8e, 0x82, 0xc2, 0x49, 0x24, 0xb6, 0x20, 0x0b, 0xe3, |
| 2396 |
0x0d, 0x88, 0xea, 0xe4, 0xd8, 0xc3, 0xc6, 0x10, 0xcf, 0x18, 0xff, 0xd9, 0xd5, 0x7e, 0x03, 0x94, |
| 2397 |
0xea, 0x1a, 0xca, 0x54, 0x34, 0x34, 0xf4, 0x7c, 0x02, 0x74, 0x25, 0x35, 0x85, 0x81, 0xd0, 0xf9, |
| 2398 |
0x13, 0x50, 0xa2, 0x19, 0x3b, 0x71, 0x56, 0x77, 0x02, 0x9a, 0x99, 0xf7, 0x7e, 0xef, 0x37, 0xf3, |
| 2399 |
0x9b, 0x79, 0xef, 0xcd, 0x40, 0xdb, 0xe1, 0x2c, 0x0e, 0xf9, 0x72, 0x18, 0x84, 0x3c, 0xe6, 0xb8, |
| 2400 |
0x59, 0xb8, 0xc1, 0x5c, 0x7b, 0x7c, 0xed, 0xc5, 0x8b, 0x64, 0x3e, 0x74, 0xb8, 0x7f, 0x76, 0xcd, |
| 2401 |
0xaf, 0xf9, 0x99, 0x64, 0xcc, 0x93, 0xaf, 0xa4, 0x27, 0x1d, 0x69, 0xe5, 0x2b, 0xfb, 0xdf, 0x23, |
| 2402 |
0xa8, 0x8f, 0xb8, 0xef, 0xdb, 0xcc, 0xc5, 0x06, 0x54, 0x12, 0xcf, 0x55, 0x91, 0x81, 0x06, 0x4d, |
| 2403 |
0xb3, 0xb3, 0x49, 0xf5, 0xca, 0xec, 0x62, 0x9c, 0xa5, 0xba, 0x40, 0x89, 0x18, 0xf0, 0x33, 0xa8, |
| 2404 |
0xf9, 0x34, 0x5e, 0x70, 0x57, 0x55, 0x0c, 0x34, 0xe8, 0x9c, 0x1f, 0x0f, 0x77, 0xc2, 0xc3, 0x4f, |
| 2405 |
0x64, 0xe0, 0xea, 0x2e, 0xa0, 0x26, 0x64, 0xa9, 0x5e, 0x10, 0x49, 0x31, 0xe3, 0xc7, 0x50, 0x0b, |
| 2406 |
0xec, 0xd0, 0xf6, 0x23, 0xb5, 0x62, 0xa0, 0xc1, 0x91, 0x79, 0xfc, 0x32, 0xd5, 0x0f, 0x7e, 0x4b, |
| 2407 |
0xf5, 0x0a, 0xb1, 0x6f, 0x05, 0x3d, 0x0f, 0x92, 0x62, 0xee, 0xff, 0xae, 0x40, 0x75, 0xca, 0x5d, |
| 2408 |
0xfa, 0x3f, 0x0e, 0x75, 0x02, 0x55, 0x66, 0xfb, 0x54, 0x1e, 0xa9, 0x69, 0x36, 0xb2, 0x54, 0x97, |
| 2409 |
0x3e, 0x91, 0x23, 0x7e, 0x17, 0xea, 0x37, 0x34, 0x8c, 0x3c, 0xce, 0xa4, 0x70, 0xd3, 0x6c, 0x65, |
| 2410 |
0xa9, 0xbe, 0x85, 0xc8, 0xd6, 0xc0, 0xef, 0x43, 0x8b, 0x25, 0xfe, 0x73, 0x67, 0xe9, 0x51, 0x16, |
| 2411 |
0x47, 0x6a, 0xd5, 0x40, 0x83, 0xb6, 0xf9, 0x20, 0x4b, 0xf5, 0x7d, 0x98, 0x00, 0x4b, 0xfc, 0x51, |
| 2412 |
0x6e, 0xe3, 0x53, 0x68, 0x8a, 0x50, 0x12, 0xd1, 0x30, 0x52, 0x0f, 0x25, 0xbf, 0x9d, 0xa5, 0x7a, |
| 2413 |
0x09, 0x92, 0x06, 0x4b, 0xfc, 0x99, 0xb0, 0xf0, 0x13, 0x38, 0x92, 0xdb, 0x2c, 0x6c, 0xc6, 0xe8, |
| 2414 |
0x32, 0x52, 0x6b, 0x92, 0xde, 0xcd, 0x52, 0xfd, 0x1e, 0x4e, 0x84, 0xd8, 0xa8, 0x70, 0x70, 0x1f, |
| 2415 |
0x6a, 0x49, 0x10, 0x7b, 0x3e, 0x55, 0xeb, 0x92, 0x2e, 0xb3, 0x9a, 0x23, 0xa4, 0x98, 0xf1, 0x33, |
| 2416 |
0xa8, 0xfb, 0x34, 0x0e, 0x3d, 0x27, 0x52, 0x1b, 0x06, 0x1a, 0xb4, 0xce, 0xf1, 0xfd, 0x8a, 0x88, |
| 2417 |
0x48, 0x7e, 0xe3, 0x82, 0x46, 0xb6, 0x46, 0xff, 0x27, 0x04, 0xf5, 0x82, 0x81, 0x07, 0xd0, 0xf0, |
| 2418 |
0x58, 0x4c, 0xc3, 0x1b, 0x7b, 0x29, 0x33, 0x8d, 0xcc, 0xa3, 0x2c, 0xd5, 0x77, 0x18, 0xd9, 0x59, |
| 2419 |
0xf8, 0x23, 0x38, 0xf4, 0x62, 0xea, 0x47, 0xaa, 0x62, 0x54, 0x06, 0xad, 0xf3, 0xb7, 0x5f, 0x95, |
| 2420 |
0x1b, 0x5e, 0x88, 0xf8, 0x84, 0xc5, 0xe1, 0x9d, 0xd9, 0xcc, 0x52, 0x3d, 0xe7, 0x93, 0x7c, 0xd2, |
| 2421 |
0x9e, 0x02, 0x94, 0x71, 0xdc, 0x85, 0xca, 0x37, 0xf4, 0x2e, 0x2f, 0x2e, 0x11, 0x26, 0x7e, 0x08, |
| 2422 |
0x87, 0x37, 0xf6, 0x32, 0xc9, 0xab, 0x89, 0x48, 0xee, 0x7c, 0xa8, 0x3c, 0x45, 0x7d, 0x02, 0xad, |
| 2423 |
0x19, 0x8b, 0x92, 0x79, 0xe4, 0x84, 0xde, 0x5c, 0xd6, 0xb5, 0x48, 0x5b, 0xd1, 0x1b, 0xf2, 0x96, |
| 2424 |
0x05, 0x44, 0xb6, 0x86, 0x68, 0x0e, 0x51, 0x8c, 0xfd, 0xe6, 0x10, 0x3e, 0x91, 0x63, 0xff, 0x17, |
| 2425 |
0x04, 0x30, 0xf6, 0x22, 0x87, 0x33, 0x46, 0x9d, 0x78, 0x47, 0x46, 0xaf, 0x23, 0xe3, 0xf7, 0xa0, |
| 2426 |
0x79, 0xbb, 0xf0, 0x62, 0xba, 0xf4, 0xa2, 0x58, 0x5e, 0xbf, 0x99, 0x17, 0x7c, 0x07, 0x92, 0xd2, |
| 2427 |
0x14, 0x5b, 0x39, 0xdc, 0xa5, 0xb2, 0xe7, 0xda, 0xf9, 0x56, 0xc2, 0x27, 0x72, 0x14, 0xa5, 0x0d, |
| 2428 |
0xa9, 0x1d, 0x71, 0x26, 0x1b, 0xad, 0x99, 0x97, 0x36, 0x47, 0x48, 0x31, 0x0b, 0xb9, 0x90, 0x16, |
| 2429 |
0x27, 0x93, 0xfd, 0xd5, 0xc8, 0xe5, 0x76, 0x20, 0x29, 0xcd, 0xbe, 0x03, 0x6d, 0x2b, 0x09, 0x6f, |
| 2430 |
0xe8, 0x1d, 0xa1, 0xdf, 0x26, 0x54, 0xea, 0x2b, 0xc5, 0xab, 0xa9, 0x9a, 0x47, 0x9b, 0x54, 0x57, |
| 2431 |
0xe4, 0xa3, 0x51, 0x3c, 0x97, 0x28, 0x9e, 0x8b, 0x1f, 0x81, 0xc2, 0x83, 0x22, 0x27, 0x35, 0x81, |
| 2432 |
0xf3, 0x80, 0x28, 0x3c, 0x10, 0xa7, 0x76, 0xed, 0xd8, 0x2e, 0x9e, 0xa8, 0x3c, 0xb5, 0xf0, 0x89, |
| 2433 |
0x1c, 0xfb, 0x5f, 0x43, 0x67, 0x2b, 0x12, 0x05, 0x9c, 0x45, 0xf4, 0x3f, 0x54, 0xfe, 0x3d, 0x07, |
| 2434 |
0x5b, 0xad, 0xea, 0xeb, 0xb4, 0x4e, 0x5f, 0x28, 0x00, 0xe5, 0x8f, 0x22, 0xc8, 0xd3, 0xcb, 0xf1, |
| 2435 |
0xa4, 0x7b, 0xa0, 0xe1, 0xd5, 0xda, 0xe8, 0x94, 0x11, 0xf9, 0x47, 0x9c, 0x42, 0x6b, 0x36, 0xb5, |
| 2436 |
0x66, 0xa6, 0x35, 0x22, 0x17, 0xe6, 0xa4, 0x8b, 0xb4, 0x37, 0x57, 0x6b, 0xe3, 0xb8, 0x24, 0xed, |
| 2437 |
0xf7, 0xcd, 0x00, 0x60, 0x7c, 0x61, 0x8d, 0x2e, 0xa7, 0xd3, 0xc9, 0xe8, 0xaa, 0xab, 0x68, 0xea, |
| 2438 |
0x6a, 0x6d, 0x3c, 0x2c, 0xa9, 0x7b, 0xdd, 0xf0, 0x0e, 0x34, 0xac, 0x8f, 0x67, 0x57, 0xe3, 0xcb, |
| 2439 |
0x2f, 0xa6, 0xdd, 0x8a, 0xf6, 0x68, 0xb5, 0x36, 0x70, 0xc9, 0xb3, 0x16, 0x49, 0xec, 0xf2, 0x5b, |
| 2440 |
0x86, 0xcf, 0xa0, 0x63, 0xcd, 0xc8, 0xe7, 0x93, 0x2f, 0x9f, 0x93, 0xc9, 0x67, 0xb3, 0x89, 0x75, |
| 2441 |
0xd5, 0xad, 0x6a, 0x6f, 0xad, 0xd6, 0xc6, 0x1b, 0x7b, 0xdc, 0x7b, 0x95, 0xf9, 0x00, 0x1e, 0xec, |
| 2442 |
0x16, 0x58, 0x9f, 0x5e, 0x4e, 0xad, 0x49, 0xf7, 0x50, 0x3b, 0x59, 0xad, 0x0d, 0xf5, 0xd5, 0x15, |
| 2443 |
0x79, 0x9a, 0xb5, 0xea, 0x77, 0x3f, 0xf4, 0x0e, 0xcc, 0x93, 0xbf, 0xff, 0xec, 0xa1, 0x1f, 0x37, |
| 2444 |
0x3d, 0xf4, 0xf3, 0xa6, 0x87, 0x5e, 0x6e, 0x7a, 0xe8, 0xd7, 0x4d, 0x0f, 0xfd, 0xb1, 0xe9, 0xa1, |
| 2445 |
0x17, 0x7f, 0xf5, 0x0e, 0xe6, 0x35, 0xf9, 0x9f, 0x3f, 0xf9, 0x27, 0x00, 0x00, 0xff, 0xff, 0xd0, |
| 2446 |
0x87, 0xd1, 0x2b, 0x1a, 0x06, 0x00, 0x00, |
| 2447 |
} |