github.com/Finschia/finschia-sdk@v0.48.1/x/capability/types/capability.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: cosmos/capability/v1beta1/capability.proto 3 4 package types 5 6 import ( 7 fmt "fmt" 8 _ "github.com/gogo/protobuf/gogoproto" 9 proto "github.com/gogo/protobuf/proto" 10 io "io" 11 math "math" 12 math_bits "math/bits" 13 ) 14 15 // Reference imports to suppress errors if they are not otherwise used. 16 var _ = proto.Marshal 17 var _ = fmt.Errorf 18 var _ = math.Inf 19 20 // This is a compile-time assertion to ensure that this generated file 21 // is compatible with the proto package it is being compiled against. 22 // A compilation error at this line likely means your copy of the 23 // proto package needs to be updated. 24 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 25 26 // Capability defines an implementation of an object capability. The index 27 // provided to a Capability must be globally unique. 28 type Capability struct { 29 Index uint64 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty" yaml:"index"` 30 } 31 32 func (m *Capability) Reset() { *m = Capability{} } 33 func (*Capability) ProtoMessage() {} 34 func (*Capability) Descriptor() ([]byte, []int) { 35 return fileDescriptor_6308261edd8470a9, []int{0} 36 } 37 func (m *Capability) XXX_Unmarshal(b []byte) error { 38 return m.Unmarshal(b) 39 } 40 func (m *Capability) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 41 if deterministic { 42 return xxx_messageInfo_Capability.Marshal(b, m, deterministic) 43 } else { 44 b = b[:cap(b)] 45 n, err := m.MarshalToSizedBuffer(b) 46 if err != nil { 47 return nil, err 48 } 49 return b[:n], nil 50 } 51 } 52 func (m *Capability) XXX_Merge(src proto.Message) { 53 xxx_messageInfo_Capability.Merge(m, src) 54 } 55 func (m *Capability) XXX_Size() int { 56 return m.Size() 57 } 58 func (m *Capability) XXX_DiscardUnknown() { 59 xxx_messageInfo_Capability.DiscardUnknown(m) 60 } 61 62 var xxx_messageInfo_Capability proto.InternalMessageInfo 63 64 func (m *Capability) GetIndex() uint64 { 65 if m != nil { 66 return m.Index 67 } 68 return 0 69 } 70 71 // Owner defines a single capability owner. An owner is defined by the name of 72 // capability and the module name. 73 type Owner struct { 74 Module string `protobuf:"bytes,1,opt,name=module,proto3" json:"module,omitempty" yaml:"module"` 75 Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty" yaml:"name"` 76 } 77 78 func (m *Owner) Reset() { *m = Owner{} } 79 func (*Owner) ProtoMessage() {} 80 func (*Owner) Descriptor() ([]byte, []int) { 81 return fileDescriptor_6308261edd8470a9, []int{1} 82 } 83 func (m *Owner) XXX_Unmarshal(b []byte) error { 84 return m.Unmarshal(b) 85 } 86 func (m *Owner) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 87 if deterministic { 88 return xxx_messageInfo_Owner.Marshal(b, m, deterministic) 89 } else { 90 b = b[:cap(b)] 91 n, err := m.MarshalToSizedBuffer(b) 92 if err != nil { 93 return nil, err 94 } 95 return b[:n], nil 96 } 97 } 98 func (m *Owner) XXX_Merge(src proto.Message) { 99 xxx_messageInfo_Owner.Merge(m, src) 100 } 101 func (m *Owner) XXX_Size() int { 102 return m.Size() 103 } 104 func (m *Owner) XXX_DiscardUnknown() { 105 xxx_messageInfo_Owner.DiscardUnknown(m) 106 } 107 108 var xxx_messageInfo_Owner proto.InternalMessageInfo 109 110 // CapabilityOwners defines a set of owners of a single Capability. The set of 111 // owners must be unique. 112 type CapabilityOwners struct { 113 Owners []Owner `protobuf:"bytes,1,rep,name=owners,proto3" json:"owners"` 114 } 115 116 func (m *CapabilityOwners) Reset() { *m = CapabilityOwners{} } 117 func (m *CapabilityOwners) String() string { return proto.CompactTextString(m) } 118 func (*CapabilityOwners) ProtoMessage() {} 119 func (*CapabilityOwners) Descriptor() ([]byte, []int) { 120 return fileDescriptor_6308261edd8470a9, []int{2} 121 } 122 func (m *CapabilityOwners) XXX_Unmarshal(b []byte) error { 123 return m.Unmarshal(b) 124 } 125 func (m *CapabilityOwners) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 126 if deterministic { 127 return xxx_messageInfo_CapabilityOwners.Marshal(b, m, deterministic) 128 } else { 129 b = b[:cap(b)] 130 n, err := m.MarshalToSizedBuffer(b) 131 if err != nil { 132 return nil, err 133 } 134 return b[:n], nil 135 } 136 } 137 func (m *CapabilityOwners) XXX_Merge(src proto.Message) { 138 xxx_messageInfo_CapabilityOwners.Merge(m, src) 139 } 140 func (m *CapabilityOwners) XXX_Size() int { 141 return m.Size() 142 } 143 func (m *CapabilityOwners) XXX_DiscardUnknown() { 144 xxx_messageInfo_CapabilityOwners.DiscardUnknown(m) 145 } 146 147 var xxx_messageInfo_CapabilityOwners proto.InternalMessageInfo 148 149 func (m *CapabilityOwners) GetOwners() []Owner { 150 if m != nil { 151 return m.Owners 152 } 153 return nil 154 } 155 156 func init() { 157 proto.RegisterType((*Capability)(nil), "cosmos.capability.v1beta1.Capability") 158 proto.RegisterType((*Owner)(nil), "cosmos.capability.v1beta1.Owner") 159 proto.RegisterType((*CapabilityOwners)(nil), "cosmos.capability.v1beta1.CapabilityOwners") 160 } 161 162 func init() { 163 proto.RegisterFile("cosmos/capability/v1beta1/capability.proto", fileDescriptor_6308261edd8470a9) 164 } 165 166 var fileDescriptor_6308261edd8470a9 = []byte{ 167 // 306 bytes of a gzipped FileDescriptorProto 168 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0x4a, 0xce, 0x2f, 0xce, 169 0xcd, 0x2f, 0xd6, 0x4f, 0x4e, 0x2c, 0x48, 0x4c, 0xca, 0xcc, 0xc9, 0x2c, 0xa9, 0xd4, 0x2f, 0x33, 170 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0x44, 0x12, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x84, 171 0xa8, 0xd5, 0x43, 0x92, 0x80, 0xaa, 0x95, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0xab, 0xd2, 0x07, 172 0xb1, 0x20, 0x1a, 0x94, 0xac, 0xb8, 0xb8, 0x9c, 0xe1, 0x6a, 0x85, 0xd4, 0xb8, 0x58, 0x33, 0xf3, 173 0x52, 0x52, 0x2b, 0x24, 0x18, 0x15, 0x18, 0x35, 0x58, 0x9c, 0x04, 0x3e, 0xdd, 0x93, 0xe7, 0xa9, 174 0x4c, 0xcc, 0xcd, 0xb1, 0x52, 0x02, 0x0b, 0x2b, 0x05, 0x41, 0xa4, 0xad, 0x58, 0x66, 0x2c, 0x90, 175 0x67, 0x50, 0x4a, 0xe4, 0x62, 0xf5, 0x2f, 0xcf, 0x4b, 0x2d, 0x12, 0xd2, 0xe4, 0x62, 0xcb, 0xcd, 176 0x4f, 0x29, 0xcd, 0x49, 0x05, 0xeb, 0xe3, 0x74, 0x12, 0xfc, 0x74, 0x4f, 0x9e, 0x17, 0xa2, 0x0f, 177 0x22, 0xae, 0x14, 0x04, 0x55, 0x20, 0xa4, 0xcc, 0xc5, 0x92, 0x97, 0x98, 0x9b, 0x2a, 0xc1, 0x04, 178 0x56, 0xc8, 0xff, 0xe9, 0x9e, 0x3c, 0x37, 0x44, 0x21, 0x48, 0x54, 0x29, 0x08, 0x2c, 0x69, 0xc5, 179 0xd1, 0xb1, 0x40, 0x9e, 0x01, 0x6c, 0x45, 0x10, 0x97, 0x00, 0xc2, 0x79, 0x60, 0xcb, 0x8a, 0x85, 180 0xec, 0xb8, 0xd8, 0xf2, 0xc1, 0x2c, 0x09, 0x46, 0x05, 0x66, 0x0d, 0x6e, 0x23, 0x05, 0x3d, 0x9c, 181 0x9e, 0xd6, 0x03, 0x6b, 0x71, 0x62, 0x39, 0x71, 0x4f, 0x9e, 0x21, 0x08, 0xaa, 0xcb, 0xc9, 0xf7, 182 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 183 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0x8c, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 184 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xdd, 0x32, 0xf3, 0x8a, 0x93, 0x33, 0x32, 0x13, 0xf5, 0xd3, 185 0xa0, 0x0c, 0xdd, 0xe2, 0x94, 0x6c, 0xfd, 0x0a, 0xe4, 0x58, 0x28, 0xa9, 0x2c, 0x48, 0x2d, 0x4e, 186 0x62, 0x03, 0x07, 0xa4, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x5f, 0x0f, 0x77, 0x5e, 0xa7, 0x01, 187 0x00, 0x00, 188 } 189 190 func (m *Capability) Marshal() (dAtA []byte, err error) { 191 size := m.Size() 192 dAtA = make([]byte, size) 193 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 194 if err != nil { 195 return nil, err 196 } 197 return dAtA[:n], nil 198 } 199 200 func (m *Capability) MarshalTo(dAtA []byte) (int, error) { 201 size := m.Size() 202 return m.MarshalToSizedBuffer(dAtA[:size]) 203 } 204 205 func (m *Capability) MarshalToSizedBuffer(dAtA []byte) (int, error) { 206 i := len(dAtA) 207 _ = i 208 var l int 209 _ = l 210 if m.Index != 0 { 211 i = encodeVarintCapability(dAtA, i, uint64(m.Index)) 212 i-- 213 dAtA[i] = 0x8 214 } 215 return len(dAtA) - i, nil 216 } 217 218 func (m *Owner) Marshal() (dAtA []byte, err error) { 219 size := m.Size() 220 dAtA = make([]byte, size) 221 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 222 if err != nil { 223 return nil, err 224 } 225 return dAtA[:n], nil 226 } 227 228 func (m *Owner) MarshalTo(dAtA []byte) (int, error) { 229 size := m.Size() 230 return m.MarshalToSizedBuffer(dAtA[:size]) 231 } 232 233 func (m *Owner) MarshalToSizedBuffer(dAtA []byte) (int, error) { 234 i := len(dAtA) 235 _ = i 236 var l int 237 _ = l 238 if len(m.Name) > 0 { 239 i -= len(m.Name) 240 copy(dAtA[i:], m.Name) 241 i = encodeVarintCapability(dAtA, i, uint64(len(m.Name))) 242 i-- 243 dAtA[i] = 0x12 244 } 245 if len(m.Module) > 0 { 246 i -= len(m.Module) 247 copy(dAtA[i:], m.Module) 248 i = encodeVarintCapability(dAtA, i, uint64(len(m.Module))) 249 i-- 250 dAtA[i] = 0xa 251 } 252 return len(dAtA) - i, nil 253 } 254 255 func (m *CapabilityOwners) Marshal() (dAtA []byte, err error) { 256 size := m.Size() 257 dAtA = make([]byte, size) 258 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 259 if err != nil { 260 return nil, err 261 } 262 return dAtA[:n], nil 263 } 264 265 func (m *CapabilityOwners) MarshalTo(dAtA []byte) (int, error) { 266 size := m.Size() 267 return m.MarshalToSizedBuffer(dAtA[:size]) 268 } 269 270 func (m *CapabilityOwners) MarshalToSizedBuffer(dAtA []byte) (int, error) { 271 i := len(dAtA) 272 _ = i 273 var l int 274 _ = l 275 if len(m.Owners) > 0 { 276 for iNdEx := len(m.Owners) - 1; iNdEx >= 0; iNdEx-- { 277 { 278 size, err := m.Owners[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 279 if err != nil { 280 return 0, err 281 } 282 i -= size 283 i = encodeVarintCapability(dAtA, i, uint64(size)) 284 } 285 i-- 286 dAtA[i] = 0xa 287 } 288 } 289 return len(dAtA) - i, nil 290 } 291 292 func encodeVarintCapability(dAtA []byte, offset int, v uint64) int { 293 offset -= sovCapability(v) 294 base := offset 295 for v >= 1<<7 { 296 dAtA[offset] = uint8(v&0x7f | 0x80) 297 v >>= 7 298 offset++ 299 } 300 dAtA[offset] = uint8(v) 301 return base 302 } 303 func (m *Capability) Size() (n int) { 304 if m == nil { 305 return 0 306 } 307 var l int 308 _ = l 309 if m.Index != 0 { 310 n += 1 + sovCapability(uint64(m.Index)) 311 } 312 return n 313 } 314 315 func (m *Owner) Size() (n int) { 316 if m == nil { 317 return 0 318 } 319 var l int 320 _ = l 321 l = len(m.Module) 322 if l > 0 { 323 n += 1 + l + sovCapability(uint64(l)) 324 } 325 l = len(m.Name) 326 if l > 0 { 327 n += 1 + l + sovCapability(uint64(l)) 328 } 329 return n 330 } 331 332 func (m *CapabilityOwners) Size() (n int) { 333 if m == nil { 334 return 0 335 } 336 var l int 337 _ = l 338 if len(m.Owners) > 0 { 339 for _, e := range m.Owners { 340 l = e.Size() 341 n += 1 + l + sovCapability(uint64(l)) 342 } 343 } 344 return n 345 } 346 347 func sovCapability(x uint64) (n int) { 348 return (math_bits.Len64(x|1) + 6) / 7 349 } 350 func sozCapability(x uint64) (n int) { 351 return sovCapability(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 352 } 353 func (m *Capability) Unmarshal(dAtA []byte) error { 354 l := len(dAtA) 355 iNdEx := 0 356 for iNdEx < l { 357 preIndex := iNdEx 358 var wire uint64 359 for shift := uint(0); ; shift += 7 { 360 if shift >= 64 { 361 return ErrIntOverflowCapability 362 } 363 if iNdEx >= l { 364 return io.ErrUnexpectedEOF 365 } 366 b := dAtA[iNdEx] 367 iNdEx++ 368 wire |= uint64(b&0x7F) << shift 369 if b < 0x80 { 370 break 371 } 372 } 373 fieldNum := int32(wire >> 3) 374 wireType := int(wire & 0x7) 375 if wireType == 4 { 376 return fmt.Errorf("proto: Capability: wiretype end group for non-group") 377 } 378 if fieldNum <= 0 { 379 return fmt.Errorf("proto: Capability: illegal tag %d (wire type %d)", fieldNum, wire) 380 } 381 switch fieldNum { 382 case 1: 383 if wireType != 0 { 384 return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) 385 } 386 m.Index = 0 387 for shift := uint(0); ; shift += 7 { 388 if shift >= 64 { 389 return ErrIntOverflowCapability 390 } 391 if iNdEx >= l { 392 return io.ErrUnexpectedEOF 393 } 394 b := dAtA[iNdEx] 395 iNdEx++ 396 m.Index |= uint64(b&0x7F) << shift 397 if b < 0x80 { 398 break 399 } 400 } 401 default: 402 iNdEx = preIndex 403 skippy, err := skipCapability(dAtA[iNdEx:]) 404 if err != nil { 405 return err 406 } 407 if (skippy < 0) || (iNdEx+skippy) < 0 { 408 return ErrInvalidLengthCapability 409 } 410 if (iNdEx + skippy) > l { 411 return io.ErrUnexpectedEOF 412 } 413 iNdEx += skippy 414 } 415 } 416 417 if iNdEx > l { 418 return io.ErrUnexpectedEOF 419 } 420 return nil 421 } 422 func (m *Owner) Unmarshal(dAtA []byte) error { 423 l := len(dAtA) 424 iNdEx := 0 425 for iNdEx < l { 426 preIndex := iNdEx 427 var wire uint64 428 for shift := uint(0); ; shift += 7 { 429 if shift >= 64 { 430 return ErrIntOverflowCapability 431 } 432 if iNdEx >= l { 433 return io.ErrUnexpectedEOF 434 } 435 b := dAtA[iNdEx] 436 iNdEx++ 437 wire |= uint64(b&0x7F) << shift 438 if b < 0x80 { 439 break 440 } 441 } 442 fieldNum := int32(wire >> 3) 443 wireType := int(wire & 0x7) 444 if wireType == 4 { 445 return fmt.Errorf("proto: Owner: wiretype end group for non-group") 446 } 447 if fieldNum <= 0 { 448 return fmt.Errorf("proto: Owner: illegal tag %d (wire type %d)", fieldNum, wire) 449 } 450 switch fieldNum { 451 case 1: 452 if wireType != 2 { 453 return fmt.Errorf("proto: wrong wireType = %d for field Module", wireType) 454 } 455 var stringLen uint64 456 for shift := uint(0); ; shift += 7 { 457 if shift >= 64 { 458 return ErrIntOverflowCapability 459 } 460 if iNdEx >= l { 461 return io.ErrUnexpectedEOF 462 } 463 b := dAtA[iNdEx] 464 iNdEx++ 465 stringLen |= uint64(b&0x7F) << shift 466 if b < 0x80 { 467 break 468 } 469 } 470 intStringLen := int(stringLen) 471 if intStringLen < 0 { 472 return ErrInvalidLengthCapability 473 } 474 postIndex := iNdEx + intStringLen 475 if postIndex < 0 { 476 return ErrInvalidLengthCapability 477 } 478 if postIndex > l { 479 return io.ErrUnexpectedEOF 480 } 481 m.Module = string(dAtA[iNdEx:postIndex]) 482 iNdEx = postIndex 483 case 2: 484 if wireType != 2 { 485 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) 486 } 487 var stringLen uint64 488 for shift := uint(0); ; shift += 7 { 489 if shift >= 64 { 490 return ErrIntOverflowCapability 491 } 492 if iNdEx >= l { 493 return io.ErrUnexpectedEOF 494 } 495 b := dAtA[iNdEx] 496 iNdEx++ 497 stringLen |= uint64(b&0x7F) << shift 498 if b < 0x80 { 499 break 500 } 501 } 502 intStringLen := int(stringLen) 503 if intStringLen < 0 { 504 return ErrInvalidLengthCapability 505 } 506 postIndex := iNdEx + intStringLen 507 if postIndex < 0 { 508 return ErrInvalidLengthCapability 509 } 510 if postIndex > l { 511 return io.ErrUnexpectedEOF 512 } 513 m.Name = string(dAtA[iNdEx:postIndex]) 514 iNdEx = postIndex 515 default: 516 iNdEx = preIndex 517 skippy, err := skipCapability(dAtA[iNdEx:]) 518 if err != nil { 519 return err 520 } 521 if (skippy < 0) || (iNdEx+skippy) < 0 { 522 return ErrInvalidLengthCapability 523 } 524 if (iNdEx + skippy) > l { 525 return io.ErrUnexpectedEOF 526 } 527 iNdEx += skippy 528 } 529 } 530 531 if iNdEx > l { 532 return io.ErrUnexpectedEOF 533 } 534 return nil 535 } 536 func (m *CapabilityOwners) Unmarshal(dAtA []byte) error { 537 l := len(dAtA) 538 iNdEx := 0 539 for iNdEx < l { 540 preIndex := iNdEx 541 var wire uint64 542 for shift := uint(0); ; shift += 7 { 543 if shift >= 64 { 544 return ErrIntOverflowCapability 545 } 546 if iNdEx >= l { 547 return io.ErrUnexpectedEOF 548 } 549 b := dAtA[iNdEx] 550 iNdEx++ 551 wire |= uint64(b&0x7F) << shift 552 if b < 0x80 { 553 break 554 } 555 } 556 fieldNum := int32(wire >> 3) 557 wireType := int(wire & 0x7) 558 if wireType == 4 { 559 return fmt.Errorf("proto: CapabilityOwners: wiretype end group for non-group") 560 } 561 if fieldNum <= 0 { 562 return fmt.Errorf("proto: CapabilityOwners: illegal tag %d (wire type %d)", fieldNum, wire) 563 } 564 switch fieldNum { 565 case 1: 566 if wireType != 2 { 567 return fmt.Errorf("proto: wrong wireType = %d for field Owners", wireType) 568 } 569 var msglen int 570 for shift := uint(0); ; shift += 7 { 571 if shift >= 64 { 572 return ErrIntOverflowCapability 573 } 574 if iNdEx >= l { 575 return io.ErrUnexpectedEOF 576 } 577 b := dAtA[iNdEx] 578 iNdEx++ 579 msglen |= int(b&0x7F) << shift 580 if b < 0x80 { 581 break 582 } 583 } 584 if msglen < 0 { 585 return ErrInvalidLengthCapability 586 } 587 postIndex := iNdEx + msglen 588 if postIndex < 0 { 589 return ErrInvalidLengthCapability 590 } 591 if postIndex > l { 592 return io.ErrUnexpectedEOF 593 } 594 m.Owners = append(m.Owners, Owner{}) 595 if err := m.Owners[len(m.Owners)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 596 return err 597 } 598 iNdEx = postIndex 599 default: 600 iNdEx = preIndex 601 skippy, err := skipCapability(dAtA[iNdEx:]) 602 if err != nil { 603 return err 604 } 605 if (skippy < 0) || (iNdEx+skippy) < 0 { 606 return ErrInvalidLengthCapability 607 } 608 if (iNdEx + skippy) > l { 609 return io.ErrUnexpectedEOF 610 } 611 iNdEx += skippy 612 } 613 } 614 615 if iNdEx > l { 616 return io.ErrUnexpectedEOF 617 } 618 return nil 619 } 620 func skipCapability(dAtA []byte) (n int, err error) { 621 l := len(dAtA) 622 iNdEx := 0 623 depth := 0 624 for iNdEx < l { 625 var wire uint64 626 for shift := uint(0); ; shift += 7 { 627 if shift >= 64 { 628 return 0, ErrIntOverflowCapability 629 } 630 if iNdEx >= l { 631 return 0, io.ErrUnexpectedEOF 632 } 633 b := dAtA[iNdEx] 634 iNdEx++ 635 wire |= (uint64(b) & 0x7F) << shift 636 if b < 0x80 { 637 break 638 } 639 } 640 wireType := int(wire & 0x7) 641 switch wireType { 642 case 0: 643 for shift := uint(0); ; shift += 7 { 644 if shift >= 64 { 645 return 0, ErrIntOverflowCapability 646 } 647 if iNdEx >= l { 648 return 0, io.ErrUnexpectedEOF 649 } 650 iNdEx++ 651 if dAtA[iNdEx-1] < 0x80 { 652 break 653 } 654 } 655 case 1: 656 iNdEx += 8 657 case 2: 658 var length int 659 for shift := uint(0); ; shift += 7 { 660 if shift >= 64 { 661 return 0, ErrIntOverflowCapability 662 } 663 if iNdEx >= l { 664 return 0, io.ErrUnexpectedEOF 665 } 666 b := dAtA[iNdEx] 667 iNdEx++ 668 length |= (int(b) & 0x7F) << shift 669 if b < 0x80 { 670 break 671 } 672 } 673 if length < 0 { 674 return 0, ErrInvalidLengthCapability 675 } 676 iNdEx += length 677 case 3: 678 depth++ 679 case 4: 680 if depth == 0 { 681 return 0, ErrUnexpectedEndOfGroupCapability 682 } 683 depth-- 684 case 5: 685 iNdEx += 4 686 default: 687 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 688 } 689 if iNdEx < 0 { 690 return 0, ErrInvalidLengthCapability 691 } 692 if depth == 0 { 693 return iNdEx, nil 694 } 695 } 696 return 0, io.ErrUnexpectedEOF 697 } 698 699 var ( 700 ErrInvalidLengthCapability = fmt.Errorf("proto: negative length found during unmarshaling") 701 ErrIntOverflowCapability = fmt.Errorf("proto: integer overflow") 702 ErrUnexpectedEndOfGroupCapability = fmt.Errorf("proto: unexpected end of group") 703 )