github.com/GuanceCloud/cliutils@v1.1.21/point/gogopb/point.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: point.proto 3 4 package gogopb 5 6 import ( 7 bytes "bytes" 8 encoding_binary "encoding/binary" 9 fmt "fmt" 10 proto "github.com/gogo/protobuf/proto" 11 github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" 12 types "github.com/gogo/protobuf/types" 13 io "io" 14 math "math" 15 math_bits "math/bits" 16 reflect "reflect" 17 strconv "strconv" 18 strings "strings" 19 ) 20 21 // Reference imports to suppress errors if they are not otherwise used. 22 var _ = proto.Marshal 23 var _ = fmt.Errorf 24 var _ = math.Inf 25 26 // This is a compile-time assertion to ensure that this generated file 27 // is compatible with the proto package it is being compiled against. 28 // A compilation error at this line likely means your copy of the 29 // proto package needs to be updated. 30 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 31 32 type KeyType int32 33 34 const ( 35 X KeyType = 0 36 I KeyType = 1 37 U KeyType = 2 38 F KeyType = 3 39 B KeyType = 4 40 D KeyType = 5 41 NIL KeyType = 6 42 S KeyType = 7 43 A KeyType = 8 44 ) 45 46 var KeyType_name = map[int32]string{ 47 0: "X", 48 1: "I", 49 2: "U", 50 3: "F", 51 4: "B", 52 5: "D", 53 6: "NIL", 54 7: "S", 55 8: "A", 56 } 57 58 var KeyType_value = map[string]int32{ 59 "X": 0, 60 "I": 1, 61 "U": 2, 62 "F": 3, 63 "B": 4, 64 "D": 5, 65 "NIL": 6, 66 "S": 7, 67 "A": 8, 68 } 69 70 func (KeyType) EnumDescriptor() ([]byte, []int) { 71 return fileDescriptor_dbb1a16d5866e018, []int{0} 72 } 73 74 type MetricType int32 75 76 const ( 77 UNSPECIFIED MetricType = 0 78 COUNT MetricType = 1 79 RATE MetricType = 2 80 GAUGE MetricType = 3 81 ) 82 83 var MetricType_name = map[int32]string{ 84 0: "UNSPECIFIED", 85 1: "COUNT", 86 2: "RATE", 87 3: "GAUGE", 88 } 89 90 var MetricType_value = map[string]int32{ 91 "UNSPECIFIED": 0, 92 "COUNT": 1, 93 "RATE": 2, 94 "GAUGE": 3, 95 } 96 97 func (MetricType) EnumDescriptor() ([]byte, []int) { 98 return fileDescriptor_dbb1a16d5866e018, []int{1} 99 } 100 101 // Debug used to attached some debug info for the point, these debug info 102 // will encoded into payload, storage can take optional handle on these debug 103 // info. 104 type Debug struct { 105 Info string `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` 106 } 107 108 func (m *Debug) Reset() { *m = Debug{} } 109 func (*Debug) ProtoMessage() {} 110 func (*Debug) Descriptor() ([]byte, []int) { 111 return fileDescriptor_dbb1a16d5866e018, []int{0} 112 } 113 func (m *Debug) XXX_Unmarshal(b []byte) error { 114 return m.Unmarshal(b) 115 } 116 func (m *Debug) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 117 if deterministic { 118 return xxx_messageInfo_Debug.Marshal(b, m, deterministic) 119 } else { 120 b = b[:cap(b)] 121 n, err := m.MarshalToSizedBuffer(b) 122 if err != nil { 123 return nil, err 124 } 125 return b[:n], nil 126 } 127 } 128 func (m *Debug) XXX_Merge(src proto.Message) { 129 xxx_messageInfo_Debug.Merge(m, src) 130 } 131 func (m *Debug) XXX_Size() int { 132 return m.Size() 133 } 134 func (m *Debug) XXX_DiscardUnknown() { 135 xxx_messageInfo_Debug.DiscardUnknown(m) 136 } 137 138 var xxx_messageInfo_Debug proto.InternalMessageInfo 139 140 func (m *Debug) GetInfo() string { 141 if m != nil { 142 return m.Info 143 } 144 return "" 145 } 146 147 // example of pb.Any 148 type AnyDemo struct { 149 Demo string `protobuf:"bytes,1,opt,name=demo,proto3" json:"demo,omitempty"` 150 } 151 152 func (m *AnyDemo) Reset() { *m = AnyDemo{} } 153 func (*AnyDemo) ProtoMessage() {} 154 func (*AnyDemo) Descriptor() ([]byte, []int) { 155 return fileDescriptor_dbb1a16d5866e018, []int{1} 156 } 157 func (m *AnyDemo) XXX_Unmarshal(b []byte) error { 158 return m.Unmarshal(b) 159 } 160 func (m *AnyDemo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 161 if deterministic { 162 return xxx_messageInfo_AnyDemo.Marshal(b, m, deterministic) 163 } else { 164 b = b[:cap(b)] 165 n, err := m.MarshalToSizedBuffer(b) 166 if err != nil { 167 return nil, err 168 } 169 return b[:n], nil 170 } 171 } 172 func (m *AnyDemo) XXX_Merge(src proto.Message) { 173 xxx_messageInfo_AnyDemo.Merge(m, src) 174 } 175 func (m *AnyDemo) XXX_Size() int { 176 return m.Size() 177 } 178 func (m *AnyDemo) XXX_DiscardUnknown() { 179 xxx_messageInfo_AnyDemo.DiscardUnknown(m) 180 } 181 182 var xxx_messageInfo_AnyDemo proto.InternalMessageInfo 183 184 func (m *AnyDemo) GetDemo() string { 185 if m != nil { 186 return m.Demo 187 } 188 return "" 189 } 190 191 type BasicTypes struct { 192 // Types that are valid to be assigned to X: 193 // *BasicTypes_I 194 // *BasicTypes_U 195 // *BasicTypes_F 196 // *BasicTypes_B 197 // *BasicTypes_D 198 // *BasicTypes_S 199 X isBasicTypes_X `protobuf_oneof:"x"` 200 } 201 202 func (m *BasicTypes) Reset() { *m = BasicTypes{} } 203 func (*BasicTypes) ProtoMessage() {} 204 func (*BasicTypes) Descriptor() ([]byte, []int) { 205 return fileDescriptor_dbb1a16d5866e018, []int{2} 206 } 207 func (m *BasicTypes) XXX_Unmarshal(b []byte) error { 208 return m.Unmarshal(b) 209 } 210 func (m *BasicTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 211 if deterministic { 212 return xxx_messageInfo_BasicTypes.Marshal(b, m, deterministic) 213 } else { 214 b = b[:cap(b)] 215 n, err := m.MarshalToSizedBuffer(b) 216 if err != nil { 217 return nil, err 218 } 219 return b[:n], nil 220 } 221 } 222 func (m *BasicTypes) XXX_Merge(src proto.Message) { 223 xxx_messageInfo_BasicTypes.Merge(m, src) 224 } 225 func (m *BasicTypes) XXX_Size() int { 226 return m.Size() 227 } 228 func (m *BasicTypes) XXX_DiscardUnknown() { 229 xxx_messageInfo_BasicTypes.DiscardUnknown(m) 230 } 231 232 var xxx_messageInfo_BasicTypes proto.InternalMessageInfo 233 234 type isBasicTypes_X interface { 235 isBasicTypes_X() 236 Equal(interface{}) bool 237 MarshalTo([]byte) (int, error) 238 Size() int 239 } 240 241 type BasicTypes_I struct { 242 I int64 `protobuf:"varint,1,opt,name=i,proto3,oneof" json:"i,omitempty"` 243 } 244 type BasicTypes_U struct { 245 U uint64 `protobuf:"varint,2,opt,name=u,proto3,oneof" json:"u,omitempty"` 246 } 247 type BasicTypes_F struct { 248 F float64 `protobuf:"fixed64,3,opt,name=f,proto3,oneof" json:"f,omitempty"` 249 } 250 type BasicTypes_B struct { 251 B bool `protobuf:"varint,4,opt,name=b,proto3,oneof" json:"b,omitempty"` 252 } 253 type BasicTypes_D struct { 254 D []byte `protobuf:"bytes,5,opt,name=d,proto3,oneof" json:"d,omitempty"` 255 } 256 type BasicTypes_S struct { 257 S string `protobuf:"bytes,6,opt,name=s,proto3,oneof" json:"s,omitempty"` 258 } 259 260 func (*BasicTypes_I) isBasicTypes_X() {} 261 func (*BasicTypes_U) isBasicTypes_X() {} 262 func (*BasicTypes_F) isBasicTypes_X() {} 263 func (*BasicTypes_B) isBasicTypes_X() {} 264 func (*BasicTypes_D) isBasicTypes_X() {} 265 func (*BasicTypes_S) isBasicTypes_X() {} 266 267 func (m *BasicTypes) GetX() isBasicTypes_X { 268 if m != nil { 269 return m.X 270 } 271 return nil 272 } 273 274 func (m *BasicTypes) GetI() int64 { 275 if x, ok := m.GetX().(*BasicTypes_I); ok { 276 return x.I 277 } 278 return 0 279 } 280 281 func (m *BasicTypes) GetU() uint64 { 282 if x, ok := m.GetX().(*BasicTypes_U); ok { 283 return x.U 284 } 285 return 0 286 } 287 288 func (m *BasicTypes) GetF() float64 { 289 if x, ok := m.GetX().(*BasicTypes_F); ok { 290 return x.F 291 } 292 return 0 293 } 294 295 func (m *BasicTypes) GetB() bool { 296 if x, ok := m.GetX().(*BasicTypes_B); ok { 297 return x.B 298 } 299 return false 300 } 301 302 func (m *BasicTypes) GetD() []byte { 303 if x, ok := m.GetX().(*BasicTypes_D); ok { 304 return x.D 305 } 306 return nil 307 } 308 309 func (m *BasicTypes) GetS() string { 310 if x, ok := m.GetX().(*BasicTypes_S); ok { 311 return x.S 312 } 313 return "" 314 } 315 316 // XXX_OneofWrappers is for the internal use of the proto package. 317 func (*BasicTypes) XXX_OneofWrappers() []interface{} { 318 return []interface{}{ 319 (*BasicTypes_I)(nil), 320 (*BasicTypes_U)(nil), 321 (*BasicTypes_F)(nil), 322 (*BasicTypes_B)(nil), 323 (*BasicTypes_D)(nil), 324 (*BasicTypes_S)(nil), 325 } 326 } 327 328 type Array struct { 329 Arr []*BasicTypes `protobuf:"bytes,1,rep,name=arr,proto3" json:"arr,omitempty"` 330 } 331 332 func (m *Array) Reset() { *m = Array{} } 333 func (*Array) ProtoMessage() {} 334 func (*Array) Descriptor() ([]byte, []int) { 335 return fileDescriptor_dbb1a16d5866e018, []int{3} 336 } 337 func (m *Array) XXX_Unmarshal(b []byte) error { 338 return m.Unmarshal(b) 339 } 340 func (m *Array) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 341 if deterministic { 342 return xxx_messageInfo_Array.Marshal(b, m, deterministic) 343 } else { 344 b = b[:cap(b)] 345 n, err := m.MarshalToSizedBuffer(b) 346 if err != nil { 347 return nil, err 348 } 349 return b[:n], nil 350 } 351 } 352 func (m *Array) XXX_Merge(src proto.Message) { 353 xxx_messageInfo_Array.Merge(m, src) 354 } 355 func (m *Array) XXX_Size() int { 356 return m.Size() 357 } 358 func (m *Array) XXX_DiscardUnknown() { 359 xxx_messageInfo_Array.DiscardUnknown(m) 360 } 361 362 var xxx_messageInfo_Array proto.InternalMessageInfo 363 364 func (m *Array) GetArr() []*BasicTypes { 365 if m != nil { 366 return m.Arr 367 } 368 return nil 369 } 370 371 type Map struct { 372 Map map[string]*BasicTypes `protobuf:"bytes,1,rep,name=map,proto3" json:"map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` 373 } 374 375 func (m *Map) Reset() { *m = Map{} } 376 func (*Map) ProtoMessage() {} 377 func (*Map) Descriptor() ([]byte, []int) { 378 return fileDescriptor_dbb1a16d5866e018, []int{4} 379 } 380 func (m *Map) XXX_Unmarshal(b []byte) error { 381 return m.Unmarshal(b) 382 } 383 func (m *Map) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 384 if deterministic { 385 return xxx_messageInfo_Map.Marshal(b, m, deterministic) 386 } else { 387 b = b[:cap(b)] 388 n, err := m.MarshalToSizedBuffer(b) 389 if err != nil { 390 return nil, err 391 } 392 return b[:n], nil 393 } 394 } 395 func (m *Map) XXX_Merge(src proto.Message) { 396 xxx_messageInfo_Map.Merge(m, src) 397 } 398 func (m *Map) XXX_Size() int { 399 return m.Size() 400 } 401 func (m *Map) XXX_DiscardUnknown() { 402 xxx_messageInfo_Map.DiscardUnknown(m) 403 } 404 405 var xxx_messageInfo_Map proto.InternalMessageInfo 406 407 func (m *Map) GetMap() map[string]*BasicTypes { 408 if m != nil { 409 return m.Map 410 } 411 return nil 412 } 413 414 type Field struct { 415 Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` 416 // See https://developers.google.com/protocol-buffers/docs/proto3#json 417 // 418 // Types that are valid to be assigned to Val: 419 // *Field_I 420 // *Field_U 421 // *Field_F 422 // *Field_B 423 // *Field_D 424 // *Field_S 425 // *Field_A 426 Val isField_Val `protobuf_oneof:"val"` 427 IsTag bool `protobuf:"varint,8,opt,name=is_tag,proto3" json:"is_tag,omitempty"` 428 Type MetricType `protobuf:"varint,9,opt,name=type,proto3,enum=gogopb.MetricType" json:"type,omitempty"` 429 // field unit name 430 Unit string `protobuf:"bytes,10,opt,name=unit,proto3" json:"unit,omitempty"` 431 } 432 433 func (m *Field) Reset() { *m = Field{} } 434 func (*Field) ProtoMessage() {} 435 func (*Field) Descriptor() ([]byte, []int) { 436 return fileDescriptor_dbb1a16d5866e018, []int{5} 437 } 438 func (m *Field) XXX_Unmarshal(b []byte) error { 439 return m.Unmarshal(b) 440 } 441 func (m *Field) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 442 if deterministic { 443 return xxx_messageInfo_Field.Marshal(b, m, deterministic) 444 } else { 445 b = b[:cap(b)] 446 n, err := m.MarshalToSizedBuffer(b) 447 if err != nil { 448 return nil, err 449 } 450 return b[:n], nil 451 } 452 } 453 func (m *Field) XXX_Merge(src proto.Message) { 454 xxx_messageInfo_Field.Merge(m, src) 455 } 456 func (m *Field) XXX_Size() int { 457 return m.Size() 458 } 459 func (m *Field) XXX_DiscardUnknown() { 460 xxx_messageInfo_Field.DiscardUnknown(m) 461 } 462 463 var xxx_messageInfo_Field proto.InternalMessageInfo 464 465 type isField_Val interface { 466 isField_Val() 467 Equal(interface{}) bool 468 MarshalTo([]byte) (int, error) 469 Size() int 470 } 471 472 type Field_I struct { 473 I int64 `protobuf:"varint,2,opt,name=i,proto3,oneof" json:"i,omitempty"` 474 } 475 type Field_U struct { 476 U uint64 `protobuf:"varint,3,opt,name=u,proto3,oneof" json:"u,omitempty"` 477 } 478 type Field_F struct { 479 F float64 `protobuf:"fixed64,4,opt,name=f,proto3,oneof" json:"f,omitempty"` 480 } 481 type Field_B struct { 482 B bool `protobuf:"varint,5,opt,name=b,proto3,oneof" json:"b,omitempty"` 483 } 484 type Field_D struct { 485 D []byte `protobuf:"bytes,6,opt,name=d,proto3,oneof" json:"d,omitempty"` 486 } 487 type Field_S struct { 488 S string `protobuf:"bytes,11,opt,name=s,proto3,oneof" json:"s,omitempty"` 489 } 490 type Field_A struct { 491 A *types.Any `protobuf:"bytes,7,opt,name=a,proto3,oneof" json:"a,omitempty"` 492 } 493 494 func (*Field_I) isField_Val() {} 495 func (*Field_U) isField_Val() {} 496 func (*Field_F) isField_Val() {} 497 func (*Field_B) isField_Val() {} 498 func (*Field_D) isField_Val() {} 499 func (*Field_S) isField_Val() {} 500 func (*Field_A) isField_Val() {} 501 502 func (m *Field) GetVal() isField_Val { 503 if m != nil { 504 return m.Val 505 } 506 return nil 507 } 508 509 func (m *Field) GetKey() string { 510 if m != nil { 511 return m.Key 512 } 513 return "" 514 } 515 516 func (m *Field) GetI() int64 { 517 if x, ok := m.GetVal().(*Field_I); ok { 518 return x.I 519 } 520 return 0 521 } 522 523 func (m *Field) GetU() uint64 { 524 if x, ok := m.GetVal().(*Field_U); ok { 525 return x.U 526 } 527 return 0 528 } 529 530 func (m *Field) GetF() float64 { 531 if x, ok := m.GetVal().(*Field_F); ok { 532 return x.F 533 } 534 return 0 535 } 536 537 func (m *Field) GetB() bool { 538 if x, ok := m.GetVal().(*Field_B); ok { 539 return x.B 540 } 541 return false 542 } 543 544 func (m *Field) GetD() []byte { 545 if x, ok := m.GetVal().(*Field_D); ok { 546 return x.D 547 } 548 return nil 549 } 550 551 func (m *Field) GetS() string { 552 if x, ok := m.GetVal().(*Field_S); ok { 553 return x.S 554 } 555 return "" 556 } 557 558 func (m *Field) GetA() *types.Any { 559 if x, ok := m.GetVal().(*Field_A); ok { 560 return x.A 561 } 562 return nil 563 } 564 565 func (m *Field) GetIsTag() bool { 566 if m != nil { 567 return m.IsTag 568 } 569 return false 570 } 571 572 func (m *Field) GetType() MetricType { 573 if m != nil { 574 return m.Type 575 } 576 return UNSPECIFIED 577 } 578 579 func (m *Field) GetUnit() string { 580 if m != nil { 581 return m.Unit 582 } 583 return "" 584 } 585 586 // XXX_OneofWrappers is for the internal use of the proto package. 587 func (*Field) XXX_OneofWrappers() []interface{} { 588 return []interface{}{ 589 (*Field_I)(nil), 590 (*Field_U)(nil), 591 (*Field_F)(nil), 592 (*Field_B)(nil), 593 (*Field_D)(nil), 594 (*Field_S)(nil), 595 (*Field_A)(nil), 596 } 597 } 598 599 // Warn used to attach some warning message during building the point. 600 type Warn struct { 601 Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` 602 Msg string `protobuf:"bytes,2,opt,name=msg,json=message,proto3" json:"msg,omitempty"` 603 } 604 605 func (m *Warn) Reset() { *m = Warn{} } 606 func (*Warn) ProtoMessage() {} 607 func (*Warn) Descriptor() ([]byte, []int) { 608 return fileDescriptor_dbb1a16d5866e018, []int{6} 609 } 610 func (m *Warn) XXX_Unmarshal(b []byte) error { 611 return m.Unmarshal(b) 612 } 613 func (m *Warn) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 614 if deterministic { 615 return xxx_messageInfo_Warn.Marshal(b, m, deterministic) 616 } else { 617 b = b[:cap(b)] 618 n, err := m.MarshalToSizedBuffer(b) 619 if err != nil { 620 return nil, err 621 } 622 return b[:n], nil 623 } 624 } 625 func (m *Warn) XXX_Merge(src proto.Message) { 626 xxx_messageInfo_Warn.Merge(m, src) 627 } 628 func (m *Warn) XXX_Size() int { 629 return m.Size() 630 } 631 func (m *Warn) XXX_DiscardUnknown() { 632 xxx_messageInfo_Warn.DiscardUnknown(m) 633 } 634 635 var xxx_messageInfo_Warn proto.InternalMessageInfo 636 637 func (m *Warn) GetType() string { 638 if m != nil { 639 return m.Type 640 } 641 return "" 642 } 643 644 func (m *Warn) GetMsg() string { 645 if m != nil { 646 return m.Msg 647 } 648 return "" 649 } 650 651 type PBPoint struct { 652 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` 653 Fields []*Field `protobuf:"bytes,2,rep,name=fields,proto3" json:"fields,omitempty"` 654 Time int64 `protobuf:"varint,3,opt,name=time,proto3" json:"time,omitempty"` 655 // Auxiliary fields for the point, they should not 656 // write to the final storage on production. 657 Warns []*Warn `protobuf:"bytes,4,rep,name=warns,proto3" json:"warns,omitempty"` 658 Debugs []*Debug `protobuf:"bytes,5,rep,name=debugs,proto3" json:"debugs,omitempty"` 659 } 660 661 func (m *PBPoint) Reset() { *m = PBPoint{} } 662 func (*PBPoint) ProtoMessage() {} 663 func (*PBPoint) Descriptor() ([]byte, []int) { 664 return fileDescriptor_dbb1a16d5866e018, []int{7} 665 } 666 func (m *PBPoint) XXX_Unmarshal(b []byte) error { 667 return m.Unmarshal(b) 668 } 669 func (m *PBPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 670 if deterministic { 671 return xxx_messageInfo_PBPoint.Marshal(b, m, deterministic) 672 } else { 673 b = b[:cap(b)] 674 n, err := m.MarshalToSizedBuffer(b) 675 if err != nil { 676 return nil, err 677 } 678 return b[:n], nil 679 } 680 } 681 func (m *PBPoint) XXX_Merge(src proto.Message) { 682 xxx_messageInfo_PBPoint.Merge(m, src) 683 } 684 func (m *PBPoint) XXX_Size() int { 685 return m.Size() 686 } 687 func (m *PBPoint) XXX_DiscardUnknown() { 688 xxx_messageInfo_PBPoint.DiscardUnknown(m) 689 } 690 691 var xxx_messageInfo_PBPoint proto.InternalMessageInfo 692 693 func (m *PBPoint) GetName() string { 694 if m != nil { 695 return m.Name 696 } 697 return "" 698 } 699 700 func (m *PBPoint) GetFields() []*Field { 701 if m != nil { 702 return m.Fields 703 } 704 return nil 705 } 706 707 func (m *PBPoint) GetTime() int64 { 708 if m != nil { 709 return m.Time 710 } 711 return 0 712 } 713 714 func (m *PBPoint) GetWarns() []*Warn { 715 if m != nil { 716 return m.Warns 717 } 718 return nil 719 } 720 721 func (m *PBPoint) GetDebugs() []*Debug { 722 if m != nil { 723 return m.Debugs 724 } 725 return nil 726 } 727 728 // batch of pbpoint. 729 type PBPoints struct { 730 Arr []*PBPoint `protobuf:"bytes,1,rep,name=arr,proto3" json:"arr,omitempty"` 731 } 732 733 func (m *PBPoints) Reset() { *m = PBPoints{} } 734 func (*PBPoints) ProtoMessage() {} 735 func (*PBPoints) Descriptor() ([]byte, []int) { 736 return fileDescriptor_dbb1a16d5866e018, []int{8} 737 } 738 func (m *PBPoints) XXX_Unmarshal(b []byte) error { 739 return m.Unmarshal(b) 740 } 741 func (m *PBPoints) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 742 if deterministic { 743 return xxx_messageInfo_PBPoints.Marshal(b, m, deterministic) 744 } else { 745 b = b[:cap(b)] 746 n, err := m.MarshalToSizedBuffer(b) 747 if err != nil { 748 return nil, err 749 } 750 return b[:n], nil 751 } 752 } 753 func (m *PBPoints) XXX_Merge(src proto.Message) { 754 xxx_messageInfo_PBPoints.Merge(m, src) 755 } 756 func (m *PBPoints) XXX_Size() int { 757 return m.Size() 758 } 759 func (m *PBPoints) XXX_DiscardUnknown() { 760 xxx_messageInfo_PBPoints.DiscardUnknown(m) 761 } 762 763 var xxx_messageInfo_PBPoints proto.InternalMessageInfo 764 765 func (m *PBPoints) GetArr() []*PBPoint { 766 if m != nil { 767 return m.Arr 768 } 769 return nil 770 } 771 772 func init() { 773 proto.RegisterEnum("gogopb.KeyType", KeyType_name, KeyType_value) 774 proto.RegisterEnum("gogopb.MetricType", MetricType_name, MetricType_value) 775 proto.RegisterType((*Debug)(nil), "gogopb.Debug") 776 proto.RegisterType((*AnyDemo)(nil), "gogopb.AnyDemo") 777 proto.RegisterType((*BasicTypes)(nil), "gogopb.BasicTypes") 778 proto.RegisterType((*Array)(nil), "gogopb.Array") 779 proto.RegisterType((*Map)(nil), "gogopb.Map") 780 proto.RegisterMapType((map[string]*BasicTypes)(nil), "gogopb.Map.MapEntry") 781 proto.RegisterType((*Field)(nil), "gogopb.Field") 782 proto.RegisterType((*Warn)(nil), "gogopb.Warn") 783 proto.RegisterType((*PBPoint)(nil), "gogopb.PBPoint") 784 proto.RegisterType((*PBPoints)(nil), "gogopb.PBPoints") 785 } 786 787 func init() { proto.RegisterFile("point.proto", fileDescriptor_dbb1a16d5866e018) } 788 789 var fileDescriptor_dbb1a16d5866e018 = []byte{ 790 // 683 bytes of a gzipped FileDescriptorProto 791 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x53, 0xcd, 0x6e, 0xd3, 0x40, 792 0x10, 0xf6, 0x66, 0xed, 0xfc, 0x4c, 0x4a, 0x6b, 0xad, 0x2a, 0xb4, 0x14, 0x61, 0x05, 0xab, 0x54, 793 0x56, 0xa5, 0xa6, 0x08, 0x2e, 0x08, 0xc4, 0x21, 0x69, 0xd2, 0x92, 0x42, 0x4b, 0xe4, 0x36, 0x02, 794 0x71, 0x41, 0x1b, 0xb2, 0xb1, 0x2c, 0x12, 0xdb, 0xd8, 0x49, 0xc1, 0x37, 0x1e, 0x81, 0x77, 0xe0, 795 0xc2, 0xa3, 0x70, 0xec, 0xb1, 0x47, 0x9a, 0x5e, 0x38, 0xf6, 0xcc, 0x09, 0xcd, 0xda, 0x69, 0x21, 796 0xea, 0xc1, 0x9a, 0xf9, 0x76, 0x7e, 0x76, 0xbe, 0x6f, 0xc7, 0x50, 0x8d, 0x42, 0x3f, 0x98, 0xd4, 797 0xa3, 0x38, 0x9c, 0x84, 0xac, 0xe8, 0x85, 0x5e, 0x18, 0xf5, 0xd7, 0xee, 0x78, 0x61, 0xe8, 0x8d, 798 0xe4, 0xb6, 0x3a, 0xed, 0x4f, 0x87, 0xdb, 0x22, 0x48, 0xb3, 0x14, 0xfb, 0x2e, 0x18, 0x2d, 0xd9, 799 0x9f, 0x7a, 0x8c, 0x81, 0xee, 0x07, 0xc3, 0x90, 0x93, 0x1a, 0x71, 0x2a, 0xae, 0xf2, 0xed, 0x7b, 800 0x50, 0x6a, 0x04, 0x69, 0x4b, 0x8e, 0x43, 0x0c, 0x0f, 0xe4, 0xf8, 0x2a, 0x8c, 0xbe, 0xfd, 0x09, 801 0xa0, 0x29, 0x12, 0xff, 0xc3, 0x71, 0x1a, 0xc9, 0x84, 0x2d, 0x03, 0xf1, 0x55, 0x98, 0xbe, 0xd0, 802 0x5c, 0xe2, 0x23, 0x9e, 0xf2, 0x42, 0x8d, 0x38, 0x3a, 0xe2, 0x29, 0xe2, 0x21, 0xa7, 0x35, 0xe2, 803 0x10, 0xc4, 0x43, 0xc4, 0x7d, 0xae, 0xd7, 0x88, 0x53, 0x46, 0xdc, 0x47, 0x3c, 0xe0, 0x46, 0x8d, 804 0x38, 0x4b, 0x88, 0x07, 0x88, 0x13, 0x5e, 0xc4, 0xeb, 0x10, 0x27, 0x4d, 0x0a, 0xe4, 0x8b, 0xbd, 805 0x05, 0x46, 0x23, 0x8e, 0x45, 0xca, 0xd6, 0x81, 0x8a, 0x38, 0xe6, 0xa4, 0x46, 0x9d, 0xea, 0x23, 806 0x56, 0xcf, 0x88, 0xd6, 0xaf, 0xc7, 0x71, 0x31, 0x6c, 0xa7, 0x40, 0x0f, 0x44, 0xc4, 0x36, 0x80, 807 0x8e, 0x45, 0x94, 0x27, 0xaf, 0xce, 0x93, 0x0f, 0x44, 0x84, 0x5f, 0x3b, 0x98, 0xc4, 0xa9, 0x8b, 808 0x09, 0x6b, 0xfb, 0x50, 0x9e, 0x1f, 0x30, 0x13, 0xe8, 0x47, 0x99, 0xe6, 0x7c, 0xd1, 0x65, 0x0e, 809 0x18, 0x27, 0x62, 0x34, 0x95, 0x8a, 0xd4, 0xcd, 0x97, 0x66, 0x09, 0x4f, 0x0b, 0x4f, 0x88, 0xfd, 810 0x87, 0x80, 0xb1, 0xeb, 0xcb, 0xd1, 0xe0, 0x86, 0x4e, 0x4a, 0xaa, 0xc2, 0x82, 0x54, 0x74, 0x41, 811 0x2a, 0x7d, 0x41, 0x2a, 0x63, 0x41, 0xaa, 0xe2, 0x82, 0x54, 0xd5, 0x2b, 0xa9, 0xd8, 0x3a, 0x10, 812 0xc1, 0x4b, 0x6a, 0x4a, 0x64, 0x8b, 0x6f, 0x5f, 0x9f, 0xbf, 0x7d, 0xbd, 0x11, 0xa4, 0x98, 0x25, 813 0xd8, 0x6d, 0x28, 0xfa, 0xc9, 0xfb, 0x89, 0xf0, 0x78, 0x19, 0x5b, 0xbb, 0x39, 0x62, 0x1b, 0xa0, 814 0x4f, 0xd2, 0x48, 0xf2, 0x4a, 0x8d, 0x38, 0xcb, 0xd7, 0x34, 0x0f, 0xe4, 0x24, 0xce, 0x78, 0xba, 815 0x2a, 0x8e, 0x2b, 0x31, 0x0d, 0xfc, 0x09, 0x87, 0x6c, 0x25, 0xd0, 0x6f, 0x1a, 0x40, 0x4f, 0xc4, 816 0xc8, 0x7e, 0x08, 0xfa, 0x1b, 0x11, 0x07, 0x98, 0xa2, 0x5a, 0xe5, 0x5b, 0xa3, 0xca, 0x56, 0x81, 817 0x8e, 0x13, 0x4f, 0xd1, 0xaf, 0xb8, 0xa5, 0xb1, 0x4c, 0x12, 0xe1, 0x49, 0xfb, 0x3b, 0x81, 0x52, 818 0xb7, 0xd9, 0xc5, 0xe5, 0xc5, 0xaa, 0x40, 0x8c, 0xaf, 0xaa, 0xd0, 0x67, 0x0f, 0xa0, 0x38, 0x44, 819 0x35, 0x13, 0x5e, 0x50, 0xaf, 0x78, 0x6b, 0x3e, 0x96, 0xd2, 0xd8, 0xcd, 0x83, 0xea, 0x42, 0x7f, 820 0x2c, 0x95, 0x98, 0xd4, 0x55, 0x3e, 0xb3, 0xc1, 0xf8, 0x2c, 0xe2, 0x20, 0xe1, 0xba, 0xaa, 0x5c, 821 0x9a, 0x57, 0xe2, 0x84, 0x6e, 0x16, 0xc2, 0xf6, 0x03, 0xfc, 0x0d, 0x12, 0x6e, 0xfc, 0xdf, 0x5e, 822 0xfd, 0x1c, 0x6e, 0x1e, 0xb4, 0xb7, 0xa0, 0x9c, 0x0f, 0x99, 0xb0, 0xfb, 0xff, 0x6e, 0xe0, 0xca, 823 0x3c, 0x3f, 0x0f, 0xab, 0xf5, 0xdb, 0xdc, 0x87, 0xd2, 0x4b, 0x99, 0xa2, 0x64, 0xcc, 0x00, 0xf2, 824 0xd6, 0xd4, 0xd0, 0x74, 0x4c, 0x82, 0xa6, 0x67, 0x16, 0xd0, 0xec, 0x9a, 0x14, 0x4d, 0xd3, 0xd4, 825 0xd1, 0xb4, 0x4c, 0x83, 0x95, 0x80, 0x1e, 0x76, 0x5e, 0x99, 0x45, 0xc4, 0x47, 0x66, 0x09, 0x4d, 826 0xc3, 0x2c, 0x6f, 0x3e, 0x07, 0xb8, 0x7e, 0x01, 0xb6, 0x02, 0xd5, 0xde, 0xe1, 0x51, 0xb7, 0xbd, 827 0xd3, 0xd9, 0xed, 0xb4, 0x5b, 0xa6, 0xc6, 0x2a, 0x60, 0xec, 0xbc, 0xee, 0x1d, 0x1e, 0x9b, 0x84, 828 0x95, 0x41, 0x77, 0x1b, 0xc7, 0x6d, 0xb3, 0x80, 0x87, 0x7b, 0x8d, 0xde, 0x5e, 0xdb, 0xa4, 0xcd, 829 0xbd, 0xd3, 0x73, 0x4b, 0x3b, 0x3b, 0xb7, 0xb4, 0xcb, 0x73, 0x8b, 0x7c, 0x9d, 0x59, 0xe4, 0xc7, 830 0xcc, 0x22, 0x3f, 0x67, 0x16, 0x39, 0x9d, 0x59, 0xe4, 0xd7, 0xcc, 0x22, 0xbf, 0x67, 0x96, 0x76, 831 0x39, 0xb3, 0xc8, 0xb7, 0x0b, 0x4b, 0x3b, 0xbd, 0xb0, 0xb4, 0xb3, 0x0b, 0x4b, 0x6b, 0x1a, 0x8a, 832 0x4c, 0x97, 0xbc, 0x2b, 0x6f, 0x3f, 0xcb, 0x08, 0xf6, 0x8b, 0x6a, 0x91, 0x1e, 0xff, 0x0d, 0x00, 833 0x00, 0xff, 0xff, 0xe3, 0x44, 0x9c, 0xc7, 0x69, 0x04, 0x00, 0x00, 834 } 835 836 func (x KeyType) String() string { 837 s, ok := KeyType_name[int32(x)] 838 if ok { 839 return s 840 } 841 return strconv.Itoa(int(x)) 842 } 843 func (x MetricType) String() string { 844 s, ok := MetricType_name[int32(x)] 845 if ok { 846 return s 847 } 848 return strconv.Itoa(int(x)) 849 } 850 func (this *Debug) Equal(that interface{}) bool { 851 if that == nil { 852 return this == nil 853 } 854 855 that1, ok := that.(*Debug) 856 if !ok { 857 that2, ok := that.(Debug) 858 if ok { 859 that1 = &that2 860 } else { 861 return false 862 } 863 } 864 if that1 == nil { 865 return this == nil 866 } else if this == nil { 867 return false 868 } 869 if this.Info != that1.Info { 870 return false 871 } 872 return true 873 } 874 func (this *AnyDemo) Equal(that interface{}) bool { 875 if that == nil { 876 return this == nil 877 } 878 879 that1, ok := that.(*AnyDemo) 880 if !ok { 881 that2, ok := that.(AnyDemo) 882 if ok { 883 that1 = &that2 884 } else { 885 return false 886 } 887 } 888 if that1 == nil { 889 return this == nil 890 } else if this == nil { 891 return false 892 } 893 if this.Demo != that1.Demo { 894 return false 895 } 896 return true 897 } 898 func (this *BasicTypes) Equal(that interface{}) bool { 899 if that == nil { 900 return this == nil 901 } 902 903 that1, ok := that.(*BasicTypes) 904 if !ok { 905 that2, ok := that.(BasicTypes) 906 if ok { 907 that1 = &that2 908 } else { 909 return false 910 } 911 } 912 if that1 == nil { 913 return this == nil 914 } else if this == nil { 915 return false 916 } 917 if that1.X == nil { 918 if this.X != nil { 919 return false 920 } 921 } else if this.X == nil { 922 return false 923 } else if !this.X.Equal(that1.X) { 924 return false 925 } 926 return true 927 } 928 func (this *BasicTypes_I) Equal(that interface{}) bool { 929 if that == nil { 930 return this == nil 931 } 932 933 that1, ok := that.(*BasicTypes_I) 934 if !ok { 935 that2, ok := that.(BasicTypes_I) 936 if ok { 937 that1 = &that2 938 } else { 939 return false 940 } 941 } 942 if that1 == nil { 943 return this == nil 944 } else if this == nil { 945 return false 946 } 947 if this.I != that1.I { 948 return false 949 } 950 return true 951 } 952 func (this *BasicTypes_U) Equal(that interface{}) bool { 953 if that == nil { 954 return this == nil 955 } 956 957 that1, ok := that.(*BasicTypes_U) 958 if !ok { 959 that2, ok := that.(BasicTypes_U) 960 if ok { 961 that1 = &that2 962 } else { 963 return false 964 } 965 } 966 if that1 == nil { 967 return this == nil 968 } else if this == nil { 969 return false 970 } 971 if this.U != that1.U { 972 return false 973 } 974 return true 975 } 976 func (this *BasicTypes_F) Equal(that interface{}) bool { 977 if that == nil { 978 return this == nil 979 } 980 981 that1, ok := that.(*BasicTypes_F) 982 if !ok { 983 that2, ok := that.(BasicTypes_F) 984 if ok { 985 that1 = &that2 986 } else { 987 return false 988 } 989 } 990 if that1 == nil { 991 return this == nil 992 } else if this == nil { 993 return false 994 } 995 if this.F != that1.F { 996 return false 997 } 998 return true 999 } 1000 func (this *BasicTypes_B) Equal(that interface{}) bool { 1001 if that == nil { 1002 return this == nil 1003 } 1004 1005 that1, ok := that.(*BasicTypes_B) 1006 if !ok { 1007 that2, ok := that.(BasicTypes_B) 1008 if ok { 1009 that1 = &that2 1010 } else { 1011 return false 1012 } 1013 } 1014 if that1 == nil { 1015 return this == nil 1016 } else if this == nil { 1017 return false 1018 } 1019 if this.B != that1.B { 1020 return false 1021 } 1022 return true 1023 } 1024 func (this *BasicTypes_D) Equal(that interface{}) bool { 1025 if that == nil { 1026 return this == nil 1027 } 1028 1029 that1, ok := that.(*BasicTypes_D) 1030 if !ok { 1031 that2, ok := that.(BasicTypes_D) 1032 if ok { 1033 that1 = &that2 1034 } else { 1035 return false 1036 } 1037 } 1038 if that1 == nil { 1039 return this == nil 1040 } else if this == nil { 1041 return false 1042 } 1043 if !bytes.Equal(this.D, that1.D) { 1044 return false 1045 } 1046 return true 1047 } 1048 func (this *BasicTypes_S) Equal(that interface{}) bool { 1049 if that == nil { 1050 return this == nil 1051 } 1052 1053 that1, ok := that.(*BasicTypes_S) 1054 if !ok { 1055 that2, ok := that.(BasicTypes_S) 1056 if ok { 1057 that1 = &that2 1058 } else { 1059 return false 1060 } 1061 } 1062 if that1 == nil { 1063 return this == nil 1064 } else if this == nil { 1065 return false 1066 } 1067 if this.S != that1.S { 1068 return false 1069 } 1070 return true 1071 } 1072 func (this *Array) Equal(that interface{}) bool { 1073 if that == nil { 1074 return this == nil 1075 } 1076 1077 that1, ok := that.(*Array) 1078 if !ok { 1079 that2, ok := that.(Array) 1080 if ok { 1081 that1 = &that2 1082 } else { 1083 return false 1084 } 1085 } 1086 if that1 == nil { 1087 return this == nil 1088 } else if this == nil { 1089 return false 1090 } 1091 if len(this.Arr) != len(that1.Arr) { 1092 return false 1093 } 1094 for i := range this.Arr { 1095 if !this.Arr[i].Equal(that1.Arr[i]) { 1096 return false 1097 } 1098 } 1099 return true 1100 } 1101 func (this *Map) Equal(that interface{}) bool { 1102 if that == nil { 1103 return this == nil 1104 } 1105 1106 that1, ok := that.(*Map) 1107 if !ok { 1108 that2, ok := that.(Map) 1109 if ok { 1110 that1 = &that2 1111 } else { 1112 return false 1113 } 1114 } 1115 if that1 == nil { 1116 return this == nil 1117 } else if this == nil { 1118 return false 1119 } 1120 if len(this.Map) != len(that1.Map) { 1121 return false 1122 } 1123 for i := range this.Map { 1124 if !this.Map[i].Equal(that1.Map[i]) { 1125 return false 1126 } 1127 } 1128 return true 1129 } 1130 func (this *Field) Equal(that interface{}) bool { 1131 if that == nil { 1132 return this == nil 1133 } 1134 1135 that1, ok := that.(*Field) 1136 if !ok { 1137 that2, ok := that.(Field) 1138 if ok { 1139 that1 = &that2 1140 } else { 1141 return false 1142 } 1143 } 1144 if that1 == nil { 1145 return this == nil 1146 } else if this == nil { 1147 return false 1148 } 1149 if this.Key != that1.Key { 1150 return false 1151 } 1152 if that1.Val == nil { 1153 if this.Val != nil { 1154 return false 1155 } 1156 } else if this.Val == nil { 1157 return false 1158 } else if !this.Val.Equal(that1.Val) { 1159 return false 1160 } 1161 if this.IsTag != that1.IsTag { 1162 return false 1163 } 1164 if this.Type != that1.Type { 1165 return false 1166 } 1167 if this.Unit != that1.Unit { 1168 return false 1169 } 1170 return true 1171 } 1172 func (this *Field_I) Equal(that interface{}) bool { 1173 if that == nil { 1174 return this == nil 1175 } 1176 1177 that1, ok := that.(*Field_I) 1178 if !ok { 1179 that2, ok := that.(Field_I) 1180 if ok { 1181 that1 = &that2 1182 } else { 1183 return false 1184 } 1185 } 1186 if that1 == nil { 1187 return this == nil 1188 } else if this == nil { 1189 return false 1190 } 1191 if this.I != that1.I { 1192 return false 1193 } 1194 return true 1195 } 1196 func (this *Field_U) Equal(that interface{}) bool { 1197 if that == nil { 1198 return this == nil 1199 } 1200 1201 that1, ok := that.(*Field_U) 1202 if !ok { 1203 that2, ok := that.(Field_U) 1204 if ok { 1205 that1 = &that2 1206 } else { 1207 return false 1208 } 1209 } 1210 if that1 == nil { 1211 return this == nil 1212 } else if this == nil { 1213 return false 1214 } 1215 if this.U != that1.U { 1216 return false 1217 } 1218 return true 1219 } 1220 func (this *Field_F) Equal(that interface{}) bool { 1221 if that == nil { 1222 return this == nil 1223 } 1224 1225 that1, ok := that.(*Field_F) 1226 if !ok { 1227 that2, ok := that.(Field_F) 1228 if ok { 1229 that1 = &that2 1230 } else { 1231 return false 1232 } 1233 } 1234 if that1 == nil { 1235 return this == nil 1236 } else if this == nil { 1237 return false 1238 } 1239 if this.F != that1.F { 1240 return false 1241 } 1242 return true 1243 } 1244 func (this *Field_B) Equal(that interface{}) bool { 1245 if that == nil { 1246 return this == nil 1247 } 1248 1249 that1, ok := that.(*Field_B) 1250 if !ok { 1251 that2, ok := that.(Field_B) 1252 if ok { 1253 that1 = &that2 1254 } else { 1255 return false 1256 } 1257 } 1258 if that1 == nil { 1259 return this == nil 1260 } else if this == nil { 1261 return false 1262 } 1263 if this.B != that1.B { 1264 return false 1265 } 1266 return true 1267 } 1268 func (this *Field_D) Equal(that interface{}) bool { 1269 if that == nil { 1270 return this == nil 1271 } 1272 1273 that1, ok := that.(*Field_D) 1274 if !ok { 1275 that2, ok := that.(Field_D) 1276 if ok { 1277 that1 = &that2 1278 } else { 1279 return false 1280 } 1281 } 1282 if that1 == nil { 1283 return this == nil 1284 } else if this == nil { 1285 return false 1286 } 1287 if !bytes.Equal(this.D, that1.D) { 1288 return false 1289 } 1290 return true 1291 } 1292 func (this *Field_S) Equal(that interface{}) bool { 1293 if that == nil { 1294 return this == nil 1295 } 1296 1297 that1, ok := that.(*Field_S) 1298 if !ok { 1299 that2, ok := that.(Field_S) 1300 if ok { 1301 that1 = &that2 1302 } else { 1303 return false 1304 } 1305 } 1306 if that1 == nil { 1307 return this == nil 1308 } else if this == nil { 1309 return false 1310 } 1311 if this.S != that1.S { 1312 return false 1313 } 1314 return true 1315 } 1316 func (this *Field_A) Equal(that interface{}) bool { 1317 if that == nil { 1318 return this == nil 1319 } 1320 1321 that1, ok := that.(*Field_A) 1322 if !ok { 1323 that2, ok := that.(Field_A) 1324 if ok { 1325 that1 = &that2 1326 } else { 1327 return false 1328 } 1329 } 1330 if that1 == nil { 1331 return this == nil 1332 } else if this == nil { 1333 return false 1334 } 1335 if !this.A.Equal(that1.A) { 1336 return false 1337 } 1338 return true 1339 } 1340 func (this *Warn) Equal(that interface{}) bool { 1341 if that == nil { 1342 return this == nil 1343 } 1344 1345 that1, ok := that.(*Warn) 1346 if !ok { 1347 that2, ok := that.(Warn) 1348 if ok { 1349 that1 = &that2 1350 } else { 1351 return false 1352 } 1353 } 1354 if that1 == nil { 1355 return this == nil 1356 } else if this == nil { 1357 return false 1358 } 1359 if this.Type != that1.Type { 1360 return false 1361 } 1362 if this.Msg != that1.Msg { 1363 return false 1364 } 1365 return true 1366 } 1367 func (this *PBPoint) Equal(that interface{}) bool { 1368 if that == nil { 1369 return this == nil 1370 } 1371 1372 that1, ok := that.(*PBPoint) 1373 if !ok { 1374 that2, ok := that.(PBPoint) 1375 if ok { 1376 that1 = &that2 1377 } else { 1378 return false 1379 } 1380 } 1381 if that1 == nil { 1382 return this == nil 1383 } else if this == nil { 1384 return false 1385 } 1386 if this.Name != that1.Name { 1387 return false 1388 } 1389 if len(this.Fields) != len(that1.Fields) { 1390 return false 1391 } 1392 for i := range this.Fields { 1393 if !this.Fields[i].Equal(that1.Fields[i]) { 1394 return false 1395 } 1396 } 1397 if this.Time != that1.Time { 1398 return false 1399 } 1400 if len(this.Warns) != len(that1.Warns) { 1401 return false 1402 } 1403 for i := range this.Warns { 1404 if !this.Warns[i].Equal(that1.Warns[i]) { 1405 return false 1406 } 1407 } 1408 if len(this.Debugs) != len(that1.Debugs) { 1409 return false 1410 } 1411 for i := range this.Debugs { 1412 if !this.Debugs[i].Equal(that1.Debugs[i]) { 1413 return false 1414 } 1415 } 1416 return true 1417 } 1418 func (this *PBPoints) Equal(that interface{}) bool { 1419 if that == nil { 1420 return this == nil 1421 } 1422 1423 that1, ok := that.(*PBPoints) 1424 if !ok { 1425 that2, ok := that.(PBPoints) 1426 if ok { 1427 that1 = &that2 1428 } else { 1429 return false 1430 } 1431 } 1432 if that1 == nil { 1433 return this == nil 1434 } else if this == nil { 1435 return false 1436 } 1437 if len(this.Arr) != len(that1.Arr) { 1438 return false 1439 } 1440 for i := range this.Arr { 1441 if !this.Arr[i].Equal(that1.Arr[i]) { 1442 return false 1443 } 1444 } 1445 return true 1446 } 1447 func (this *Debug) GoString() string { 1448 if this == nil { 1449 return "nil" 1450 } 1451 s := make([]string, 0, 5) 1452 s = append(s, "&gogopb.Debug{") 1453 s = append(s, "Info: "+fmt.Sprintf("%#v", this.Info)+",\n") 1454 s = append(s, "}") 1455 return strings.Join(s, "") 1456 } 1457 func (this *AnyDemo) GoString() string { 1458 if this == nil { 1459 return "nil" 1460 } 1461 s := make([]string, 0, 5) 1462 s = append(s, "&gogopb.AnyDemo{") 1463 s = append(s, "Demo: "+fmt.Sprintf("%#v", this.Demo)+",\n") 1464 s = append(s, "}") 1465 return strings.Join(s, "") 1466 } 1467 func (this *BasicTypes) GoString() string { 1468 if this == nil { 1469 return "nil" 1470 } 1471 s := make([]string, 0, 10) 1472 s = append(s, "&gogopb.BasicTypes{") 1473 if this.X != nil { 1474 s = append(s, "X: "+fmt.Sprintf("%#v", this.X)+",\n") 1475 } 1476 s = append(s, "}") 1477 return strings.Join(s, "") 1478 } 1479 func (this *BasicTypes_I) GoString() string { 1480 if this == nil { 1481 return "nil" 1482 } 1483 s := strings.Join([]string{`&gogopb.BasicTypes_I{` + 1484 `I:` + fmt.Sprintf("%#v", this.I) + `}`}, ", ") 1485 return s 1486 } 1487 func (this *BasicTypes_U) GoString() string { 1488 if this == nil { 1489 return "nil" 1490 } 1491 s := strings.Join([]string{`&gogopb.BasicTypes_U{` + 1492 `U:` + fmt.Sprintf("%#v", this.U) + `}`}, ", ") 1493 return s 1494 } 1495 func (this *BasicTypes_F) GoString() string { 1496 if this == nil { 1497 return "nil" 1498 } 1499 s := strings.Join([]string{`&gogopb.BasicTypes_F{` + 1500 `F:` + fmt.Sprintf("%#v", this.F) + `}`}, ", ") 1501 return s 1502 } 1503 func (this *BasicTypes_B) GoString() string { 1504 if this == nil { 1505 return "nil" 1506 } 1507 s := strings.Join([]string{`&gogopb.BasicTypes_B{` + 1508 `B:` + fmt.Sprintf("%#v", this.B) + `}`}, ", ") 1509 return s 1510 } 1511 func (this *BasicTypes_D) GoString() string { 1512 if this == nil { 1513 return "nil" 1514 } 1515 s := strings.Join([]string{`&gogopb.BasicTypes_D{` + 1516 `D:` + fmt.Sprintf("%#v", this.D) + `}`}, ", ") 1517 return s 1518 } 1519 func (this *BasicTypes_S) GoString() string { 1520 if this == nil { 1521 return "nil" 1522 } 1523 s := strings.Join([]string{`&gogopb.BasicTypes_S{` + 1524 `S:` + fmt.Sprintf("%#v", this.S) + `}`}, ", ") 1525 return s 1526 } 1527 func (this *Array) GoString() string { 1528 if this == nil { 1529 return "nil" 1530 } 1531 s := make([]string, 0, 5) 1532 s = append(s, "&gogopb.Array{") 1533 if this.Arr != nil { 1534 s = append(s, "Arr: "+fmt.Sprintf("%#v", this.Arr)+",\n") 1535 } 1536 s = append(s, "}") 1537 return strings.Join(s, "") 1538 } 1539 func (this *Map) GoString() string { 1540 if this == nil { 1541 return "nil" 1542 } 1543 s := make([]string, 0, 5) 1544 s = append(s, "&gogopb.Map{") 1545 keysForMap := make([]string, 0, len(this.Map)) 1546 for k, _ := range this.Map { 1547 keysForMap = append(keysForMap, k) 1548 } 1549 github_com_gogo_protobuf_sortkeys.Strings(keysForMap) 1550 mapStringForMap := "map[string]*BasicTypes{" 1551 for _, k := range keysForMap { 1552 mapStringForMap += fmt.Sprintf("%#v: %#v,", k, this.Map[k]) 1553 } 1554 mapStringForMap += "}" 1555 if this.Map != nil { 1556 s = append(s, "Map: "+mapStringForMap+",\n") 1557 } 1558 s = append(s, "}") 1559 return strings.Join(s, "") 1560 } 1561 func (this *Field) GoString() string { 1562 if this == nil { 1563 return "nil" 1564 } 1565 s := make([]string, 0, 15) 1566 s = append(s, "&gogopb.Field{") 1567 s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") 1568 if this.Val != nil { 1569 s = append(s, "Val: "+fmt.Sprintf("%#v", this.Val)+",\n") 1570 } 1571 s = append(s, "IsTag: "+fmt.Sprintf("%#v", this.IsTag)+",\n") 1572 s = append(s, "Type: "+fmt.Sprintf("%#v", this.Type)+",\n") 1573 s = append(s, "Unit: "+fmt.Sprintf("%#v", this.Unit)+",\n") 1574 s = append(s, "}") 1575 return strings.Join(s, "") 1576 } 1577 func (this *Field_I) GoString() string { 1578 if this == nil { 1579 return "nil" 1580 } 1581 s := strings.Join([]string{`&gogopb.Field_I{` + 1582 `I:` + fmt.Sprintf("%#v", this.I) + `}`}, ", ") 1583 return s 1584 } 1585 func (this *Field_U) GoString() string { 1586 if this == nil { 1587 return "nil" 1588 } 1589 s := strings.Join([]string{`&gogopb.Field_U{` + 1590 `U:` + fmt.Sprintf("%#v", this.U) + `}`}, ", ") 1591 return s 1592 } 1593 func (this *Field_F) GoString() string { 1594 if this == nil { 1595 return "nil" 1596 } 1597 s := strings.Join([]string{`&gogopb.Field_F{` + 1598 `F:` + fmt.Sprintf("%#v", this.F) + `}`}, ", ") 1599 return s 1600 } 1601 func (this *Field_B) GoString() string { 1602 if this == nil { 1603 return "nil" 1604 } 1605 s := strings.Join([]string{`&gogopb.Field_B{` + 1606 `B:` + fmt.Sprintf("%#v", this.B) + `}`}, ", ") 1607 return s 1608 } 1609 func (this *Field_D) GoString() string { 1610 if this == nil { 1611 return "nil" 1612 } 1613 s := strings.Join([]string{`&gogopb.Field_D{` + 1614 `D:` + fmt.Sprintf("%#v", this.D) + `}`}, ", ") 1615 return s 1616 } 1617 func (this *Field_S) GoString() string { 1618 if this == nil { 1619 return "nil" 1620 } 1621 s := strings.Join([]string{`&gogopb.Field_S{` + 1622 `S:` + fmt.Sprintf("%#v", this.S) + `}`}, ", ") 1623 return s 1624 } 1625 func (this *Field_A) GoString() string { 1626 if this == nil { 1627 return "nil" 1628 } 1629 s := strings.Join([]string{`&gogopb.Field_A{` + 1630 `A:` + fmt.Sprintf("%#v", this.A) + `}`}, ", ") 1631 return s 1632 } 1633 func (this *Warn) GoString() string { 1634 if this == nil { 1635 return "nil" 1636 } 1637 s := make([]string, 0, 6) 1638 s = append(s, "&gogopb.Warn{") 1639 s = append(s, "Type: "+fmt.Sprintf("%#v", this.Type)+",\n") 1640 s = append(s, "Msg: "+fmt.Sprintf("%#v", this.Msg)+",\n") 1641 s = append(s, "}") 1642 return strings.Join(s, "") 1643 } 1644 func (this *PBPoint) GoString() string { 1645 if this == nil { 1646 return "nil" 1647 } 1648 s := make([]string, 0, 9) 1649 s = append(s, "&gogopb.PBPoint{") 1650 s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") 1651 if this.Fields != nil { 1652 s = append(s, "Fields: "+fmt.Sprintf("%#v", this.Fields)+",\n") 1653 } 1654 s = append(s, "Time: "+fmt.Sprintf("%#v", this.Time)+",\n") 1655 if this.Warns != nil { 1656 s = append(s, "Warns: "+fmt.Sprintf("%#v", this.Warns)+",\n") 1657 } 1658 if this.Debugs != nil { 1659 s = append(s, "Debugs: "+fmt.Sprintf("%#v", this.Debugs)+",\n") 1660 } 1661 s = append(s, "}") 1662 return strings.Join(s, "") 1663 } 1664 func (this *PBPoints) GoString() string { 1665 if this == nil { 1666 return "nil" 1667 } 1668 s := make([]string, 0, 5) 1669 s = append(s, "&gogopb.PBPoints{") 1670 if this.Arr != nil { 1671 s = append(s, "Arr: "+fmt.Sprintf("%#v", this.Arr)+",\n") 1672 } 1673 s = append(s, "}") 1674 return strings.Join(s, "") 1675 } 1676 func valueToGoStringPoint(v interface{}, typ string) string { 1677 rv := reflect.ValueOf(v) 1678 if rv.IsNil() { 1679 return "nil" 1680 } 1681 pv := reflect.Indirect(rv).Interface() 1682 return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) 1683 } 1684 func (m *Debug) Marshal() (dAtA []byte, err error) { 1685 size := m.Size() 1686 dAtA = make([]byte, size) 1687 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1688 if err != nil { 1689 return nil, err 1690 } 1691 return dAtA[:n], nil 1692 } 1693 1694 func (m *Debug) MarshalTo(dAtA []byte) (int, error) { 1695 size := m.Size() 1696 return m.MarshalToSizedBuffer(dAtA[:size]) 1697 } 1698 1699 func (m *Debug) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1700 i := len(dAtA) 1701 _ = i 1702 var l int 1703 _ = l 1704 if len(m.Info) > 0 { 1705 i -= len(m.Info) 1706 copy(dAtA[i:], m.Info) 1707 i = encodeVarintPoint(dAtA, i, uint64(len(m.Info))) 1708 i-- 1709 dAtA[i] = 0xa 1710 } 1711 return len(dAtA) - i, nil 1712 } 1713 1714 func (m *AnyDemo) Marshal() (dAtA []byte, err error) { 1715 size := m.Size() 1716 dAtA = make([]byte, size) 1717 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1718 if err != nil { 1719 return nil, err 1720 } 1721 return dAtA[:n], nil 1722 } 1723 1724 func (m *AnyDemo) MarshalTo(dAtA []byte) (int, error) { 1725 size := m.Size() 1726 return m.MarshalToSizedBuffer(dAtA[:size]) 1727 } 1728 1729 func (m *AnyDemo) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1730 i := len(dAtA) 1731 _ = i 1732 var l int 1733 _ = l 1734 if len(m.Demo) > 0 { 1735 i -= len(m.Demo) 1736 copy(dAtA[i:], m.Demo) 1737 i = encodeVarintPoint(dAtA, i, uint64(len(m.Demo))) 1738 i-- 1739 dAtA[i] = 0xa 1740 } 1741 return len(dAtA) - i, nil 1742 } 1743 1744 func (m *BasicTypes) Marshal() (dAtA []byte, err error) { 1745 size := m.Size() 1746 dAtA = make([]byte, size) 1747 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1748 if err != nil { 1749 return nil, err 1750 } 1751 return dAtA[:n], nil 1752 } 1753 1754 func (m *BasicTypes) MarshalTo(dAtA []byte) (int, error) { 1755 size := m.Size() 1756 return m.MarshalToSizedBuffer(dAtA[:size]) 1757 } 1758 1759 func (m *BasicTypes) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1760 i := len(dAtA) 1761 _ = i 1762 var l int 1763 _ = l 1764 if m.X != nil { 1765 { 1766 size := m.X.Size() 1767 i -= size 1768 if _, err := m.X.MarshalTo(dAtA[i:]); err != nil { 1769 return 0, err 1770 } 1771 } 1772 } 1773 return len(dAtA) - i, nil 1774 } 1775 1776 func (m *BasicTypes_I) MarshalTo(dAtA []byte) (int, error) { 1777 size := m.Size() 1778 return m.MarshalToSizedBuffer(dAtA[:size]) 1779 } 1780 1781 func (m *BasicTypes_I) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1782 i := len(dAtA) 1783 i = encodeVarintPoint(dAtA, i, uint64(m.I)) 1784 i-- 1785 dAtA[i] = 0x8 1786 return len(dAtA) - i, nil 1787 } 1788 func (m *BasicTypes_U) MarshalTo(dAtA []byte) (int, error) { 1789 size := m.Size() 1790 return m.MarshalToSizedBuffer(dAtA[:size]) 1791 } 1792 1793 func (m *BasicTypes_U) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1794 i := len(dAtA) 1795 i = encodeVarintPoint(dAtA, i, uint64(m.U)) 1796 i-- 1797 dAtA[i] = 0x10 1798 return len(dAtA) - i, nil 1799 } 1800 func (m *BasicTypes_F) MarshalTo(dAtA []byte) (int, error) { 1801 size := m.Size() 1802 return m.MarshalToSizedBuffer(dAtA[:size]) 1803 } 1804 1805 func (m *BasicTypes_F) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1806 i := len(dAtA) 1807 i -= 8 1808 encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.F)))) 1809 i-- 1810 dAtA[i] = 0x19 1811 return len(dAtA) - i, nil 1812 } 1813 func (m *BasicTypes_B) MarshalTo(dAtA []byte) (int, error) { 1814 size := m.Size() 1815 return m.MarshalToSizedBuffer(dAtA[:size]) 1816 } 1817 1818 func (m *BasicTypes_B) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1819 i := len(dAtA) 1820 i-- 1821 if m.B { 1822 dAtA[i] = 1 1823 } else { 1824 dAtA[i] = 0 1825 } 1826 i-- 1827 dAtA[i] = 0x20 1828 return len(dAtA) - i, nil 1829 } 1830 func (m *BasicTypes_D) MarshalTo(dAtA []byte) (int, error) { 1831 size := m.Size() 1832 return m.MarshalToSizedBuffer(dAtA[:size]) 1833 } 1834 1835 func (m *BasicTypes_D) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1836 i := len(dAtA) 1837 if m.D != nil { 1838 i -= len(m.D) 1839 copy(dAtA[i:], m.D) 1840 i = encodeVarintPoint(dAtA, i, uint64(len(m.D))) 1841 i-- 1842 dAtA[i] = 0x2a 1843 } 1844 return len(dAtA) - i, nil 1845 } 1846 func (m *BasicTypes_S) MarshalTo(dAtA []byte) (int, error) { 1847 size := m.Size() 1848 return m.MarshalToSizedBuffer(dAtA[:size]) 1849 } 1850 1851 func (m *BasicTypes_S) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1852 i := len(dAtA) 1853 i -= len(m.S) 1854 copy(dAtA[i:], m.S) 1855 i = encodeVarintPoint(dAtA, i, uint64(len(m.S))) 1856 i-- 1857 dAtA[i] = 0x32 1858 return len(dAtA) - i, nil 1859 } 1860 func (m *Array) Marshal() (dAtA []byte, err error) { 1861 size := m.Size() 1862 dAtA = make([]byte, size) 1863 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1864 if err != nil { 1865 return nil, err 1866 } 1867 return dAtA[:n], nil 1868 } 1869 1870 func (m *Array) MarshalTo(dAtA []byte) (int, error) { 1871 size := m.Size() 1872 return m.MarshalToSizedBuffer(dAtA[:size]) 1873 } 1874 1875 func (m *Array) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1876 i := len(dAtA) 1877 _ = i 1878 var l int 1879 _ = l 1880 if len(m.Arr) > 0 { 1881 for iNdEx := len(m.Arr) - 1; iNdEx >= 0; iNdEx-- { 1882 { 1883 size, err := m.Arr[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1884 if err != nil { 1885 return 0, err 1886 } 1887 i -= size 1888 i = encodeVarintPoint(dAtA, i, uint64(size)) 1889 } 1890 i-- 1891 dAtA[i] = 0xa 1892 } 1893 } 1894 return len(dAtA) - i, nil 1895 } 1896 1897 func (m *Map) Marshal() (dAtA []byte, err error) { 1898 size := m.Size() 1899 dAtA = make([]byte, size) 1900 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1901 if err != nil { 1902 return nil, err 1903 } 1904 return dAtA[:n], nil 1905 } 1906 1907 func (m *Map) MarshalTo(dAtA []byte) (int, error) { 1908 size := m.Size() 1909 return m.MarshalToSizedBuffer(dAtA[:size]) 1910 } 1911 1912 func (m *Map) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1913 i := len(dAtA) 1914 _ = i 1915 var l int 1916 _ = l 1917 if len(m.Map) > 0 { 1918 for k := range m.Map { 1919 v := m.Map[k] 1920 baseI := i 1921 if v != nil { 1922 { 1923 size, err := v.MarshalToSizedBuffer(dAtA[:i]) 1924 if err != nil { 1925 return 0, err 1926 } 1927 i -= size 1928 i = encodeVarintPoint(dAtA, i, uint64(size)) 1929 } 1930 i-- 1931 dAtA[i] = 0x12 1932 } 1933 i -= len(k) 1934 copy(dAtA[i:], k) 1935 i = encodeVarintPoint(dAtA, i, uint64(len(k))) 1936 i-- 1937 dAtA[i] = 0xa 1938 i = encodeVarintPoint(dAtA, i, uint64(baseI-i)) 1939 i-- 1940 dAtA[i] = 0xa 1941 } 1942 } 1943 return len(dAtA) - i, nil 1944 } 1945 1946 func (m *Field) Marshal() (dAtA []byte, err error) { 1947 size := m.Size() 1948 dAtA = make([]byte, size) 1949 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1950 if err != nil { 1951 return nil, err 1952 } 1953 return dAtA[:n], nil 1954 } 1955 1956 func (m *Field) MarshalTo(dAtA []byte) (int, error) { 1957 size := m.Size() 1958 return m.MarshalToSizedBuffer(dAtA[:size]) 1959 } 1960 1961 func (m *Field) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1962 i := len(dAtA) 1963 _ = i 1964 var l int 1965 _ = l 1966 if m.Val != nil { 1967 { 1968 size := m.Val.Size() 1969 i -= size 1970 if _, err := m.Val.MarshalTo(dAtA[i:]); err != nil { 1971 return 0, err 1972 } 1973 } 1974 } 1975 if len(m.Unit) > 0 { 1976 i -= len(m.Unit) 1977 copy(dAtA[i:], m.Unit) 1978 i = encodeVarintPoint(dAtA, i, uint64(len(m.Unit))) 1979 i-- 1980 dAtA[i] = 0x52 1981 } 1982 if m.Type != 0 { 1983 i = encodeVarintPoint(dAtA, i, uint64(m.Type)) 1984 i-- 1985 dAtA[i] = 0x48 1986 } 1987 if m.IsTag { 1988 i-- 1989 if m.IsTag { 1990 dAtA[i] = 1 1991 } else { 1992 dAtA[i] = 0 1993 } 1994 i-- 1995 dAtA[i] = 0x40 1996 } 1997 if len(m.Key) > 0 { 1998 i -= len(m.Key) 1999 copy(dAtA[i:], m.Key) 2000 i = encodeVarintPoint(dAtA, i, uint64(len(m.Key))) 2001 i-- 2002 dAtA[i] = 0xa 2003 } 2004 return len(dAtA) - i, nil 2005 } 2006 2007 func (m *Field_I) MarshalTo(dAtA []byte) (int, error) { 2008 size := m.Size() 2009 return m.MarshalToSizedBuffer(dAtA[:size]) 2010 } 2011 2012 func (m *Field_I) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2013 i := len(dAtA) 2014 i = encodeVarintPoint(dAtA, i, uint64(m.I)) 2015 i-- 2016 dAtA[i] = 0x10 2017 return len(dAtA) - i, nil 2018 } 2019 func (m *Field_U) MarshalTo(dAtA []byte) (int, error) { 2020 size := m.Size() 2021 return m.MarshalToSizedBuffer(dAtA[:size]) 2022 } 2023 2024 func (m *Field_U) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2025 i := len(dAtA) 2026 i = encodeVarintPoint(dAtA, i, uint64(m.U)) 2027 i-- 2028 dAtA[i] = 0x18 2029 return len(dAtA) - i, nil 2030 } 2031 func (m *Field_F) MarshalTo(dAtA []byte) (int, error) { 2032 size := m.Size() 2033 return m.MarshalToSizedBuffer(dAtA[:size]) 2034 } 2035 2036 func (m *Field_F) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2037 i := len(dAtA) 2038 i -= 8 2039 encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.F)))) 2040 i-- 2041 dAtA[i] = 0x21 2042 return len(dAtA) - i, nil 2043 } 2044 func (m *Field_B) MarshalTo(dAtA []byte) (int, error) { 2045 size := m.Size() 2046 return m.MarshalToSizedBuffer(dAtA[:size]) 2047 } 2048 2049 func (m *Field_B) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2050 i := len(dAtA) 2051 i-- 2052 if m.B { 2053 dAtA[i] = 1 2054 } else { 2055 dAtA[i] = 0 2056 } 2057 i-- 2058 dAtA[i] = 0x28 2059 return len(dAtA) - i, nil 2060 } 2061 func (m *Field_D) MarshalTo(dAtA []byte) (int, error) { 2062 size := m.Size() 2063 return m.MarshalToSizedBuffer(dAtA[:size]) 2064 } 2065 2066 func (m *Field_D) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2067 i := len(dAtA) 2068 if m.D != nil { 2069 i -= len(m.D) 2070 copy(dAtA[i:], m.D) 2071 i = encodeVarintPoint(dAtA, i, uint64(len(m.D))) 2072 i-- 2073 dAtA[i] = 0x32 2074 } 2075 return len(dAtA) - i, nil 2076 } 2077 func (m *Field_A) MarshalTo(dAtA []byte) (int, error) { 2078 size := m.Size() 2079 return m.MarshalToSizedBuffer(dAtA[:size]) 2080 } 2081 2082 func (m *Field_A) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2083 i := len(dAtA) 2084 if m.A != nil { 2085 { 2086 size, err := m.A.MarshalToSizedBuffer(dAtA[:i]) 2087 if err != nil { 2088 return 0, err 2089 } 2090 i -= size 2091 i = encodeVarintPoint(dAtA, i, uint64(size)) 2092 } 2093 i-- 2094 dAtA[i] = 0x3a 2095 } 2096 return len(dAtA) - i, nil 2097 } 2098 func (m *Field_S) MarshalTo(dAtA []byte) (int, error) { 2099 size := m.Size() 2100 return m.MarshalToSizedBuffer(dAtA[:size]) 2101 } 2102 2103 func (m *Field_S) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2104 i := len(dAtA) 2105 i -= len(m.S) 2106 copy(dAtA[i:], m.S) 2107 i = encodeVarintPoint(dAtA, i, uint64(len(m.S))) 2108 i-- 2109 dAtA[i] = 0x5a 2110 return len(dAtA) - i, nil 2111 } 2112 func (m *Warn) Marshal() (dAtA []byte, err error) { 2113 size := m.Size() 2114 dAtA = make([]byte, size) 2115 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 2116 if err != nil { 2117 return nil, err 2118 } 2119 return dAtA[:n], nil 2120 } 2121 2122 func (m *Warn) MarshalTo(dAtA []byte) (int, error) { 2123 size := m.Size() 2124 return m.MarshalToSizedBuffer(dAtA[:size]) 2125 } 2126 2127 func (m *Warn) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2128 i := len(dAtA) 2129 _ = i 2130 var l int 2131 _ = l 2132 if len(m.Msg) > 0 { 2133 i -= len(m.Msg) 2134 copy(dAtA[i:], m.Msg) 2135 i = encodeVarintPoint(dAtA, i, uint64(len(m.Msg))) 2136 i-- 2137 dAtA[i] = 0x12 2138 } 2139 if len(m.Type) > 0 { 2140 i -= len(m.Type) 2141 copy(dAtA[i:], m.Type) 2142 i = encodeVarintPoint(dAtA, i, uint64(len(m.Type))) 2143 i-- 2144 dAtA[i] = 0xa 2145 } 2146 return len(dAtA) - i, nil 2147 } 2148 2149 func (m *PBPoint) Marshal() (dAtA []byte, err error) { 2150 size := m.Size() 2151 dAtA = make([]byte, size) 2152 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 2153 if err != nil { 2154 return nil, err 2155 } 2156 return dAtA[:n], nil 2157 } 2158 2159 func (m *PBPoint) MarshalTo(dAtA []byte) (int, error) { 2160 size := m.Size() 2161 return m.MarshalToSizedBuffer(dAtA[:size]) 2162 } 2163 2164 func (m *PBPoint) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2165 i := len(dAtA) 2166 _ = i 2167 var l int 2168 _ = l 2169 if len(m.Debugs) > 0 { 2170 for iNdEx := len(m.Debugs) - 1; iNdEx >= 0; iNdEx-- { 2171 { 2172 size, err := m.Debugs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 2173 if err != nil { 2174 return 0, err 2175 } 2176 i -= size 2177 i = encodeVarintPoint(dAtA, i, uint64(size)) 2178 } 2179 i-- 2180 dAtA[i] = 0x2a 2181 } 2182 } 2183 if len(m.Warns) > 0 { 2184 for iNdEx := len(m.Warns) - 1; iNdEx >= 0; iNdEx-- { 2185 { 2186 size, err := m.Warns[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 2187 if err != nil { 2188 return 0, err 2189 } 2190 i -= size 2191 i = encodeVarintPoint(dAtA, i, uint64(size)) 2192 } 2193 i-- 2194 dAtA[i] = 0x22 2195 } 2196 } 2197 if m.Time != 0 { 2198 i = encodeVarintPoint(dAtA, i, uint64(m.Time)) 2199 i-- 2200 dAtA[i] = 0x18 2201 } 2202 if len(m.Fields) > 0 { 2203 for iNdEx := len(m.Fields) - 1; iNdEx >= 0; iNdEx-- { 2204 { 2205 size, err := m.Fields[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 2206 if err != nil { 2207 return 0, err 2208 } 2209 i -= size 2210 i = encodeVarintPoint(dAtA, i, uint64(size)) 2211 } 2212 i-- 2213 dAtA[i] = 0x12 2214 } 2215 } 2216 if len(m.Name) > 0 { 2217 i -= len(m.Name) 2218 copy(dAtA[i:], m.Name) 2219 i = encodeVarintPoint(dAtA, i, uint64(len(m.Name))) 2220 i-- 2221 dAtA[i] = 0xa 2222 } 2223 return len(dAtA) - i, nil 2224 } 2225 2226 func (m *PBPoints) Marshal() (dAtA []byte, err error) { 2227 size := m.Size() 2228 dAtA = make([]byte, size) 2229 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 2230 if err != nil { 2231 return nil, err 2232 } 2233 return dAtA[:n], nil 2234 } 2235 2236 func (m *PBPoints) MarshalTo(dAtA []byte) (int, error) { 2237 size := m.Size() 2238 return m.MarshalToSizedBuffer(dAtA[:size]) 2239 } 2240 2241 func (m *PBPoints) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2242 i := len(dAtA) 2243 _ = i 2244 var l int 2245 _ = l 2246 if len(m.Arr) > 0 { 2247 for iNdEx := len(m.Arr) - 1; iNdEx >= 0; iNdEx-- { 2248 { 2249 size, err := m.Arr[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 2250 if err != nil { 2251 return 0, err 2252 } 2253 i -= size 2254 i = encodeVarintPoint(dAtA, i, uint64(size)) 2255 } 2256 i-- 2257 dAtA[i] = 0xa 2258 } 2259 } 2260 return len(dAtA) - i, nil 2261 } 2262 2263 func encodeVarintPoint(dAtA []byte, offset int, v uint64) int { 2264 offset -= sovPoint(v) 2265 base := offset 2266 for v >= 1<<7 { 2267 dAtA[offset] = uint8(v&0x7f | 0x80) 2268 v >>= 7 2269 offset++ 2270 } 2271 dAtA[offset] = uint8(v) 2272 return base 2273 } 2274 func (m *Debug) Size() (n int) { 2275 if m == nil { 2276 return 0 2277 } 2278 var l int 2279 _ = l 2280 l = len(m.Info) 2281 if l > 0 { 2282 n += 1 + l + sovPoint(uint64(l)) 2283 } 2284 return n 2285 } 2286 2287 func (m *AnyDemo) Size() (n int) { 2288 if m == nil { 2289 return 0 2290 } 2291 var l int 2292 _ = l 2293 l = len(m.Demo) 2294 if l > 0 { 2295 n += 1 + l + sovPoint(uint64(l)) 2296 } 2297 return n 2298 } 2299 2300 func (m *BasicTypes) Size() (n int) { 2301 if m == nil { 2302 return 0 2303 } 2304 var l int 2305 _ = l 2306 if m.X != nil { 2307 n += m.X.Size() 2308 } 2309 return n 2310 } 2311 2312 func (m *BasicTypes_I) Size() (n int) { 2313 if m == nil { 2314 return 0 2315 } 2316 var l int 2317 _ = l 2318 n += 1 + sovPoint(uint64(m.I)) 2319 return n 2320 } 2321 func (m *BasicTypes_U) Size() (n int) { 2322 if m == nil { 2323 return 0 2324 } 2325 var l int 2326 _ = l 2327 n += 1 + sovPoint(uint64(m.U)) 2328 return n 2329 } 2330 func (m *BasicTypes_F) Size() (n int) { 2331 if m == nil { 2332 return 0 2333 } 2334 var l int 2335 _ = l 2336 n += 9 2337 return n 2338 } 2339 func (m *BasicTypes_B) Size() (n int) { 2340 if m == nil { 2341 return 0 2342 } 2343 var l int 2344 _ = l 2345 n += 2 2346 return n 2347 } 2348 func (m *BasicTypes_D) Size() (n int) { 2349 if m == nil { 2350 return 0 2351 } 2352 var l int 2353 _ = l 2354 if m.D != nil { 2355 l = len(m.D) 2356 n += 1 + l + sovPoint(uint64(l)) 2357 } 2358 return n 2359 } 2360 func (m *BasicTypes_S) Size() (n int) { 2361 if m == nil { 2362 return 0 2363 } 2364 var l int 2365 _ = l 2366 l = len(m.S) 2367 n += 1 + l + sovPoint(uint64(l)) 2368 return n 2369 } 2370 func (m *Array) Size() (n int) { 2371 if m == nil { 2372 return 0 2373 } 2374 var l int 2375 _ = l 2376 if len(m.Arr) > 0 { 2377 for _, e := range m.Arr { 2378 l = e.Size() 2379 n += 1 + l + sovPoint(uint64(l)) 2380 } 2381 } 2382 return n 2383 } 2384 2385 func (m *Map) Size() (n int) { 2386 if m == nil { 2387 return 0 2388 } 2389 var l int 2390 _ = l 2391 if len(m.Map) > 0 { 2392 for k, v := range m.Map { 2393 _ = k 2394 _ = v 2395 l = 0 2396 if v != nil { 2397 l = v.Size() 2398 l += 1 + sovPoint(uint64(l)) 2399 } 2400 mapEntrySize := 1 + len(k) + sovPoint(uint64(len(k))) + l 2401 n += mapEntrySize + 1 + sovPoint(uint64(mapEntrySize)) 2402 } 2403 } 2404 return n 2405 } 2406 2407 func (m *Field) Size() (n int) { 2408 if m == nil { 2409 return 0 2410 } 2411 var l int 2412 _ = l 2413 l = len(m.Key) 2414 if l > 0 { 2415 n += 1 + l + sovPoint(uint64(l)) 2416 } 2417 if m.Val != nil { 2418 n += m.Val.Size() 2419 } 2420 if m.IsTag { 2421 n += 2 2422 } 2423 if m.Type != 0 { 2424 n += 1 + sovPoint(uint64(m.Type)) 2425 } 2426 l = len(m.Unit) 2427 if l > 0 { 2428 n += 1 + l + sovPoint(uint64(l)) 2429 } 2430 return n 2431 } 2432 2433 func (m *Field_I) Size() (n int) { 2434 if m == nil { 2435 return 0 2436 } 2437 var l int 2438 _ = l 2439 n += 1 + sovPoint(uint64(m.I)) 2440 return n 2441 } 2442 func (m *Field_U) Size() (n int) { 2443 if m == nil { 2444 return 0 2445 } 2446 var l int 2447 _ = l 2448 n += 1 + sovPoint(uint64(m.U)) 2449 return n 2450 } 2451 func (m *Field_F) Size() (n int) { 2452 if m == nil { 2453 return 0 2454 } 2455 var l int 2456 _ = l 2457 n += 9 2458 return n 2459 } 2460 func (m *Field_B) Size() (n int) { 2461 if m == nil { 2462 return 0 2463 } 2464 var l int 2465 _ = l 2466 n += 2 2467 return n 2468 } 2469 func (m *Field_D) Size() (n int) { 2470 if m == nil { 2471 return 0 2472 } 2473 var l int 2474 _ = l 2475 if m.D != nil { 2476 l = len(m.D) 2477 n += 1 + l + sovPoint(uint64(l)) 2478 } 2479 return n 2480 } 2481 func (m *Field_A) Size() (n int) { 2482 if m == nil { 2483 return 0 2484 } 2485 var l int 2486 _ = l 2487 if m.A != nil { 2488 l = m.A.Size() 2489 n += 1 + l + sovPoint(uint64(l)) 2490 } 2491 return n 2492 } 2493 func (m *Field_S) Size() (n int) { 2494 if m == nil { 2495 return 0 2496 } 2497 var l int 2498 _ = l 2499 l = len(m.S) 2500 n += 1 + l + sovPoint(uint64(l)) 2501 return n 2502 } 2503 func (m *Warn) Size() (n int) { 2504 if m == nil { 2505 return 0 2506 } 2507 var l int 2508 _ = l 2509 l = len(m.Type) 2510 if l > 0 { 2511 n += 1 + l + sovPoint(uint64(l)) 2512 } 2513 l = len(m.Msg) 2514 if l > 0 { 2515 n += 1 + l + sovPoint(uint64(l)) 2516 } 2517 return n 2518 } 2519 2520 func (m *PBPoint) Size() (n int) { 2521 if m == nil { 2522 return 0 2523 } 2524 var l int 2525 _ = l 2526 l = len(m.Name) 2527 if l > 0 { 2528 n += 1 + l + sovPoint(uint64(l)) 2529 } 2530 if len(m.Fields) > 0 { 2531 for _, e := range m.Fields { 2532 l = e.Size() 2533 n += 1 + l + sovPoint(uint64(l)) 2534 } 2535 } 2536 if m.Time != 0 { 2537 n += 1 + sovPoint(uint64(m.Time)) 2538 } 2539 if len(m.Warns) > 0 { 2540 for _, e := range m.Warns { 2541 l = e.Size() 2542 n += 1 + l + sovPoint(uint64(l)) 2543 } 2544 } 2545 if len(m.Debugs) > 0 { 2546 for _, e := range m.Debugs { 2547 l = e.Size() 2548 n += 1 + l + sovPoint(uint64(l)) 2549 } 2550 } 2551 return n 2552 } 2553 2554 func (m *PBPoints) Size() (n int) { 2555 if m == nil { 2556 return 0 2557 } 2558 var l int 2559 _ = l 2560 if len(m.Arr) > 0 { 2561 for _, e := range m.Arr { 2562 l = e.Size() 2563 n += 1 + l + sovPoint(uint64(l)) 2564 } 2565 } 2566 return n 2567 } 2568 2569 func sovPoint(x uint64) (n int) { 2570 return (math_bits.Len64(x|1) + 6) / 7 2571 } 2572 func sozPoint(x uint64) (n int) { 2573 return sovPoint(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 2574 } 2575 func (this *Debug) String() string { 2576 if this == nil { 2577 return "nil" 2578 } 2579 s := strings.Join([]string{`&Debug{`, 2580 `Info:` + fmt.Sprintf("%v", this.Info) + `,`, 2581 `}`, 2582 }, "") 2583 return s 2584 } 2585 func (this *AnyDemo) String() string { 2586 if this == nil { 2587 return "nil" 2588 } 2589 s := strings.Join([]string{`&AnyDemo{`, 2590 `Demo:` + fmt.Sprintf("%v", this.Demo) + `,`, 2591 `}`, 2592 }, "") 2593 return s 2594 } 2595 func (this *BasicTypes) String() string { 2596 if this == nil { 2597 return "nil" 2598 } 2599 s := strings.Join([]string{`&BasicTypes{`, 2600 `X:` + fmt.Sprintf("%v", this.X) + `,`, 2601 `}`, 2602 }, "") 2603 return s 2604 } 2605 func (this *BasicTypes_I) String() string { 2606 if this == nil { 2607 return "nil" 2608 } 2609 s := strings.Join([]string{`&BasicTypes_I{`, 2610 `I:` + fmt.Sprintf("%v", this.I) + `,`, 2611 `}`, 2612 }, "") 2613 return s 2614 } 2615 func (this *BasicTypes_U) String() string { 2616 if this == nil { 2617 return "nil" 2618 } 2619 s := strings.Join([]string{`&BasicTypes_U{`, 2620 `U:` + fmt.Sprintf("%v", this.U) + `,`, 2621 `}`, 2622 }, "") 2623 return s 2624 } 2625 func (this *BasicTypes_F) String() string { 2626 if this == nil { 2627 return "nil" 2628 } 2629 s := strings.Join([]string{`&BasicTypes_F{`, 2630 `F:` + fmt.Sprintf("%v", this.F) + `,`, 2631 `}`, 2632 }, "") 2633 return s 2634 } 2635 func (this *BasicTypes_B) String() string { 2636 if this == nil { 2637 return "nil" 2638 } 2639 s := strings.Join([]string{`&BasicTypes_B{`, 2640 `B:` + fmt.Sprintf("%v", this.B) + `,`, 2641 `}`, 2642 }, "") 2643 return s 2644 } 2645 func (this *BasicTypes_D) String() string { 2646 if this == nil { 2647 return "nil" 2648 } 2649 s := strings.Join([]string{`&BasicTypes_D{`, 2650 `D:` + fmt.Sprintf("%v", this.D) + `,`, 2651 `}`, 2652 }, "") 2653 return s 2654 } 2655 func (this *BasicTypes_S) String() string { 2656 if this == nil { 2657 return "nil" 2658 } 2659 s := strings.Join([]string{`&BasicTypes_S{`, 2660 `S:` + fmt.Sprintf("%v", this.S) + `,`, 2661 `}`, 2662 }, "") 2663 return s 2664 } 2665 func (this *Array) String() string { 2666 if this == nil { 2667 return "nil" 2668 } 2669 repeatedStringForArr := "[]*BasicTypes{" 2670 for _, f := range this.Arr { 2671 repeatedStringForArr += strings.Replace(f.String(), "BasicTypes", "BasicTypes", 1) + "," 2672 } 2673 repeatedStringForArr += "}" 2674 s := strings.Join([]string{`&Array{`, 2675 `Arr:` + repeatedStringForArr + `,`, 2676 `}`, 2677 }, "") 2678 return s 2679 } 2680 func (this *Map) String() string { 2681 if this == nil { 2682 return "nil" 2683 } 2684 keysForMap := make([]string, 0, len(this.Map)) 2685 for k, _ := range this.Map { 2686 keysForMap = append(keysForMap, k) 2687 } 2688 github_com_gogo_protobuf_sortkeys.Strings(keysForMap) 2689 mapStringForMap := "map[string]*BasicTypes{" 2690 for _, k := range keysForMap { 2691 mapStringForMap += fmt.Sprintf("%v: %v,", k, this.Map[k]) 2692 } 2693 mapStringForMap += "}" 2694 s := strings.Join([]string{`&Map{`, 2695 `Map:` + mapStringForMap + `,`, 2696 `}`, 2697 }, "") 2698 return s 2699 } 2700 func (this *Field) String() string { 2701 if this == nil { 2702 return "nil" 2703 } 2704 s := strings.Join([]string{`&Field{`, 2705 `Key:` + fmt.Sprintf("%v", this.Key) + `,`, 2706 `Val:` + fmt.Sprintf("%v", this.Val) + `,`, 2707 `IsTag:` + fmt.Sprintf("%v", this.IsTag) + `,`, 2708 `Type:` + fmt.Sprintf("%v", this.Type) + `,`, 2709 `Unit:` + fmt.Sprintf("%v", this.Unit) + `,`, 2710 `}`, 2711 }, "") 2712 return s 2713 } 2714 func (this *Field_I) String() string { 2715 if this == nil { 2716 return "nil" 2717 } 2718 s := strings.Join([]string{`&Field_I{`, 2719 `I:` + fmt.Sprintf("%v", this.I) + `,`, 2720 `}`, 2721 }, "") 2722 return s 2723 } 2724 func (this *Field_U) String() string { 2725 if this == nil { 2726 return "nil" 2727 } 2728 s := strings.Join([]string{`&Field_U{`, 2729 `U:` + fmt.Sprintf("%v", this.U) + `,`, 2730 `}`, 2731 }, "") 2732 return s 2733 } 2734 func (this *Field_F) String() string { 2735 if this == nil { 2736 return "nil" 2737 } 2738 s := strings.Join([]string{`&Field_F{`, 2739 `F:` + fmt.Sprintf("%v", this.F) + `,`, 2740 `}`, 2741 }, "") 2742 return s 2743 } 2744 func (this *Field_B) String() string { 2745 if this == nil { 2746 return "nil" 2747 } 2748 s := strings.Join([]string{`&Field_B{`, 2749 `B:` + fmt.Sprintf("%v", this.B) + `,`, 2750 `}`, 2751 }, "") 2752 return s 2753 } 2754 func (this *Field_D) String() string { 2755 if this == nil { 2756 return "nil" 2757 } 2758 s := strings.Join([]string{`&Field_D{`, 2759 `D:` + fmt.Sprintf("%v", this.D) + `,`, 2760 `}`, 2761 }, "") 2762 return s 2763 } 2764 func (this *Field_A) String() string { 2765 if this == nil { 2766 return "nil" 2767 } 2768 s := strings.Join([]string{`&Field_A{`, 2769 `A:` + strings.Replace(fmt.Sprintf("%v", this.A), "Any", "types.Any", 1) + `,`, 2770 `}`, 2771 }, "") 2772 return s 2773 } 2774 func (this *Field_S) String() string { 2775 if this == nil { 2776 return "nil" 2777 } 2778 s := strings.Join([]string{`&Field_S{`, 2779 `S:` + fmt.Sprintf("%v", this.S) + `,`, 2780 `}`, 2781 }, "") 2782 return s 2783 } 2784 func (this *Warn) String() string { 2785 if this == nil { 2786 return "nil" 2787 } 2788 s := strings.Join([]string{`&Warn{`, 2789 `Type:` + fmt.Sprintf("%v", this.Type) + `,`, 2790 `Msg:` + fmt.Sprintf("%v", this.Msg) + `,`, 2791 `}`, 2792 }, "") 2793 return s 2794 } 2795 func (this *PBPoint) String() string { 2796 if this == nil { 2797 return "nil" 2798 } 2799 repeatedStringForFields := "[]*Field{" 2800 for _, f := range this.Fields { 2801 repeatedStringForFields += strings.Replace(f.String(), "Field", "Field", 1) + "," 2802 } 2803 repeatedStringForFields += "}" 2804 repeatedStringForWarns := "[]*Warn{" 2805 for _, f := range this.Warns { 2806 repeatedStringForWarns += strings.Replace(f.String(), "Warn", "Warn", 1) + "," 2807 } 2808 repeatedStringForWarns += "}" 2809 repeatedStringForDebugs := "[]*Debug{" 2810 for _, f := range this.Debugs { 2811 repeatedStringForDebugs += strings.Replace(f.String(), "Debug", "Debug", 1) + "," 2812 } 2813 repeatedStringForDebugs += "}" 2814 s := strings.Join([]string{`&PBPoint{`, 2815 `Name:` + fmt.Sprintf("%v", this.Name) + `,`, 2816 `Fields:` + repeatedStringForFields + `,`, 2817 `Time:` + fmt.Sprintf("%v", this.Time) + `,`, 2818 `Warns:` + repeatedStringForWarns + `,`, 2819 `Debugs:` + repeatedStringForDebugs + `,`, 2820 `}`, 2821 }, "") 2822 return s 2823 } 2824 func (this *PBPoints) String() string { 2825 if this == nil { 2826 return "nil" 2827 } 2828 repeatedStringForArr := "[]*PBPoint{" 2829 for _, f := range this.Arr { 2830 repeatedStringForArr += strings.Replace(f.String(), "PBPoint", "PBPoint", 1) + "," 2831 } 2832 repeatedStringForArr += "}" 2833 s := strings.Join([]string{`&PBPoints{`, 2834 `Arr:` + repeatedStringForArr + `,`, 2835 `}`, 2836 }, "") 2837 return s 2838 } 2839 func valueToStringPoint(v interface{}) string { 2840 rv := reflect.ValueOf(v) 2841 if rv.IsNil() { 2842 return "nil" 2843 } 2844 pv := reflect.Indirect(rv).Interface() 2845 return fmt.Sprintf("*%v", pv) 2846 } 2847 func (m *Debug) Unmarshal(dAtA []byte) error { 2848 l := len(dAtA) 2849 iNdEx := 0 2850 for iNdEx < l { 2851 preIndex := iNdEx 2852 var wire uint64 2853 for shift := uint(0); ; shift += 7 { 2854 if shift >= 64 { 2855 return ErrIntOverflowPoint 2856 } 2857 if iNdEx >= l { 2858 return io.ErrUnexpectedEOF 2859 } 2860 b := dAtA[iNdEx] 2861 iNdEx++ 2862 wire |= uint64(b&0x7F) << shift 2863 if b < 0x80 { 2864 break 2865 } 2866 } 2867 fieldNum := int32(wire >> 3) 2868 wireType := int(wire & 0x7) 2869 if wireType == 4 { 2870 return fmt.Errorf("proto: Debug: wiretype end group for non-group") 2871 } 2872 if fieldNum <= 0 { 2873 return fmt.Errorf("proto: Debug: illegal tag %d (wire type %d)", fieldNum, wire) 2874 } 2875 switch fieldNum { 2876 case 1: 2877 if wireType != 2 { 2878 return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) 2879 } 2880 var stringLen uint64 2881 for shift := uint(0); ; shift += 7 { 2882 if shift >= 64 { 2883 return ErrIntOverflowPoint 2884 } 2885 if iNdEx >= l { 2886 return io.ErrUnexpectedEOF 2887 } 2888 b := dAtA[iNdEx] 2889 iNdEx++ 2890 stringLen |= uint64(b&0x7F) << shift 2891 if b < 0x80 { 2892 break 2893 } 2894 } 2895 intStringLen := int(stringLen) 2896 if intStringLen < 0 { 2897 return ErrInvalidLengthPoint 2898 } 2899 postIndex := iNdEx + intStringLen 2900 if postIndex < 0 { 2901 return ErrInvalidLengthPoint 2902 } 2903 if postIndex > l { 2904 return io.ErrUnexpectedEOF 2905 } 2906 m.Info = string(dAtA[iNdEx:postIndex]) 2907 iNdEx = postIndex 2908 default: 2909 iNdEx = preIndex 2910 skippy, err := skipPoint(dAtA[iNdEx:]) 2911 if err != nil { 2912 return err 2913 } 2914 if (skippy < 0) || (iNdEx+skippy) < 0 { 2915 return ErrInvalidLengthPoint 2916 } 2917 if (iNdEx + skippy) > l { 2918 return io.ErrUnexpectedEOF 2919 } 2920 iNdEx += skippy 2921 } 2922 } 2923 2924 if iNdEx > l { 2925 return io.ErrUnexpectedEOF 2926 } 2927 return nil 2928 } 2929 func (m *AnyDemo) Unmarshal(dAtA []byte) error { 2930 l := len(dAtA) 2931 iNdEx := 0 2932 for iNdEx < l { 2933 preIndex := iNdEx 2934 var wire uint64 2935 for shift := uint(0); ; shift += 7 { 2936 if shift >= 64 { 2937 return ErrIntOverflowPoint 2938 } 2939 if iNdEx >= l { 2940 return io.ErrUnexpectedEOF 2941 } 2942 b := dAtA[iNdEx] 2943 iNdEx++ 2944 wire |= uint64(b&0x7F) << shift 2945 if b < 0x80 { 2946 break 2947 } 2948 } 2949 fieldNum := int32(wire >> 3) 2950 wireType := int(wire & 0x7) 2951 if wireType == 4 { 2952 return fmt.Errorf("proto: AnyDemo: wiretype end group for non-group") 2953 } 2954 if fieldNum <= 0 { 2955 return fmt.Errorf("proto: AnyDemo: illegal tag %d (wire type %d)", fieldNum, wire) 2956 } 2957 switch fieldNum { 2958 case 1: 2959 if wireType != 2 { 2960 return fmt.Errorf("proto: wrong wireType = %d for field Demo", wireType) 2961 } 2962 var stringLen uint64 2963 for shift := uint(0); ; shift += 7 { 2964 if shift >= 64 { 2965 return ErrIntOverflowPoint 2966 } 2967 if iNdEx >= l { 2968 return io.ErrUnexpectedEOF 2969 } 2970 b := dAtA[iNdEx] 2971 iNdEx++ 2972 stringLen |= uint64(b&0x7F) << shift 2973 if b < 0x80 { 2974 break 2975 } 2976 } 2977 intStringLen := int(stringLen) 2978 if intStringLen < 0 { 2979 return ErrInvalidLengthPoint 2980 } 2981 postIndex := iNdEx + intStringLen 2982 if postIndex < 0 { 2983 return ErrInvalidLengthPoint 2984 } 2985 if postIndex > l { 2986 return io.ErrUnexpectedEOF 2987 } 2988 m.Demo = string(dAtA[iNdEx:postIndex]) 2989 iNdEx = postIndex 2990 default: 2991 iNdEx = preIndex 2992 skippy, err := skipPoint(dAtA[iNdEx:]) 2993 if err != nil { 2994 return err 2995 } 2996 if (skippy < 0) || (iNdEx+skippy) < 0 { 2997 return ErrInvalidLengthPoint 2998 } 2999 if (iNdEx + skippy) > l { 3000 return io.ErrUnexpectedEOF 3001 } 3002 iNdEx += skippy 3003 } 3004 } 3005 3006 if iNdEx > l { 3007 return io.ErrUnexpectedEOF 3008 } 3009 return nil 3010 } 3011 func (m *BasicTypes) Unmarshal(dAtA []byte) error { 3012 l := len(dAtA) 3013 iNdEx := 0 3014 for iNdEx < l { 3015 preIndex := iNdEx 3016 var wire uint64 3017 for shift := uint(0); ; shift += 7 { 3018 if shift >= 64 { 3019 return ErrIntOverflowPoint 3020 } 3021 if iNdEx >= l { 3022 return io.ErrUnexpectedEOF 3023 } 3024 b := dAtA[iNdEx] 3025 iNdEx++ 3026 wire |= uint64(b&0x7F) << shift 3027 if b < 0x80 { 3028 break 3029 } 3030 } 3031 fieldNum := int32(wire >> 3) 3032 wireType := int(wire & 0x7) 3033 if wireType == 4 { 3034 return fmt.Errorf("proto: BasicTypes: wiretype end group for non-group") 3035 } 3036 if fieldNum <= 0 { 3037 return fmt.Errorf("proto: BasicTypes: illegal tag %d (wire type %d)", fieldNum, wire) 3038 } 3039 switch fieldNum { 3040 case 1: 3041 if wireType != 0 { 3042 return fmt.Errorf("proto: wrong wireType = %d for field I", wireType) 3043 } 3044 var v int64 3045 for shift := uint(0); ; shift += 7 { 3046 if shift >= 64 { 3047 return ErrIntOverflowPoint 3048 } 3049 if iNdEx >= l { 3050 return io.ErrUnexpectedEOF 3051 } 3052 b := dAtA[iNdEx] 3053 iNdEx++ 3054 v |= int64(b&0x7F) << shift 3055 if b < 0x80 { 3056 break 3057 } 3058 } 3059 m.X = &BasicTypes_I{v} 3060 case 2: 3061 if wireType != 0 { 3062 return fmt.Errorf("proto: wrong wireType = %d for field U", wireType) 3063 } 3064 var v uint64 3065 for shift := uint(0); ; shift += 7 { 3066 if shift >= 64 { 3067 return ErrIntOverflowPoint 3068 } 3069 if iNdEx >= l { 3070 return io.ErrUnexpectedEOF 3071 } 3072 b := dAtA[iNdEx] 3073 iNdEx++ 3074 v |= uint64(b&0x7F) << shift 3075 if b < 0x80 { 3076 break 3077 } 3078 } 3079 m.X = &BasicTypes_U{v} 3080 case 3: 3081 if wireType != 1 { 3082 return fmt.Errorf("proto: wrong wireType = %d for field F", wireType) 3083 } 3084 var v uint64 3085 if (iNdEx + 8) > l { 3086 return io.ErrUnexpectedEOF 3087 } 3088 v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) 3089 iNdEx += 8 3090 m.X = &BasicTypes_F{float64(math.Float64frombits(v))} 3091 case 4: 3092 if wireType != 0 { 3093 return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) 3094 } 3095 var v int 3096 for shift := uint(0); ; shift += 7 { 3097 if shift >= 64 { 3098 return ErrIntOverflowPoint 3099 } 3100 if iNdEx >= l { 3101 return io.ErrUnexpectedEOF 3102 } 3103 b := dAtA[iNdEx] 3104 iNdEx++ 3105 v |= int(b&0x7F) << shift 3106 if b < 0x80 { 3107 break 3108 } 3109 } 3110 b := bool(v != 0) 3111 m.X = &BasicTypes_B{b} 3112 case 5: 3113 if wireType != 2 { 3114 return fmt.Errorf("proto: wrong wireType = %d for field D", wireType) 3115 } 3116 var byteLen int 3117 for shift := uint(0); ; shift += 7 { 3118 if shift >= 64 { 3119 return ErrIntOverflowPoint 3120 } 3121 if iNdEx >= l { 3122 return io.ErrUnexpectedEOF 3123 } 3124 b := dAtA[iNdEx] 3125 iNdEx++ 3126 byteLen |= int(b&0x7F) << shift 3127 if b < 0x80 { 3128 break 3129 } 3130 } 3131 if byteLen < 0 { 3132 return ErrInvalidLengthPoint 3133 } 3134 postIndex := iNdEx + byteLen 3135 if postIndex < 0 { 3136 return ErrInvalidLengthPoint 3137 } 3138 if postIndex > l { 3139 return io.ErrUnexpectedEOF 3140 } 3141 v := make([]byte, postIndex-iNdEx) 3142 copy(v, dAtA[iNdEx:postIndex]) 3143 m.X = &BasicTypes_D{v} 3144 iNdEx = postIndex 3145 case 6: 3146 if wireType != 2 { 3147 return fmt.Errorf("proto: wrong wireType = %d for field S", wireType) 3148 } 3149 var stringLen uint64 3150 for shift := uint(0); ; shift += 7 { 3151 if shift >= 64 { 3152 return ErrIntOverflowPoint 3153 } 3154 if iNdEx >= l { 3155 return io.ErrUnexpectedEOF 3156 } 3157 b := dAtA[iNdEx] 3158 iNdEx++ 3159 stringLen |= uint64(b&0x7F) << shift 3160 if b < 0x80 { 3161 break 3162 } 3163 } 3164 intStringLen := int(stringLen) 3165 if intStringLen < 0 { 3166 return ErrInvalidLengthPoint 3167 } 3168 postIndex := iNdEx + intStringLen 3169 if postIndex < 0 { 3170 return ErrInvalidLengthPoint 3171 } 3172 if postIndex > l { 3173 return io.ErrUnexpectedEOF 3174 } 3175 m.X = &BasicTypes_S{string(dAtA[iNdEx:postIndex])} 3176 iNdEx = postIndex 3177 default: 3178 iNdEx = preIndex 3179 skippy, err := skipPoint(dAtA[iNdEx:]) 3180 if err != nil { 3181 return err 3182 } 3183 if (skippy < 0) || (iNdEx+skippy) < 0 { 3184 return ErrInvalidLengthPoint 3185 } 3186 if (iNdEx + skippy) > l { 3187 return io.ErrUnexpectedEOF 3188 } 3189 iNdEx += skippy 3190 } 3191 } 3192 3193 if iNdEx > l { 3194 return io.ErrUnexpectedEOF 3195 } 3196 return nil 3197 } 3198 func (m *Array) Unmarshal(dAtA []byte) error { 3199 l := len(dAtA) 3200 iNdEx := 0 3201 for iNdEx < l { 3202 preIndex := iNdEx 3203 var wire uint64 3204 for shift := uint(0); ; shift += 7 { 3205 if shift >= 64 { 3206 return ErrIntOverflowPoint 3207 } 3208 if iNdEx >= l { 3209 return io.ErrUnexpectedEOF 3210 } 3211 b := dAtA[iNdEx] 3212 iNdEx++ 3213 wire |= uint64(b&0x7F) << shift 3214 if b < 0x80 { 3215 break 3216 } 3217 } 3218 fieldNum := int32(wire >> 3) 3219 wireType := int(wire & 0x7) 3220 if wireType == 4 { 3221 return fmt.Errorf("proto: Array: wiretype end group for non-group") 3222 } 3223 if fieldNum <= 0 { 3224 return fmt.Errorf("proto: Array: illegal tag %d (wire type %d)", fieldNum, wire) 3225 } 3226 switch fieldNum { 3227 case 1: 3228 if wireType != 2 { 3229 return fmt.Errorf("proto: wrong wireType = %d for field Arr", wireType) 3230 } 3231 var msglen int 3232 for shift := uint(0); ; shift += 7 { 3233 if shift >= 64 { 3234 return ErrIntOverflowPoint 3235 } 3236 if iNdEx >= l { 3237 return io.ErrUnexpectedEOF 3238 } 3239 b := dAtA[iNdEx] 3240 iNdEx++ 3241 msglen |= int(b&0x7F) << shift 3242 if b < 0x80 { 3243 break 3244 } 3245 } 3246 if msglen < 0 { 3247 return ErrInvalidLengthPoint 3248 } 3249 postIndex := iNdEx + msglen 3250 if postIndex < 0 { 3251 return ErrInvalidLengthPoint 3252 } 3253 if postIndex > l { 3254 return io.ErrUnexpectedEOF 3255 } 3256 m.Arr = append(m.Arr, &BasicTypes{}) 3257 if err := m.Arr[len(m.Arr)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3258 return err 3259 } 3260 iNdEx = postIndex 3261 default: 3262 iNdEx = preIndex 3263 skippy, err := skipPoint(dAtA[iNdEx:]) 3264 if err != nil { 3265 return err 3266 } 3267 if (skippy < 0) || (iNdEx+skippy) < 0 { 3268 return ErrInvalidLengthPoint 3269 } 3270 if (iNdEx + skippy) > l { 3271 return io.ErrUnexpectedEOF 3272 } 3273 iNdEx += skippy 3274 } 3275 } 3276 3277 if iNdEx > l { 3278 return io.ErrUnexpectedEOF 3279 } 3280 return nil 3281 } 3282 func (m *Map) Unmarshal(dAtA []byte) error { 3283 l := len(dAtA) 3284 iNdEx := 0 3285 for iNdEx < l { 3286 preIndex := iNdEx 3287 var wire uint64 3288 for shift := uint(0); ; shift += 7 { 3289 if shift >= 64 { 3290 return ErrIntOverflowPoint 3291 } 3292 if iNdEx >= l { 3293 return io.ErrUnexpectedEOF 3294 } 3295 b := dAtA[iNdEx] 3296 iNdEx++ 3297 wire |= uint64(b&0x7F) << shift 3298 if b < 0x80 { 3299 break 3300 } 3301 } 3302 fieldNum := int32(wire >> 3) 3303 wireType := int(wire & 0x7) 3304 if wireType == 4 { 3305 return fmt.Errorf("proto: Map: wiretype end group for non-group") 3306 } 3307 if fieldNum <= 0 { 3308 return fmt.Errorf("proto: Map: illegal tag %d (wire type %d)", fieldNum, wire) 3309 } 3310 switch fieldNum { 3311 case 1: 3312 if wireType != 2 { 3313 return fmt.Errorf("proto: wrong wireType = %d for field Map", wireType) 3314 } 3315 var msglen int 3316 for shift := uint(0); ; shift += 7 { 3317 if shift >= 64 { 3318 return ErrIntOverflowPoint 3319 } 3320 if iNdEx >= l { 3321 return io.ErrUnexpectedEOF 3322 } 3323 b := dAtA[iNdEx] 3324 iNdEx++ 3325 msglen |= int(b&0x7F) << shift 3326 if b < 0x80 { 3327 break 3328 } 3329 } 3330 if msglen < 0 { 3331 return ErrInvalidLengthPoint 3332 } 3333 postIndex := iNdEx + msglen 3334 if postIndex < 0 { 3335 return ErrInvalidLengthPoint 3336 } 3337 if postIndex > l { 3338 return io.ErrUnexpectedEOF 3339 } 3340 if m.Map == nil { 3341 m.Map = make(map[string]*BasicTypes) 3342 } 3343 var mapkey string 3344 var mapvalue *BasicTypes 3345 for iNdEx < postIndex { 3346 entryPreIndex := iNdEx 3347 var wire uint64 3348 for shift := uint(0); ; shift += 7 { 3349 if shift >= 64 { 3350 return ErrIntOverflowPoint 3351 } 3352 if iNdEx >= l { 3353 return io.ErrUnexpectedEOF 3354 } 3355 b := dAtA[iNdEx] 3356 iNdEx++ 3357 wire |= uint64(b&0x7F) << shift 3358 if b < 0x80 { 3359 break 3360 } 3361 } 3362 fieldNum := int32(wire >> 3) 3363 if fieldNum == 1 { 3364 var stringLenmapkey uint64 3365 for shift := uint(0); ; shift += 7 { 3366 if shift >= 64 { 3367 return ErrIntOverflowPoint 3368 } 3369 if iNdEx >= l { 3370 return io.ErrUnexpectedEOF 3371 } 3372 b := dAtA[iNdEx] 3373 iNdEx++ 3374 stringLenmapkey |= uint64(b&0x7F) << shift 3375 if b < 0x80 { 3376 break 3377 } 3378 } 3379 intStringLenmapkey := int(stringLenmapkey) 3380 if intStringLenmapkey < 0 { 3381 return ErrInvalidLengthPoint 3382 } 3383 postStringIndexmapkey := iNdEx + intStringLenmapkey 3384 if postStringIndexmapkey < 0 { 3385 return ErrInvalidLengthPoint 3386 } 3387 if postStringIndexmapkey > l { 3388 return io.ErrUnexpectedEOF 3389 } 3390 mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) 3391 iNdEx = postStringIndexmapkey 3392 } else if fieldNum == 2 { 3393 var mapmsglen int 3394 for shift := uint(0); ; shift += 7 { 3395 if shift >= 64 { 3396 return ErrIntOverflowPoint 3397 } 3398 if iNdEx >= l { 3399 return io.ErrUnexpectedEOF 3400 } 3401 b := dAtA[iNdEx] 3402 iNdEx++ 3403 mapmsglen |= int(b&0x7F) << shift 3404 if b < 0x80 { 3405 break 3406 } 3407 } 3408 if mapmsglen < 0 { 3409 return ErrInvalidLengthPoint 3410 } 3411 postmsgIndex := iNdEx + mapmsglen 3412 if postmsgIndex < 0 { 3413 return ErrInvalidLengthPoint 3414 } 3415 if postmsgIndex > l { 3416 return io.ErrUnexpectedEOF 3417 } 3418 mapvalue = &BasicTypes{} 3419 if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { 3420 return err 3421 } 3422 iNdEx = postmsgIndex 3423 } else { 3424 iNdEx = entryPreIndex 3425 skippy, err := skipPoint(dAtA[iNdEx:]) 3426 if err != nil { 3427 return err 3428 } 3429 if (skippy < 0) || (iNdEx+skippy) < 0 { 3430 return ErrInvalidLengthPoint 3431 } 3432 if (iNdEx + skippy) > postIndex { 3433 return io.ErrUnexpectedEOF 3434 } 3435 iNdEx += skippy 3436 } 3437 } 3438 m.Map[mapkey] = mapvalue 3439 iNdEx = postIndex 3440 default: 3441 iNdEx = preIndex 3442 skippy, err := skipPoint(dAtA[iNdEx:]) 3443 if err != nil { 3444 return err 3445 } 3446 if (skippy < 0) || (iNdEx+skippy) < 0 { 3447 return ErrInvalidLengthPoint 3448 } 3449 if (iNdEx + skippy) > l { 3450 return io.ErrUnexpectedEOF 3451 } 3452 iNdEx += skippy 3453 } 3454 } 3455 3456 if iNdEx > l { 3457 return io.ErrUnexpectedEOF 3458 } 3459 return nil 3460 } 3461 func (m *Field) Unmarshal(dAtA []byte) error { 3462 l := len(dAtA) 3463 iNdEx := 0 3464 for iNdEx < l { 3465 preIndex := iNdEx 3466 var wire uint64 3467 for shift := uint(0); ; shift += 7 { 3468 if shift >= 64 { 3469 return ErrIntOverflowPoint 3470 } 3471 if iNdEx >= l { 3472 return io.ErrUnexpectedEOF 3473 } 3474 b := dAtA[iNdEx] 3475 iNdEx++ 3476 wire |= uint64(b&0x7F) << shift 3477 if b < 0x80 { 3478 break 3479 } 3480 } 3481 fieldNum := int32(wire >> 3) 3482 wireType := int(wire & 0x7) 3483 if wireType == 4 { 3484 return fmt.Errorf("proto: Field: wiretype end group for non-group") 3485 } 3486 if fieldNum <= 0 { 3487 return fmt.Errorf("proto: Field: illegal tag %d (wire type %d)", fieldNum, wire) 3488 } 3489 switch fieldNum { 3490 case 1: 3491 if wireType != 2 { 3492 return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) 3493 } 3494 var stringLen uint64 3495 for shift := uint(0); ; shift += 7 { 3496 if shift >= 64 { 3497 return ErrIntOverflowPoint 3498 } 3499 if iNdEx >= l { 3500 return io.ErrUnexpectedEOF 3501 } 3502 b := dAtA[iNdEx] 3503 iNdEx++ 3504 stringLen |= uint64(b&0x7F) << shift 3505 if b < 0x80 { 3506 break 3507 } 3508 } 3509 intStringLen := int(stringLen) 3510 if intStringLen < 0 { 3511 return ErrInvalidLengthPoint 3512 } 3513 postIndex := iNdEx + intStringLen 3514 if postIndex < 0 { 3515 return ErrInvalidLengthPoint 3516 } 3517 if postIndex > l { 3518 return io.ErrUnexpectedEOF 3519 } 3520 m.Key = string(dAtA[iNdEx:postIndex]) 3521 iNdEx = postIndex 3522 case 2: 3523 if wireType != 0 { 3524 return fmt.Errorf("proto: wrong wireType = %d for field I", wireType) 3525 } 3526 var v int64 3527 for shift := uint(0); ; shift += 7 { 3528 if shift >= 64 { 3529 return ErrIntOverflowPoint 3530 } 3531 if iNdEx >= l { 3532 return io.ErrUnexpectedEOF 3533 } 3534 b := dAtA[iNdEx] 3535 iNdEx++ 3536 v |= int64(b&0x7F) << shift 3537 if b < 0x80 { 3538 break 3539 } 3540 } 3541 m.Val = &Field_I{v} 3542 case 3: 3543 if wireType != 0 { 3544 return fmt.Errorf("proto: wrong wireType = %d for field U", wireType) 3545 } 3546 var v uint64 3547 for shift := uint(0); ; shift += 7 { 3548 if shift >= 64 { 3549 return ErrIntOverflowPoint 3550 } 3551 if iNdEx >= l { 3552 return io.ErrUnexpectedEOF 3553 } 3554 b := dAtA[iNdEx] 3555 iNdEx++ 3556 v |= uint64(b&0x7F) << shift 3557 if b < 0x80 { 3558 break 3559 } 3560 } 3561 m.Val = &Field_U{v} 3562 case 4: 3563 if wireType != 1 { 3564 return fmt.Errorf("proto: wrong wireType = %d for field F", wireType) 3565 } 3566 var v uint64 3567 if (iNdEx + 8) > l { 3568 return io.ErrUnexpectedEOF 3569 } 3570 v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) 3571 iNdEx += 8 3572 m.Val = &Field_F{float64(math.Float64frombits(v))} 3573 case 5: 3574 if wireType != 0 { 3575 return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) 3576 } 3577 var v int 3578 for shift := uint(0); ; shift += 7 { 3579 if shift >= 64 { 3580 return ErrIntOverflowPoint 3581 } 3582 if iNdEx >= l { 3583 return io.ErrUnexpectedEOF 3584 } 3585 b := dAtA[iNdEx] 3586 iNdEx++ 3587 v |= int(b&0x7F) << shift 3588 if b < 0x80 { 3589 break 3590 } 3591 } 3592 b := bool(v != 0) 3593 m.Val = &Field_B{b} 3594 case 6: 3595 if wireType != 2 { 3596 return fmt.Errorf("proto: wrong wireType = %d for field D", wireType) 3597 } 3598 var byteLen int 3599 for shift := uint(0); ; shift += 7 { 3600 if shift >= 64 { 3601 return ErrIntOverflowPoint 3602 } 3603 if iNdEx >= l { 3604 return io.ErrUnexpectedEOF 3605 } 3606 b := dAtA[iNdEx] 3607 iNdEx++ 3608 byteLen |= int(b&0x7F) << shift 3609 if b < 0x80 { 3610 break 3611 } 3612 } 3613 if byteLen < 0 { 3614 return ErrInvalidLengthPoint 3615 } 3616 postIndex := iNdEx + byteLen 3617 if postIndex < 0 { 3618 return ErrInvalidLengthPoint 3619 } 3620 if postIndex > l { 3621 return io.ErrUnexpectedEOF 3622 } 3623 v := make([]byte, postIndex-iNdEx) 3624 copy(v, dAtA[iNdEx:postIndex]) 3625 m.Val = &Field_D{v} 3626 iNdEx = postIndex 3627 case 7: 3628 if wireType != 2 { 3629 return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) 3630 } 3631 var msglen int 3632 for shift := uint(0); ; shift += 7 { 3633 if shift >= 64 { 3634 return ErrIntOverflowPoint 3635 } 3636 if iNdEx >= l { 3637 return io.ErrUnexpectedEOF 3638 } 3639 b := dAtA[iNdEx] 3640 iNdEx++ 3641 msglen |= int(b&0x7F) << shift 3642 if b < 0x80 { 3643 break 3644 } 3645 } 3646 if msglen < 0 { 3647 return ErrInvalidLengthPoint 3648 } 3649 postIndex := iNdEx + msglen 3650 if postIndex < 0 { 3651 return ErrInvalidLengthPoint 3652 } 3653 if postIndex > l { 3654 return io.ErrUnexpectedEOF 3655 } 3656 v := &types.Any{} 3657 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3658 return err 3659 } 3660 m.Val = &Field_A{v} 3661 iNdEx = postIndex 3662 case 8: 3663 if wireType != 0 { 3664 return fmt.Errorf("proto: wrong wireType = %d for field IsTag", wireType) 3665 } 3666 var v int 3667 for shift := uint(0); ; shift += 7 { 3668 if shift >= 64 { 3669 return ErrIntOverflowPoint 3670 } 3671 if iNdEx >= l { 3672 return io.ErrUnexpectedEOF 3673 } 3674 b := dAtA[iNdEx] 3675 iNdEx++ 3676 v |= int(b&0x7F) << shift 3677 if b < 0x80 { 3678 break 3679 } 3680 } 3681 m.IsTag = bool(v != 0) 3682 case 9: 3683 if wireType != 0 { 3684 return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) 3685 } 3686 m.Type = 0 3687 for shift := uint(0); ; shift += 7 { 3688 if shift >= 64 { 3689 return ErrIntOverflowPoint 3690 } 3691 if iNdEx >= l { 3692 return io.ErrUnexpectedEOF 3693 } 3694 b := dAtA[iNdEx] 3695 iNdEx++ 3696 m.Type |= MetricType(b&0x7F) << shift 3697 if b < 0x80 { 3698 break 3699 } 3700 } 3701 case 10: 3702 if wireType != 2 { 3703 return fmt.Errorf("proto: wrong wireType = %d for field Unit", wireType) 3704 } 3705 var stringLen uint64 3706 for shift := uint(0); ; shift += 7 { 3707 if shift >= 64 { 3708 return ErrIntOverflowPoint 3709 } 3710 if iNdEx >= l { 3711 return io.ErrUnexpectedEOF 3712 } 3713 b := dAtA[iNdEx] 3714 iNdEx++ 3715 stringLen |= uint64(b&0x7F) << shift 3716 if b < 0x80 { 3717 break 3718 } 3719 } 3720 intStringLen := int(stringLen) 3721 if intStringLen < 0 { 3722 return ErrInvalidLengthPoint 3723 } 3724 postIndex := iNdEx + intStringLen 3725 if postIndex < 0 { 3726 return ErrInvalidLengthPoint 3727 } 3728 if postIndex > l { 3729 return io.ErrUnexpectedEOF 3730 } 3731 m.Unit = string(dAtA[iNdEx:postIndex]) 3732 iNdEx = postIndex 3733 case 11: 3734 if wireType != 2 { 3735 return fmt.Errorf("proto: wrong wireType = %d for field S", wireType) 3736 } 3737 var stringLen uint64 3738 for shift := uint(0); ; shift += 7 { 3739 if shift >= 64 { 3740 return ErrIntOverflowPoint 3741 } 3742 if iNdEx >= l { 3743 return io.ErrUnexpectedEOF 3744 } 3745 b := dAtA[iNdEx] 3746 iNdEx++ 3747 stringLen |= uint64(b&0x7F) << shift 3748 if b < 0x80 { 3749 break 3750 } 3751 } 3752 intStringLen := int(stringLen) 3753 if intStringLen < 0 { 3754 return ErrInvalidLengthPoint 3755 } 3756 postIndex := iNdEx + intStringLen 3757 if postIndex < 0 { 3758 return ErrInvalidLengthPoint 3759 } 3760 if postIndex > l { 3761 return io.ErrUnexpectedEOF 3762 } 3763 m.Val = &Field_S{string(dAtA[iNdEx:postIndex])} 3764 iNdEx = postIndex 3765 default: 3766 iNdEx = preIndex 3767 skippy, err := skipPoint(dAtA[iNdEx:]) 3768 if err != nil { 3769 return err 3770 } 3771 if (skippy < 0) || (iNdEx+skippy) < 0 { 3772 return ErrInvalidLengthPoint 3773 } 3774 if (iNdEx + skippy) > l { 3775 return io.ErrUnexpectedEOF 3776 } 3777 iNdEx += skippy 3778 } 3779 } 3780 3781 if iNdEx > l { 3782 return io.ErrUnexpectedEOF 3783 } 3784 return nil 3785 } 3786 func (m *Warn) Unmarshal(dAtA []byte) error { 3787 l := len(dAtA) 3788 iNdEx := 0 3789 for iNdEx < l { 3790 preIndex := iNdEx 3791 var wire uint64 3792 for shift := uint(0); ; shift += 7 { 3793 if shift >= 64 { 3794 return ErrIntOverflowPoint 3795 } 3796 if iNdEx >= l { 3797 return io.ErrUnexpectedEOF 3798 } 3799 b := dAtA[iNdEx] 3800 iNdEx++ 3801 wire |= uint64(b&0x7F) << shift 3802 if b < 0x80 { 3803 break 3804 } 3805 } 3806 fieldNum := int32(wire >> 3) 3807 wireType := int(wire & 0x7) 3808 if wireType == 4 { 3809 return fmt.Errorf("proto: Warn: wiretype end group for non-group") 3810 } 3811 if fieldNum <= 0 { 3812 return fmt.Errorf("proto: Warn: illegal tag %d (wire type %d)", fieldNum, wire) 3813 } 3814 switch fieldNum { 3815 case 1: 3816 if wireType != 2 { 3817 return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) 3818 } 3819 var stringLen uint64 3820 for shift := uint(0); ; shift += 7 { 3821 if shift >= 64 { 3822 return ErrIntOverflowPoint 3823 } 3824 if iNdEx >= l { 3825 return io.ErrUnexpectedEOF 3826 } 3827 b := dAtA[iNdEx] 3828 iNdEx++ 3829 stringLen |= uint64(b&0x7F) << shift 3830 if b < 0x80 { 3831 break 3832 } 3833 } 3834 intStringLen := int(stringLen) 3835 if intStringLen < 0 { 3836 return ErrInvalidLengthPoint 3837 } 3838 postIndex := iNdEx + intStringLen 3839 if postIndex < 0 { 3840 return ErrInvalidLengthPoint 3841 } 3842 if postIndex > l { 3843 return io.ErrUnexpectedEOF 3844 } 3845 m.Type = string(dAtA[iNdEx:postIndex]) 3846 iNdEx = postIndex 3847 case 2: 3848 if wireType != 2 { 3849 return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) 3850 } 3851 var stringLen uint64 3852 for shift := uint(0); ; shift += 7 { 3853 if shift >= 64 { 3854 return ErrIntOverflowPoint 3855 } 3856 if iNdEx >= l { 3857 return io.ErrUnexpectedEOF 3858 } 3859 b := dAtA[iNdEx] 3860 iNdEx++ 3861 stringLen |= uint64(b&0x7F) << shift 3862 if b < 0x80 { 3863 break 3864 } 3865 } 3866 intStringLen := int(stringLen) 3867 if intStringLen < 0 { 3868 return ErrInvalidLengthPoint 3869 } 3870 postIndex := iNdEx + intStringLen 3871 if postIndex < 0 { 3872 return ErrInvalidLengthPoint 3873 } 3874 if postIndex > l { 3875 return io.ErrUnexpectedEOF 3876 } 3877 m.Msg = string(dAtA[iNdEx:postIndex]) 3878 iNdEx = postIndex 3879 default: 3880 iNdEx = preIndex 3881 skippy, err := skipPoint(dAtA[iNdEx:]) 3882 if err != nil { 3883 return err 3884 } 3885 if (skippy < 0) || (iNdEx+skippy) < 0 { 3886 return ErrInvalidLengthPoint 3887 } 3888 if (iNdEx + skippy) > l { 3889 return io.ErrUnexpectedEOF 3890 } 3891 iNdEx += skippy 3892 } 3893 } 3894 3895 if iNdEx > l { 3896 return io.ErrUnexpectedEOF 3897 } 3898 return nil 3899 } 3900 func (m *PBPoint) Unmarshal(dAtA []byte) error { 3901 l := len(dAtA) 3902 iNdEx := 0 3903 for iNdEx < l { 3904 preIndex := iNdEx 3905 var wire uint64 3906 for shift := uint(0); ; shift += 7 { 3907 if shift >= 64 { 3908 return ErrIntOverflowPoint 3909 } 3910 if iNdEx >= l { 3911 return io.ErrUnexpectedEOF 3912 } 3913 b := dAtA[iNdEx] 3914 iNdEx++ 3915 wire |= uint64(b&0x7F) << shift 3916 if b < 0x80 { 3917 break 3918 } 3919 } 3920 fieldNum := int32(wire >> 3) 3921 wireType := int(wire & 0x7) 3922 if wireType == 4 { 3923 return fmt.Errorf("proto: PBPoint: wiretype end group for non-group") 3924 } 3925 if fieldNum <= 0 { 3926 return fmt.Errorf("proto: PBPoint: illegal tag %d (wire type %d)", fieldNum, wire) 3927 } 3928 switch fieldNum { 3929 case 1: 3930 if wireType != 2 { 3931 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) 3932 } 3933 var stringLen uint64 3934 for shift := uint(0); ; shift += 7 { 3935 if shift >= 64 { 3936 return ErrIntOverflowPoint 3937 } 3938 if iNdEx >= l { 3939 return io.ErrUnexpectedEOF 3940 } 3941 b := dAtA[iNdEx] 3942 iNdEx++ 3943 stringLen |= uint64(b&0x7F) << shift 3944 if b < 0x80 { 3945 break 3946 } 3947 } 3948 intStringLen := int(stringLen) 3949 if intStringLen < 0 { 3950 return ErrInvalidLengthPoint 3951 } 3952 postIndex := iNdEx + intStringLen 3953 if postIndex < 0 { 3954 return ErrInvalidLengthPoint 3955 } 3956 if postIndex > l { 3957 return io.ErrUnexpectedEOF 3958 } 3959 m.Name = string(dAtA[iNdEx:postIndex]) 3960 iNdEx = postIndex 3961 case 2: 3962 if wireType != 2 { 3963 return fmt.Errorf("proto: wrong wireType = %d for field Fields", wireType) 3964 } 3965 var msglen int 3966 for shift := uint(0); ; shift += 7 { 3967 if shift >= 64 { 3968 return ErrIntOverflowPoint 3969 } 3970 if iNdEx >= l { 3971 return io.ErrUnexpectedEOF 3972 } 3973 b := dAtA[iNdEx] 3974 iNdEx++ 3975 msglen |= int(b&0x7F) << shift 3976 if b < 0x80 { 3977 break 3978 } 3979 } 3980 if msglen < 0 { 3981 return ErrInvalidLengthPoint 3982 } 3983 postIndex := iNdEx + msglen 3984 if postIndex < 0 { 3985 return ErrInvalidLengthPoint 3986 } 3987 if postIndex > l { 3988 return io.ErrUnexpectedEOF 3989 } 3990 m.Fields = append(m.Fields, &Field{}) 3991 if err := m.Fields[len(m.Fields)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3992 return err 3993 } 3994 iNdEx = postIndex 3995 case 3: 3996 if wireType != 0 { 3997 return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType) 3998 } 3999 m.Time = 0 4000 for shift := uint(0); ; shift += 7 { 4001 if shift >= 64 { 4002 return ErrIntOverflowPoint 4003 } 4004 if iNdEx >= l { 4005 return io.ErrUnexpectedEOF 4006 } 4007 b := dAtA[iNdEx] 4008 iNdEx++ 4009 m.Time |= int64(b&0x7F) << shift 4010 if b < 0x80 { 4011 break 4012 } 4013 } 4014 case 4: 4015 if wireType != 2 { 4016 return fmt.Errorf("proto: wrong wireType = %d for field Warns", wireType) 4017 } 4018 var msglen int 4019 for shift := uint(0); ; shift += 7 { 4020 if shift >= 64 { 4021 return ErrIntOverflowPoint 4022 } 4023 if iNdEx >= l { 4024 return io.ErrUnexpectedEOF 4025 } 4026 b := dAtA[iNdEx] 4027 iNdEx++ 4028 msglen |= int(b&0x7F) << shift 4029 if b < 0x80 { 4030 break 4031 } 4032 } 4033 if msglen < 0 { 4034 return ErrInvalidLengthPoint 4035 } 4036 postIndex := iNdEx + msglen 4037 if postIndex < 0 { 4038 return ErrInvalidLengthPoint 4039 } 4040 if postIndex > l { 4041 return io.ErrUnexpectedEOF 4042 } 4043 m.Warns = append(m.Warns, &Warn{}) 4044 if err := m.Warns[len(m.Warns)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 4045 return err 4046 } 4047 iNdEx = postIndex 4048 case 5: 4049 if wireType != 2 { 4050 return fmt.Errorf("proto: wrong wireType = %d for field Debugs", wireType) 4051 } 4052 var msglen int 4053 for shift := uint(0); ; shift += 7 { 4054 if shift >= 64 { 4055 return ErrIntOverflowPoint 4056 } 4057 if iNdEx >= l { 4058 return io.ErrUnexpectedEOF 4059 } 4060 b := dAtA[iNdEx] 4061 iNdEx++ 4062 msglen |= int(b&0x7F) << shift 4063 if b < 0x80 { 4064 break 4065 } 4066 } 4067 if msglen < 0 { 4068 return ErrInvalidLengthPoint 4069 } 4070 postIndex := iNdEx + msglen 4071 if postIndex < 0 { 4072 return ErrInvalidLengthPoint 4073 } 4074 if postIndex > l { 4075 return io.ErrUnexpectedEOF 4076 } 4077 m.Debugs = append(m.Debugs, &Debug{}) 4078 if err := m.Debugs[len(m.Debugs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 4079 return err 4080 } 4081 iNdEx = postIndex 4082 default: 4083 iNdEx = preIndex 4084 skippy, err := skipPoint(dAtA[iNdEx:]) 4085 if err != nil { 4086 return err 4087 } 4088 if (skippy < 0) || (iNdEx+skippy) < 0 { 4089 return ErrInvalidLengthPoint 4090 } 4091 if (iNdEx + skippy) > l { 4092 return io.ErrUnexpectedEOF 4093 } 4094 iNdEx += skippy 4095 } 4096 } 4097 4098 if iNdEx > l { 4099 return io.ErrUnexpectedEOF 4100 } 4101 return nil 4102 } 4103 func (m *PBPoints) Unmarshal(dAtA []byte) error { 4104 l := len(dAtA) 4105 iNdEx := 0 4106 for iNdEx < l { 4107 preIndex := iNdEx 4108 var wire uint64 4109 for shift := uint(0); ; shift += 7 { 4110 if shift >= 64 { 4111 return ErrIntOverflowPoint 4112 } 4113 if iNdEx >= l { 4114 return io.ErrUnexpectedEOF 4115 } 4116 b := dAtA[iNdEx] 4117 iNdEx++ 4118 wire |= uint64(b&0x7F) << shift 4119 if b < 0x80 { 4120 break 4121 } 4122 } 4123 fieldNum := int32(wire >> 3) 4124 wireType := int(wire & 0x7) 4125 if wireType == 4 { 4126 return fmt.Errorf("proto: PBPoints: wiretype end group for non-group") 4127 } 4128 if fieldNum <= 0 { 4129 return fmt.Errorf("proto: PBPoints: illegal tag %d (wire type %d)", fieldNum, wire) 4130 } 4131 switch fieldNum { 4132 case 1: 4133 if wireType != 2 { 4134 return fmt.Errorf("proto: wrong wireType = %d for field Arr", wireType) 4135 } 4136 var msglen int 4137 for shift := uint(0); ; shift += 7 { 4138 if shift >= 64 { 4139 return ErrIntOverflowPoint 4140 } 4141 if iNdEx >= l { 4142 return io.ErrUnexpectedEOF 4143 } 4144 b := dAtA[iNdEx] 4145 iNdEx++ 4146 msglen |= int(b&0x7F) << shift 4147 if b < 0x80 { 4148 break 4149 } 4150 } 4151 if msglen < 0 { 4152 return ErrInvalidLengthPoint 4153 } 4154 postIndex := iNdEx + msglen 4155 if postIndex < 0 { 4156 return ErrInvalidLengthPoint 4157 } 4158 if postIndex > l { 4159 return io.ErrUnexpectedEOF 4160 } 4161 m.Arr = append(m.Arr, &PBPoint{}) 4162 if err := m.Arr[len(m.Arr)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 4163 return err 4164 } 4165 iNdEx = postIndex 4166 default: 4167 iNdEx = preIndex 4168 skippy, err := skipPoint(dAtA[iNdEx:]) 4169 if err != nil { 4170 return err 4171 } 4172 if (skippy < 0) || (iNdEx+skippy) < 0 { 4173 return ErrInvalidLengthPoint 4174 } 4175 if (iNdEx + skippy) > l { 4176 return io.ErrUnexpectedEOF 4177 } 4178 iNdEx += skippy 4179 } 4180 } 4181 4182 if iNdEx > l { 4183 return io.ErrUnexpectedEOF 4184 } 4185 return nil 4186 } 4187 func skipPoint(dAtA []byte) (n int, err error) { 4188 l := len(dAtA) 4189 iNdEx := 0 4190 depth := 0 4191 for iNdEx < l { 4192 var wire uint64 4193 for shift := uint(0); ; shift += 7 { 4194 if shift >= 64 { 4195 return 0, ErrIntOverflowPoint 4196 } 4197 if iNdEx >= l { 4198 return 0, io.ErrUnexpectedEOF 4199 } 4200 b := dAtA[iNdEx] 4201 iNdEx++ 4202 wire |= (uint64(b) & 0x7F) << shift 4203 if b < 0x80 { 4204 break 4205 } 4206 } 4207 wireType := int(wire & 0x7) 4208 switch wireType { 4209 case 0: 4210 for shift := uint(0); ; shift += 7 { 4211 if shift >= 64 { 4212 return 0, ErrIntOverflowPoint 4213 } 4214 if iNdEx >= l { 4215 return 0, io.ErrUnexpectedEOF 4216 } 4217 iNdEx++ 4218 if dAtA[iNdEx-1] < 0x80 { 4219 break 4220 } 4221 } 4222 case 1: 4223 iNdEx += 8 4224 case 2: 4225 var length int 4226 for shift := uint(0); ; shift += 7 { 4227 if shift >= 64 { 4228 return 0, ErrIntOverflowPoint 4229 } 4230 if iNdEx >= l { 4231 return 0, io.ErrUnexpectedEOF 4232 } 4233 b := dAtA[iNdEx] 4234 iNdEx++ 4235 length |= (int(b) & 0x7F) << shift 4236 if b < 0x80 { 4237 break 4238 } 4239 } 4240 if length < 0 { 4241 return 0, ErrInvalidLengthPoint 4242 } 4243 iNdEx += length 4244 case 3: 4245 depth++ 4246 case 4: 4247 if depth == 0 { 4248 return 0, ErrUnexpectedEndOfGroupPoint 4249 } 4250 depth-- 4251 case 5: 4252 iNdEx += 4 4253 default: 4254 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 4255 } 4256 if iNdEx < 0 { 4257 return 0, ErrInvalidLengthPoint 4258 } 4259 if depth == 0 { 4260 return iNdEx, nil 4261 } 4262 } 4263 return 0, io.ErrUnexpectedEOF 4264 } 4265 4266 var ( 4267 ErrInvalidLengthPoint = fmt.Errorf("proto: negative length found during unmarshaling") 4268 ErrIntOverflowPoint = fmt.Errorf("proto: integer overflow") 4269 ErrUnexpectedEndOfGroupPoint = fmt.Errorf("proto: unexpected end of group") 4270 )