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