github.com/adoriasoft/tendermint@v0.34.0-dev1.0.20200722151356-96d84601a75a/proto/tendermint/crypto/keys.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: tendermint/crypto/keys.proto 3 4 package crypto 5 6 import ( 7 bytes "bytes" 8 fmt "fmt" 9 _ "github.com/gogo/protobuf/gogoproto" 10 proto "github.com/gogo/protobuf/proto" 11 io "io" 12 math "math" 13 math_bits "math/bits" 14 ) 15 16 // Reference imports to suppress errors if they are not otherwise used. 17 var _ = proto.Marshal 18 var _ = fmt.Errorf 19 var _ = math.Inf 20 21 // This is a compile-time assertion to ensure that this generated file 22 // is compatible with the proto package it is being compiled against. 23 // A compilation error at this line likely means your copy of the 24 // proto package needs to be updated. 25 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 26 27 // PublicKey defines the keys available for use with Tendermint Validators 28 type PublicKey struct { 29 // Types that are valid to be assigned to Sum: 30 // *PublicKey_Ed25519 31 Sum isPublicKey_Sum `protobuf_oneof:"sum"` 32 } 33 34 func (m *PublicKey) Reset() { *m = PublicKey{} } 35 func (m *PublicKey) String() string { return proto.CompactTextString(m) } 36 func (*PublicKey) ProtoMessage() {} 37 func (*PublicKey) Descriptor() ([]byte, []int) { 38 return fileDescriptor_cb048658b234868c, []int{0} 39 } 40 func (m *PublicKey) XXX_Unmarshal(b []byte) error { 41 return m.Unmarshal(b) 42 } 43 func (m *PublicKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 44 if deterministic { 45 return xxx_messageInfo_PublicKey.Marshal(b, m, deterministic) 46 } else { 47 b = b[:cap(b)] 48 n, err := m.MarshalToSizedBuffer(b) 49 if err != nil { 50 return nil, err 51 } 52 return b[:n], nil 53 } 54 } 55 func (m *PublicKey) XXX_Merge(src proto.Message) { 56 xxx_messageInfo_PublicKey.Merge(m, src) 57 } 58 func (m *PublicKey) XXX_Size() int { 59 return m.Size() 60 } 61 func (m *PublicKey) XXX_DiscardUnknown() { 62 xxx_messageInfo_PublicKey.DiscardUnknown(m) 63 } 64 65 var xxx_messageInfo_PublicKey proto.InternalMessageInfo 66 67 type isPublicKey_Sum interface { 68 isPublicKey_Sum() 69 Equal(interface{}) bool 70 MarshalTo([]byte) (int, error) 71 Size() int 72 Compare(interface{}) int 73 } 74 75 type PublicKey_Ed25519 struct { 76 Ed25519 []byte `protobuf:"bytes,1,opt,name=ed25519,proto3,oneof" json:"ed25519,omitempty"` 77 } 78 79 func (*PublicKey_Ed25519) isPublicKey_Sum() {} 80 81 func (m *PublicKey) GetSum() isPublicKey_Sum { 82 if m != nil { 83 return m.Sum 84 } 85 return nil 86 } 87 88 func (m *PublicKey) GetEd25519() []byte { 89 if x, ok := m.GetSum().(*PublicKey_Ed25519); ok { 90 return x.Ed25519 91 } 92 return nil 93 } 94 95 // XXX_OneofWrappers is for the internal use of the proto package. 96 func (*PublicKey) XXX_OneofWrappers() []interface{} { 97 return []interface{}{ 98 (*PublicKey_Ed25519)(nil), 99 } 100 } 101 102 // PrivateKey defines the keys available for use with Tendermint Validators 103 // WARNING PrivateKey is used for internal purposes only 104 type PrivateKey struct { 105 // Types that are valid to be assigned to Sum: 106 // *PrivateKey_Ed25519 107 Sum isPrivateKey_Sum `protobuf_oneof:"sum"` 108 } 109 110 func (m *PrivateKey) Reset() { *m = PrivateKey{} } 111 func (m *PrivateKey) String() string { return proto.CompactTextString(m) } 112 func (*PrivateKey) ProtoMessage() {} 113 func (*PrivateKey) Descriptor() ([]byte, []int) { 114 return fileDescriptor_cb048658b234868c, []int{1} 115 } 116 func (m *PrivateKey) XXX_Unmarshal(b []byte) error { 117 return m.Unmarshal(b) 118 } 119 func (m *PrivateKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 120 if deterministic { 121 return xxx_messageInfo_PrivateKey.Marshal(b, m, deterministic) 122 } else { 123 b = b[:cap(b)] 124 n, err := m.MarshalToSizedBuffer(b) 125 if err != nil { 126 return nil, err 127 } 128 return b[:n], nil 129 } 130 } 131 func (m *PrivateKey) XXX_Merge(src proto.Message) { 132 xxx_messageInfo_PrivateKey.Merge(m, src) 133 } 134 func (m *PrivateKey) XXX_Size() int { 135 return m.Size() 136 } 137 func (m *PrivateKey) XXX_DiscardUnknown() { 138 xxx_messageInfo_PrivateKey.DiscardUnknown(m) 139 } 140 141 var xxx_messageInfo_PrivateKey proto.InternalMessageInfo 142 143 type isPrivateKey_Sum interface { 144 isPrivateKey_Sum() 145 MarshalTo([]byte) (int, error) 146 Size() int 147 } 148 149 type PrivateKey_Ed25519 struct { 150 Ed25519 []byte `protobuf:"bytes,1,opt,name=ed25519,proto3,oneof" json:"ed25519,omitempty"` 151 } 152 153 func (*PrivateKey_Ed25519) isPrivateKey_Sum() {} 154 155 func (m *PrivateKey) GetSum() isPrivateKey_Sum { 156 if m != nil { 157 return m.Sum 158 } 159 return nil 160 } 161 162 func (m *PrivateKey) GetEd25519() []byte { 163 if x, ok := m.GetSum().(*PrivateKey_Ed25519); ok { 164 return x.Ed25519 165 } 166 return nil 167 } 168 169 // XXX_OneofWrappers is for the internal use of the proto package. 170 func (*PrivateKey) XXX_OneofWrappers() []interface{} { 171 return []interface{}{ 172 (*PrivateKey_Ed25519)(nil), 173 } 174 } 175 176 func init() { 177 proto.RegisterType((*PublicKey)(nil), "tendermint.crypto.PublicKey") 178 proto.RegisterType((*PrivateKey)(nil), "tendermint.crypto.PrivateKey") 179 } 180 181 func init() { proto.RegisterFile("tendermint/crypto/keys.proto", fileDescriptor_cb048658b234868c) } 182 183 var fileDescriptor_cb048658b234868c = []byte{ 184 // 204 bytes of a gzipped FileDescriptorProto 185 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x29, 0x49, 0xcd, 0x4b, 186 0x49, 0x2d, 0xca, 0xcd, 0xcc, 0x2b, 0xd1, 0x4f, 0x2e, 0xaa, 0x2c, 0x28, 0xc9, 0xd7, 0xcf, 0x4e, 187 0xad, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x44, 0xc8, 0xea, 0x41, 0x64, 0xa5, 188 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0xb2, 0xfa, 0x20, 0x16, 0x44, 0xa1, 0x92, 0x05, 0x17, 0x67, 189 0x40, 0x69, 0x52, 0x4e, 0x66, 0xb2, 0x77, 0x6a, 0xa5, 0x90, 0x14, 0x17, 0x7b, 0x6a, 0x8a, 0x91, 190 0xa9, 0xa9, 0xa1, 0xa5, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x8f, 0x07, 0x43, 0x10, 0x4c, 0xc0, 0x8a, 191 0xe3, 0xc5, 0x02, 0x79, 0xc6, 0x17, 0x0b, 0xe5, 0x19, 0x9d, 0x58, 0xb9, 0x98, 0x8b, 0x4b, 0x73, 192 0x95, 0xf4, 0xb9, 0xb8, 0x02, 0x8a, 0x32, 0xcb, 0x12, 0x4b, 0x52, 0x09, 0x68, 0x85, 0x6a, 0x70, 193 0x0a, 0x3a, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 194 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0x8b, 0xf4, 0xcc, 0x92, 195 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0xfd, 0xc4, 0x94, 0xfc, 0xa2, 0xcc, 0xc4, 0xe2, 0xfc, 196 0xb4, 0x12, 0x7d, 0x24, 0x1f, 0x42, 0xdc, 0x8d, 0xe1, 0xe5, 0x24, 0x36, 0xb0, 0x84, 0x31, 0x20, 197 0x00, 0x00, 0xff, 0xff, 0x29, 0xf8, 0xbc, 0x15, 0x0e, 0x01, 0x00, 0x00, 198 } 199 200 func (this *PublicKey) Compare(that interface{}) int { 201 if that == nil { 202 if this == nil { 203 return 0 204 } 205 return 1 206 } 207 208 that1, ok := that.(*PublicKey) 209 if !ok { 210 that2, ok := that.(PublicKey) 211 if ok { 212 that1 = &that2 213 } else { 214 return 1 215 } 216 } 217 if that1 == nil { 218 if this == nil { 219 return 0 220 } 221 return 1 222 } else if this == nil { 223 return -1 224 } 225 if that1.Sum == nil { 226 if this.Sum != nil { 227 return 1 228 } 229 } else if this.Sum == nil { 230 return -1 231 } else { 232 thisType := -1 233 switch this.Sum.(type) { 234 case *PublicKey_Ed25519: 235 thisType = 0 236 default: 237 panic(fmt.Sprintf("compare: unexpected type %T in oneof", this.Sum)) 238 } 239 that1Type := -1 240 switch that1.Sum.(type) { 241 case *PublicKey_Ed25519: 242 that1Type = 0 243 default: 244 panic(fmt.Sprintf("compare: unexpected type %T in oneof", that1.Sum)) 245 } 246 if thisType == that1Type { 247 if c := this.Sum.Compare(that1.Sum); c != 0 { 248 return c 249 } 250 } else if thisType < that1Type { 251 return -1 252 } else if thisType > that1Type { 253 return 1 254 } 255 } 256 return 0 257 } 258 func (this *PublicKey_Ed25519) Compare(that interface{}) int { 259 if that == nil { 260 if this == nil { 261 return 0 262 } 263 return 1 264 } 265 266 that1, ok := that.(*PublicKey_Ed25519) 267 if !ok { 268 that2, ok := that.(PublicKey_Ed25519) 269 if ok { 270 that1 = &that2 271 } else { 272 return 1 273 } 274 } 275 if that1 == nil { 276 if this == nil { 277 return 0 278 } 279 return 1 280 } else if this == nil { 281 return -1 282 } 283 if c := bytes.Compare(this.Ed25519, that1.Ed25519); c != 0 { 284 return c 285 } 286 return 0 287 } 288 func (this *PublicKey) Equal(that interface{}) bool { 289 if that == nil { 290 return this == nil 291 } 292 293 that1, ok := that.(*PublicKey) 294 if !ok { 295 that2, ok := that.(PublicKey) 296 if ok { 297 that1 = &that2 298 } else { 299 return false 300 } 301 } 302 if that1 == nil { 303 return this == nil 304 } else if this == nil { 305 return false 306 } 307 if that1.Sum == nil { 308 if this.Sum != nil { 309 return false 310 } 311 } else if this.Sum == nil { 312 return false 313 } else if !this.Sum.Equal(that1.Sum) { 314 return false 315 } 316 return true 317 } 318 func (this *PublicKey_Ed25519) Equal(that interface{}) bool { 319 if that == nil { 320 return this == nil 321 } 322 323 that1, ok := that.(*PublicKey_Ed25519) 324 if !ok { 325 that2, ok := that.(PublicKey_Ed25519) 326 if ok { 327 that1 = &that2 328 } else { 329 return false 330 } 331 } 332 if that1 == nil { 333 return this == nil 334 } else if this == nil { 335 return false 336 } 337 if !bytes.Equal(this.Ed25519, that1.Ed25519) { 338 return false 339 } 340 return true 341 } 342 func (m *PublicKey) Marshal() (dAtA []byte, err error) { 343 size := m.Size() 344 dAtA = make([]byte, size) 345 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 346 if err != nil { 347 return nil, err 348 } 349 return dAtA[:n], nil 350 } 351 352 func (m *PublicKey) MarshalTo(dAtA []byte) (int, error) { 353 size := m.Size() 354 return m.MarshalToSizedBuffer(dAtA[:size]) 355 } 356 357 func (m *PublicKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { 358 i := len(dAtA) 359 _ = i 360 var l int 361 _ = l 362 if m.Sum != nil { 363 { 364 size := m.Sum.Size() 365 i -= size 366 if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil { 367 return 0, err 368 } 369 } 370 } 371 return len(dAtA) - i, nil 372 } 373 374 func (m *PublicKey_Ed25519) MarshalTo(dAtA []byte) (int, error) { 375 size := m.Size() 376 return m.MarshalToSizedBuffer(dAtA[:size]) 377 } 378 379 func (m *PublicKey_Ed25519) MarshalToSizedBuffer(dAtA []byte) (int, error) { 380 i := len(dAtA) 381 if m.Ed25519 != nil { 382 i -= len(m.Ed25519) 383 copy(dAtA[i:], m.Ed25519) 384 i = encodeVarintKeys(dAtA, i, uint64(len(m.Ed25519))) 385 i-- 386 dAtA[i] = 0xa 387 } 388 return len(dAtA) - i, nil 389 } 390 func (m *PrivateKey) Marshal() (dAtA []byte, err error) { 391 size := m.Size() 392 dAtA = make([]byte, size) 393 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 394 if err != nil { 395 return nil, err 396 } 397 return dAtA[:n], nil 398 } 399 400 func (m *PrivateKey) MarshalTo(dAtA []byte) (int, error) { 401 size := m.Size() 402 return m.MarshalToSizedBuffer(dAtA[:size]) 403 } 404 405 func (m *PrivateKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { 406 i := len(dAtA) 407 _ = i 408 var l int 409 _ = l 410 if m.Sum != nil { 411 { 412 size := m.Sum.Size() 413 i -= size 414 if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil { 415 return 0, err 416 } 417 } 418 } 419 return len(dAtA) - i, nil 420 } 421 422 func (m *PrivateKey_Ed25519) MarshalTo(dAtA []byte) (int, error) { 423 size := m.Size() 424 return m.MarshalToSizedBuffer(dAtA[:size]) 425 } 426 427 func (m *PrivateKey_Ed25519) MarshalToSizedBuffer(dAtA []byte) (int, error) { 428 i := len(dAtA) 429 if m.Ed25519 != nil { 430 i -= len(m.Ed25519) 431 copy(dAtA[i:], m.Ed25519) 432 i = encodeVarintKeys(dAtA, i, uint64(len(m.Ed25519))) 433 i-- 434 dAtA[i] = 0xa 435 } 436 return len(dAtA) - i, nil 437 } 438 func encodeVarintKeys(dAtA []byte, offset int, v uint64) int { 439 offset -= sovKeys(v) 440 base := offset 441 for v >= 1<<7 { 442 dAtA[offset] = uint8(v&0x7f | 0x80) 443 v >>= 7 444 offset++ 445 } 446 dAtA[offset] = uint8(v) 447 return base 448 } 449 func (m *PublicKey) Size() (n int) { 450 if m == nil { 451 return 0 452 } 453 var l int 454 _ = l 455 if m.Sum != nil { 456 n += m.Sum.Size() 457 } 458 return n 459 } 460 461 func (m *PublicKey_Ed25519) Size() (n int) { 462 if m == nil { 463 return 0 464 } 465 var l int 466 _ = l 467 if m.Ed25519 != nil { 468 l = len(m.Ed25519) 469 n += 1 + l + sovKeys(uint64(l)) 470 } 471 return n 472 } 473 func (m *PrivateKey) Size() (n int) { 474 if m == nil { 475 return 0 476 } 477 var l int 478 _ = l 479 if m.Sum != nil { 480 n += m.Sum.Size() 481 } 482 return n 483 } 484 485 func (m *PrivateKey_Ed25519) Size() (n int) { 486 if m == nil { 487 return 0 488 } 489 var l int 490 _ = l 491 if m.Ed25519 != nil { 492 l = len(m.Ed25519) 493 n += 1 + l + sovKeys(uint64(l)) 494 } 495 return n 496 } 497 498 func sovKeys(x uint64) (n int) { 499 return (math_bits.Len64(x|1) + 6) / 7 500 } 501 func sozKeys(x uint64) (n int) { 502 return sovKeys(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 503 } 504 func (m *PublicKey) Unmarshal(dAtA []byte) error { 505 l := len(dAtA) 506 iNdEx := 0 507 for iNdEx < l { 508 preIndex := iNdEx 509 var wire uint64 510 for shift := uint(0); ; shift += 7 { 511 if shift >= 64 { 512 return ErrIntOverflowKeys 513 } 514 if iNdEx >= l { 515 return io.ErrUnexpectedEOF 516 } 517 b := dAtA[iNdEx] 518 iNdEx++ 519 wire |= uint64(b&0x7F) << shift 520 if b < 0x80 { 521 break 522 } 523 } 524 fieldNum := int32(wire >> 3) 525 wireType := int(wire & 0x7) 526 if wireType == 4 { 527 return fmt.Errorf("proto: PublicKey: wiretype end group for non-group") 528 } 529 if fieldNum <= 0 { 530 return fmt.Errorf("proto: PublicKey: illegal tag %d (wire type %d)", fieldNum, wire) 531 } 532 switch fieldNum { 533 case 1: 534 if wireType != 2 { 535 return fmt.Errorf("proto: wrong wireType = %d for field Ed25519", wireType) 536 } 537 var byteLen int 538 for shift := uint(0); ; shift += 7 { 539 if shift >= 64 { 540 return ErrIntOverflowKeys 541 } 542 if iNdEx >= l { 543 return io.ErrUnexpectedEOF 544 } 545 b := dAtA[iNdEx] 546 iNdEx++ 547 byteLen |= int(b&0x7F) << shift 548 if b < 0x80 { 549 break 550 } 551 } 552 if byteLen < 0 { 553 return ErrInvalidLengthKeys 554 } 555 postIndex := iNdEx + byteLen 556 if postIndex < 0 { 557 return ErrInvalidLengthKeys 558 } 559 if postIndex > l { 560 return io.ErrUnexpectedEOF 561 } 562 v := make([]byte, postIndex-iNdEx) 563 copy(v, dAtA[iNdEx:postIndex]) 564 m.Sum = &PublicKey_Ed25519{v} 565 iNdEx = postIndex 566 default: 567 iNdEx = preIndex 568 skippy, err := skipKeys(dAtA[iNdEx:]) 569 if err != nil { 570 return err 571 } 572 if skippy < 0 { 573 return ErrInvalidLengthKeys 574 } 575 if (iNdEx + skippy) < 0 { 576 return ErrInvalidLengthKeys 577 } 578 if (iNdEx + skippy) > l { 579 return io.ErrUnexpectedEOF 580 } 581 iNdEx += skippy 582 } 583 } 584 585 if iNdEx > l { 586 return io.ErrUnexpectedEOF 587 } 588 return nil 589 } 590 func (m *PrivateKey) Unmarshal(dAtA []byte) error { 591 l := len(dAtA) 592 iNdEx := 0 593 for iNdEx < l { 594 preIndex := iNdEx 595 var wire uint64 596 for shift := uint(0); ; shift += 7 { 597 if shift >= 64 { 598 return ErrIntOverflowKeys 599 } 600 if iNdEx >= l { 601 return io.ErrUnexpectedEOF 602 } 603 b := dAtA[iNdEx] 604 iNdEx++ 605 wire |= uint64(b&0x7F) << shift 606 if b < 0x80 { 607 break 608 } 609 } 610 fieldNum := int32(wire >> 3) 611 wireType := int(wire & 0x7) 612 if wireType == 4 { 613 return fmt.Errorf("proto: PrivateKey: wiretype end group for non-group") 614 } 615 if fieldNum <= 0 { 616 return fmt.Errorf("proto: PrivateKey: illegal tag %d (wire type %d)", fieldNum, wire) 617 } 618 switch fieldNum { 619 case 1: 620 if wireType != 2 { 621 return fmt.Errorf("proto: wrong wireType = %d for field Ed25519", wireType) 622 } 623 var byteLen int 624 for shift := uint(0); ; shift += 7 { 625 if shift >= 64 { 626 return ErrIntOverflowKeys 627 } 628 if iNdEx >= l { 629 return io.ErrUnexpectedEOF 630 } 631 b := dAtA[iNdEx] 632 iNdEx++ 633 byteLen |= int(b&0x7F) << shift 634 if b < 0x80 { 635 break 636 } 637 } 638 if byteLen < 0 { 639 return ErrInvalidLengthKeys 640 } 641 postIndex := iNdEx + byteLen 642 if postIndex < 0 { 643 return ErrInvalidLengthKeys 644 } 645 if postIndex > l { 646 return io.ErrUnexpectedEOF 647 } 648 v := make([]byte, postIndex-iNdEx) 649 copy(v, dAtA[iNdEx:postIndex]) 650 m.Sum = &PrivateKey_Ed25519{v} 651 iNdEx = postIndex 652 default: 653 iNdEx = preIndex 654 skippy, err := skipKeys(dAtA[iNdEx:]) 655 if err != nil { 656 return err 657 } 658 if skippy < 0 { 659 return ErrInvalidLengthKeys 660 } 661 if (iNdEx + skippy) < 0 { 662 return ErrInvalidLengthKeys 663 } 664 if (iNdEx + skippy) > l { 665 return io.ErrUnexpectedEOF 666 } 667 iNdEx += skippy 668 } 669 } 670 671 if iNdEx > l { 672 return io.ErrUnexpectedEOF 673 } 674 return nil 675 } 676 func skipKeys(dAtA []byte) (n int, err error) { 677 l := len(dAtA) 678 iNdEx := 0 679 depth := 0 680 for iNdEx < l { 681 var wire uint64 682 for shift := uint(0); ; shift += 7 { 683 if shift >= 64 { 684 return 0, ErrIntOverflowKeys 685 } 686 if iNdEx >= l { 687 return 0, io.ErrUnexpectedEOF 688 } 689 b := dAtA[iNdEx] 690 iNdEx++ 691 wire |= (uint64(b) & 0x7F) << shift 692 if b < 0x80 { 693 break 694 } 695 } 696 wireType := int(wire & 0x7) 697 switch wireType { 698 case 0: 699 for shift := uint(0); ; shift += 7 { 700 if shift >= 64 { 701 return 0, ErrIntOverflowKeys 702 } 703 if iNdEx >= l { 704 return 0, io.ErrUnexpectedEOF 705 } 706 iNdEx++ 707 if dAtA[iNdEx-1] < 0x80 { 708 break 709 } 710 } 711 case 1: 712 iNdEx += 8 713 case 2: 714 var length int 715 for shift := uint(0); ; shift += 7 { 716 if shift >= 64 { 717 return 0, ErrIntOverflowKeys 718 } 719 if iNdEx >= l { 720 return 0, io.ErrUnexpectedEOF 721 } 722 b := dAtA[iNdEx] 723 iNdEx++ 724 length |= (int(b) & 0x7F) << shift 725 if b < 0x80 { 726 break 727 } 728 } 729 if length < 0 { 730 return 0, ErrInvalidLengthKeys 731 } 732 iNdEx += length 733 case 3: 734 depth++ 735 case 4: 736 if depth == 0 { 737 return 0, ErrUnexpectedEndOfGroupKeys 738 } 739 depth-- 740 case 5: 741 iNdEx += 4 742 default: 743 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 744 } 745 if iNdEx < 0 { 746 return 0, ErrInvalidLengthKeys 747 } 748 if depth == 0 { 749 return iNdEx, nil 750 } 751 } 752 return 0, io.ErrUnexpectedEOF 753 } 754 755 var ( 756 ErrInvalidLengthKeys = fmt.Errorf("proto: negative length found during unmarshaling") 757 ErrIntOverflowKeys = fmt.Errorf("proto: integer overflow") 758 ErrUnexpectedEndOfGroupKeys = fmt.Errorf("proto: unexpected end of group") 759 )