github.com/Finschia/finschia-sdk@v0.48.1/types/query/pagination.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: cosmos/base/query/v1beta1/pagination.proto 3 4 package query 5 6 import ( 7 fmt "fmt" 8 proto "github.com/gogo/protobuf/proto" 9 io "io" 10 math "math" 11 math_bits "math/bits" 12 ) 13 14 // Reference imports to suppress errors if they are not otherwise used. 15 var _ = proto.Marshal 16 var _ = fmt.Errorf 17 var _ = math.Inf 18 19 // This is a compile-time assertion to ensure that this generated file 20 // is compatible with the proto package it is being compiled against. 21 // A compilation error at this line likely means your copy of the 22 // proto package needs to be updated. 23 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 24 25 // PageRequest is to be embedded in gRPC request messages for efficient 26 // pagination. Ex: 27 // 28 // message SomeRequest { 29 // Foo some_parameter = 1; 30 // PageRequest pagination = 2; 31 // } 32 type PageRequest struct { 33 // key is a value returned in PageResponse.next_key to begin 34 // querying the next page most efficiently. Only one of offset or key 35 // should be set. 36 Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` 37 // offset is a numeric offset that can be used when key is unavailable. 38 // It is less efficient than using key. Only one of offset or key should 39 // be set. 40 Offset uint64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"` 41 // limit is the total number of results to be returned in the result page. 42 // If left empty it will default to a value to be set by each app. 43 Limit uint64 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"` 44 // count_total is set to true to indicate that the result set should include 45 // a count of the total number of items available for pagination in UIs. 46 // count_total is only respected when offset is used. It is ignored when key 47 // is set. 48 CountTotal bool `protobuf:"varint,4,opt,name=count_total,json=countTotal,proto3" json:"count_total,omitempty"` 49 // reverse is set to true if results are to be returned in the descending order. 50 // 51 // Since: cosmos-sdk 0.43 52 Reverse bool `protobuf:"varint,5,opt,name=reverse,proto3" json:"reverse,omitempty"` 53 } 54 55 func (m *PageRequest) Reset() { *m = PageRequest{} } 56 func (m *PageRequest) String() string { return proto.CompactTextString(m) } 57 func (*PageRequest) ProtoMessage() {} 58 func (*PageRequest) Descriptor() ([]byte, []int) { 59 return fileDescriptor_53d6d609fe6828af, []int{0} 60 } 61 func (m *PageRequest) XXX_Unmarshal(b []byte) error { 62 return m.Unmarshal(b) 63 } 64 func (m *PageRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 65 if deterministic { 66 return xxx_messageInfo_PageRequest.Marshal(b, m, deterministic) 67 } else { 68 b = b[:cap(b)] 69 n, err := m.MarshalToSizedBuffer(b) 70 if err != nil { 71 return nil, err 72 } 73 return b[:n], nil 74 } 75 } 76 func (m *PageRequest) XXX_Merge(src proto.Message) { 77 xxx_messageInfo_PageRequest.Merge(m, src) 78 } 79 func (m *PageRequest) XXX_Size() int { 80 return m.Size() 81 } 82 func (m *PageRequest) XXX_DiscardUnknown() { 83 xxx_messageInfo_PageRequest.DiscardUnknown(m) 84 } 85 86 var xxx_messageInfo_PageRequest proto.InternalMessageInfo 87 88 func (m *PageRequest) GetKey() []byte { 89 if m != nil { 90 return m.Key 91 } 92 return nil 93 } 94 95 func (m *PageRequest) GetOffset() uint64 { 96 if m != nil { 97 return m.Offset 98 } 99 return 0 100 } 101 102 func (m *PageRequest) GetLimit() uint64 { 103 if m != nil { 104 return m.Limit 105 } 106 return 0 107 } 108 109 func (m *PageRequest) GetCountTotal() bool { 110 if m != nil { 111 return m.CountTotal 112 } 113 return false 114 } 115 116 func (m *PageRequest) GetReverse() bool { 117 if m != nil { 118 return m.Reverse 119 } 120 return false 121 } 122 123 // PageResponse is to be embedded in gRPC response messages where the 124 // corresponding request message has used PageRequest. 125 // 126 // message SomeResponse { 127 // repeated Bar results = 1; 128 // PageResponse page = 2; 129 // } 130 type PageResponse struct { 131 // next_key is the key to be passed to PageRequest.key to 132 // query the next page most efficiently 133 NextKey []byte `protobuf:"bytes,1,opt,name=next_key,json=nextKey,proto3" json:"next_key,omitempty"` 134 // total is total number of results available if PageRequest.count_total 135 // was set, its value is undefined otherwise 136 Total uint64 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"` 137 } 138 139 func (m *PageResponse) Reset() { *m = PageResponse{} } 140 func (m *PageResponse) String() string { return proto.CompactTextString(m) } 141 func (*PageResponse) ProtoMessage() {} 142 func (*PageResponse) Descriptor() ([]byte, []int) { 143 return fileDescriptor_53d6d609fe6828af, []int{1} 144 } 145 func (m *PageResponse) XXX_Unmarshal(b []byte) error { 146 return m.Unmarshal(b) 147 } 148 func (m *PageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 149 if deterministic { 150 return xxx_messageInfo_PageResponse.Marshal(b, m, deterministic) 151 } else { 152 b = b[:cap(b)] 153 n, err := m.MarshalToSizedBuffer(b) 154 if err != nil { 155 return nil, err 156 } 157 return b[:n], nil 158 } 159 } 160 func (m *PageResponse) XXX_Merge(src proto.Message) { 161 xxx_messageInfo_PageResponse.Merge(m, src) 162 } 163 func (m *PageResponse) XXX_Size() int { 164 return m.Size() 165 } 166 func (m *PageResponse) XXX_DiscardUnknown() { 167 xxx_messageInfo_PageResponse.DiscardUnknown(m) 168 } 169 170 var xxx_messageInfo_PageResponse proto.InternalMessageInfo 171 172 func (m *PageResponse) GetNextKey() []byte { 173 if m != nil { 174 return m.NextKey 175 } 176 return nil 177 } 178 179 func (m *PageResponse) GetTotal() uint64 { 180 if m != nil { 181 return m.Total 182 } 183 return 0 184 } 185 186 func init() { 187 proto.RegisterType((*PageRequest)(nil), "cosmos.base.query.v1beta1.PageRequest") 188 proto.RegisterType((*PageResponse)(nil), "cosmos.base.query.v1beta1.PageResponse") 189 } 190 191 func init() { 192 proto.RegisterFile("cosmos/base/query/v1beta1/pagination.proto", fileDescriptor_53d6d609fe6828af) 193 } 194 195 var fileDescriptor_53d6d609fe6828af = []byte{ 196 // 290 bytes of a gzipped FileDescriptorProto 197 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x44, 0x90, 0xbd, 0x4e, 0xf3, 0x30, 198 0x14, 0x86, 0xeb, 0xaf, 0xbf, 0x72, 0x3b, 0x7c, 0xb2, 0x10, 0x72, 0x17, 0x53, 0x75, 0xaa, 0x10, 199 0xc4, 0xaa, 0xb8, 0x00, 0x24, 0x86, 0x2e, 0x2c, 0x28, 0x62, 0x62, 0xa9, 0x9c, 0x70, 0xda, 0x5a, 200 0x6d, 0xec, 0x34, 0x3e, 0xa9, 0xc8, 0x1d, 0x30, 0x72, 0x59, 0x8c, 0x1d, 0x19, 0x51, 0x72, 0x23, 201 0x28, 0x71, 0x10, 0xdb, 0x79, 0x5e, 0x3f, 0xf2, 0x79, 0x75, 0xe8, 0x75, 0x6c, 0x5d, 0x62, 0x9d, 202 0x8c, 0x94, 0x03, 0x79, 0xcc, 0x21, 0x2b, 0xe4, 0x69, 0x19, 0x01, 0xaa, 0xa5, 0x4c, 0xd5, 0x56, 203 0x1b, 0x85, 0xda, 0x9a, 0x20, 0xcd, 0x2c, 0x5a, 0x36, 0xf5, 0x6e, 0x50, 0xbb, 0x41, 0xe3, 0x06, 204 0xad, 0x3b, 0x7f, 0x27, 0x74, 0xfc, 0xa4, 0xb6, 0x10, 0xc2, 0x31, 0x07, 0x87, 0xec, 0x3f, 0xed, 205 0xee, 0xa1, 0xe0, 0x64, 0x46, 0x16, 0x93, 0xb0, 0x1e, 0xd9, 0x25, 0x1d, 0xd8, 0xcd, 0xc6, 0x01, 206 0xf2, 0x7f, 0x33, 0xb2, 0xe8, 0x85, 0x2d, 0xb1, 0x0b, 0xda, 0x3f, 0xe8, 0x44, 0x23, 0xef, 0x36, 207 0xb1, 0x07, 0x76, 0x45, 0xc7, 0xb1, 0xcd, 0x0d, 0xae, 0xd1, 0xa2, 0x3a, 0xf0, 0xde, 0x8c, 0x2c, 208 0x46, 0x21, 0x6d, 0xa2, 0xe7, 0x3a, 0x61, 0x9c, 0x0e, 0x33, 0x38, 0x41, 0xe6, 0x80, 0xf7, 0x9b, 209 0xc7, 0x5f, 0x9c, 0xdf, 0xd3, 0x89, 0x6f, 0xe2, 0x52, 0x6b, 0x1c, 0xb0, 0x29, 0x1d, 0x19, 0x78, 210 0xc3, 0xf5, 0x5f, 0x9f, 0x61, 0xcd, 0x8f, 0x50, 0xd4, 0xbb, 0xfd, 0xff, 0xbe, 0x92, 0x87, 0x87, 211 0xd5, 0x67, 0x29, 0xc8, 0xb9, 0x14, 0xe4, 0xbb, 0x14, 0xe4, 0xa3, 0x12, 0x9d, 0x73, 0x25, 0x3a, 212 0x5f, 0x95, 0xe8, 0xbc, 0xdc, 0x6c, 0x35, 0xee, 0xf2, 0x28, 0x88, 0x6d, 0x22, 0x57, 0xda, 0xb8, 213 0x78, 0xa7, 0x95, 0xdc, 0xb4, 0xc3, 0xad, 0x7b, 0xdd, 0x4b, 0x2c, 0x52, 0x70, 0xfe, 0x8e, 0xd1, 214 0xa0, 0xb9, 0xda, 0xdd, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xbb, 0x35, 0x97, 0x52, 0x63, 0x01, 215 0x00, 0x00, 216 } 217 218 func (m *PageRequest) 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 *PageRequest) MarshalTo(dAtA []byte) (int, error) { 229 size := m.Size() 230 return m.MarshalToSizedBuffer(dAtA[:size]) 231 } 232 233 func (m *PageRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 234 i := len(dAtA) 235 _ = i 236 var l int 237 _ = l 238 if m.Reverse { 239 i-- 240 if m.Reverse { 241 dAtA[i] = 1 242 } else { 243 dAtA[i] = 0 244 } 245 i-- 246 dAtA[i] = 0x28 247 } 248 if m.CountTotal { 249 i-- 250 if m.CountTotal { 251 dAtA[i] = 1 252 } else { 253 dAtA[i] = 0 254 } 255 i-- 256 dAtA[i] = 0x20 257 } 258 if m.Limit != 0 { 259 i = encodeVarintPagination(dAtA, i, uint64(m.Limit)) 260 i-- 261 dAtA[i] = 0x18 262 } 263 if m.Offset != 0 { 264 i = encodeVarintPagination(dAtA, i, uint64(m.Offset)) 265 i-- 266 dAtA[i] = 0x10 267 } 268 if len(m.Key) > 0 { 269 i -= len(m.Key) 270 copy(dAtA[i:], m.Key) 271 i = encodeVarintPagination(dAtA, i, uint64(len(m.Key))) 272 i-- 273 dAtA[i] = 0xa 274 } 275 return len(dAtA) - i, nil 276 } 277 278 func (m *PageResponse) Marshal() (dAtA []byte, err error) { 279 size := m.Size() 280 dAtA = make([]byte, size) 281 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 282 if err != nil { 283 return nil, err 284 } 285 return dAtA[:n], nil 286 } 287 288 func (m *PageResponse) MarshalTo(dAtA []byte) (int, error) { 289 size := m.Size() 290 return m.MarshalToSizedBuffer(dAtA[:size]) 291 } 292 293 func (m *PageResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 294 i := len(dAtA) 295 _ = i 296 var l int 297 _ = l 298 if m.Total != 0 { 299 i = encodeVarintPagination(dAtA, i, uint64(m.Total)) 300 i-- 301 dAtA[i] = 0x10 302 } 303 if len(m.NextKey) > 0 { 304 i -= len(m.NextKey) 305 copy(dAtA[i:], m.NextKey) 306 i = encodeVarintPagination(dAtA, i, uint64(len(m.NextKey))) 307 i-- 308 dAtA[i] = 0xa 309 } 310 return len(dAtA) - i, nil 311 } 312 313 func encodeVarintPagination(dAtA []byte, offset int, v uint64) int { 314 offset -= sovPagination(v) 315 base := offset 316 for v >= 1<<7 { 317 dAtA[offset] = uint8(v&0x7f | 0x80) 318 v >>= 7 319 offset++ 320 } 321 dAtA[offset] = uint8(v) 322 return base 323 } 324 func (m *PageRequest) Size() (n int) { 325 if m == nil { 326 return 0 327 } 328 var l int 329 _ = l 330 l = len(m.Key) 331 if l > 0 { 332 n += 1 + l + sovPagination(uint64(l)) 333 } 334 if m.Offset != 0 { 335 n += 1 + sovPagination(uint64(m.Offset)) 336 } 337 if m.Limit != 0 { 338 n += 1 + sovPagination(uint64(m.Limit)) 339 } 340 if m.CountTotal { 341 n += 2 342 } 343 if m.Reverse { 344 n += 2 345 } 346 return n 347 } 348 349 func (m *PageResponse) Size() (n int) { 350 if m == nil { 351 return 0 352 } 353 var l int 354 _ = l 355 l = len(m.NextKey) 356 if l > 0 { 357 n += 1 + l + sovPagination(uint64(l)) 358 } 359 if m.Total != 0 { 360 n += 1 + sovPagination(uint64(m.Total)) 361 } 362 return n 363 } 364 365 func sovPagination(x uint64) (n int) { 366 return (math_bits.Len64(x|1) + 6) / 7 367 } 368 func sozPagination(x uint64) (n int) { 369 return sovPagination(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 370 } 371 func (m *PageRequest) Unmarshal(dAtA []byte) error { 372 l := len(dAtA) 373 iNdEx := 0 374 for iNdEx < l { 375 preIndex := iNdEx 376 var wire uint64 377 for shift := uint(0); ; shift += 7 { 378 if shift >= 64 { 379 return ErrIntOverflowPagination 380 } 381 if iNdEx >= l { 382 return io.ErrUnexpectedEOF 383 } 384 b := dAtA[iNdEx] 385 iNdEx++ 386 wire |= uint64(b&0x7F) << shift 387 if b < 0x80 { 388 break 389 } 390 } 391 fieldNum := int32(wire >> 3) 392 wireType := int(wire & 0x7) 393 if wireType == 4 { 394 return fmt.Errorf("proto: PageRequest: wiretype end group for non-group") 395 } 396 if fieldNum <= 0 { 397 return fmt.Errorf("proto: PageRequest: illegal tag %d (wire type %d)", fieldNum, wire) 398 } 399 switch fieldNum { 400 case 1: 401 if wireType != 2 { 402 return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) 403 } 404 var byteLen int 405 for shift := uint(0); ; shift += 7 { 406 if shift >= 64 { 407 return ErrIntOverflowPagination 408 } 409 if iNdEx >= l { 410 return io.ErrUnexpectedEOF 411 } 412 b := dAtA[iNdEx] 413 iNdEx++ 414 byteLen |= int(b&0x7F) << shift 415 if b < 0x80 { 416 break 417 } 418 } 419 if byteLen < 0 { 420 return ErrInvalidLengthPagination 421 } 422 postIndex := iNdEx + byteLen 423 if postIndex < 0 { 424 return ErrInvalidLengthPagination 425 } 426 if postIndex > l { 427 return io.ErrUnexpectedEOF 428 } 429 m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) 430 if m.Key == nil { 431 m.Key = []byte{} 432 } 433 iNdEx = postIndex 434 case 2: 435 if wireType != 0 { 436 return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) 437 } 438 m.Offset = 0 439 for shift := uint(0); ; shift += 7 { 440 if shift >= 64 { 441 return ErrIntOverflowPagination 442 } 443 if iNdEx >= l { 444 return io.ErrUnexpectedEOF 445 } 446 b := dAtA[iNdEx] 447 iNdEx++ 448 m.Offset |= uint64(b&0x7F) << shift 449 if b < 0x80 { 450 break 451 } 452 } 453 case 3: 454 if wireType != 0 { 455 return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) 456 } 457 m.Limit = 0 458 for shift := uint(0); ; shift += 7 { 459 if shift >= 64 { 460 return ErrIntOverflowPagination 461 } 462 if iNdEx >= l { 463 return io.ErrUnexpectedEOF 464 } 465 b := dAtA[iNdEx] 466 iNdEx++ 467 m.Limit |= uint64(b&0x7F) << shift 468 if b < 0x80 { 469 break 470 } 471 } 472 case 4: 473 if wireType != 0 { 474 return fmt.Errorf("proto: wrong wireType = %d for field CountTotal", wireType) 475 } 476 var v int 477 for shift := uint(0); ; shift += 7 { 478 if shift >= 64 { 479 return ErrIntOverflowPagination 480 } 481 if iNdEx >= l { 482 return io.ErrUnexpectedEOF 483 } 484 b := dAtA[iNdEx] 485 iNdEx++ 486 v |= int(b&0x7F) << shift 487 if b < 0x80 { 488 break 489 } 490 } 491 m.CountTotal = bool(v != 0) 492 case 5: 493 if wireType != 0 { 494 return fmt.Errorf("proto: wrong wireType = %d for field Reverse", wireType) 495 } 496 var v int 497 for shift := uint(0); ; shift += 7 { 498 if shift >= 64 { 499 return ErrIntOverflowPagination 500 } 501 if iNdEx >= l { 502 return io.ErrUnexpectedEOF 503 } 504 b := dAtA[iNdEx] 505 iNdEx++ 506 v |= int(b&0x7F) << shift 507 if b < 0x80 { 508 break 509 } 510 } 511 m.Reverse = bool(v != 0) 512 default: 513 iNdEx = preIndex 514 skippy, err := skipPagination(dAtA[iNdEx:]) 515 if err != nil { 516 return err 517 } 518 if (skippy < 0) || (iNdEx+skippy) < 0 { 519 return ErrInvalidLengthPagination 520 } 521 if (iNdEx + skippy) > l { 522 return io.ErrUnexpectedEOF 523 } 524 iNdEx += skippy 525 } 526 } 527 528 if iNdEx > l { 529 return io.ErrUnexpectedEOF 530 } 531 return nil 532 } 533 func (m *PageResponse) Unmarshal(dAtA []byte) error { 534 l := len(dAtA) 535 iNdEx := 0 536 for iNdEx < l { 537 preIndex := iNdEx 538 var wire uint64 539 for shift := uint(0); ; shift += 7 { 540 if shift >= 64 { 541 return ErrIntOverflowPagination 542 } 543 if iNdEx >= l { 544 return io.ErrUnexpectedEOF 545 } 546 b := dAtA[iNdEx] 547 iNdEx++ 548 wire |= uint64(b&0x7F) << shift 549 if b < 0x80 { 550 break 551 } 552 } 553 fieldNum := int32(wire >> 3) 554 wireType := int(wire & 0x7) 555 if wireType == 4 { 556 return fmt.Errorf("proto: PageResponse: wiretype end group for non-group") 557 } 558 if fieldNum <= 0 { 559 return fmt.Errorf("proto: PageResponse: illegal tag %d (wire type %d)", fieldNum, wire) 560 } 561 switch fieldNum { 562 case 1: 563 if wireType != 2 { 564 return fmt.Errorf("proto: wrong wireType = %d for field NextKey", wireType) 565 } 566 var byteLen int 567 for shift := uint(0); ; shift += 7 { 568 if shift >= 64 { 569 return ErrIntOverflowPagination 570 } 571 if iNdEx >= l { 572 return io.ErrUnexpectedEOF 573 } 574 b := dAtA[iNdEx] 575 iNdEx++ 576 byteLen |= int(b&0x7F) << shift 577 if b < 0x80 { 578 break 579 } 580 } 581 if byteLen < 0 { 582 return ErrInvalidLengthPagination 583 } 584 postIndex := iNdEx + byteLen 585 if postIndex < 0 { 586 return ErrInvalidLengthPagination 587 } 588 if postIndex > l { 589 return io.ErrUnexpectedEOF 590 } 591 m.NextKey = append(m.NextKey[:0], dAtA[iNdEx:postIndex]...) 592 if m.NextKey == nil { 593 m.NextKey = []byte{} 594 } 595 iNdEx = postIndex 596 case 2: 597 if wireType != 0 { 598 return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) 599 } 600 m.Total = 0 601 for shift := uint(0); ; shift += 7 { 602 if shift >= 64 { 603 return ErrIntOverflowPagination 604 } 605 if iNdEx >= l { 606 return io.ErrUnexpectedEOF 607 } 608 b := dAtA[iNdEx] 609 iNdEx++ 610 m.Total |= uint64(b&0x7F) << shift 611 if b < 0x80 { 612 break 613 } 614 } 615 default: 616 iNdEx = preIndex 617 skippy, err := skipPagination(dAtA[iNdEx:]) 618 if err != nil { 619 return err 620 } 621 if (skippy < 0) || (iNdEx+skippy) < 0 { 622 return ErrInvalidLengthPagination 623 } 624 if (iNdEx + skippy) > l { 625 return io.ErrUnexpectedEOF 626 } 627 iNdEx += skippy 628 } 629 } 630 631 if iNdEx > l { 632 return io.ErrUnexpectedEOF 633 } 634 return nil 635 } 636 func skipPagination(dAtA []byte) (n int, err error) { 637 l := len(dAtA) 638 iNdEx := 0 639 depth := 0 640 for iNdEx < l { 641 var wire uint64 642 for shift := uint(0); ; shift += 7 { 643 if shift >= 64 { 644 return 0, ErrIntOverflowPagination 645 } 646 if iNdEx >= l { 647 return 0, io.ErrUnexpectedEOF 648 } 649 b := dAtA[iNdEx] 650 iNdEx++ 651 wire |= (uint64(b) & 0x7F) << shift 652 if b < 0x80 { 653 break 654 } 655 } 656 wireType := int(wire & 0x7) 657 switch wireType { 658 case 0: 659 for shift := uint(0); ; shift += 7 { 660 if shift >= 64 { 661 return 0, ErrIntOverflowPagination 662 } 663 if iNdEx >= l { 664 return 0, io.ErrUnexpectedEOF 665 } 666 iNdEx++ 667 if dAtA[iNdEx-1] < 0x80 { 668 break 669 } 670 } 671 case 1: 672 iNdEx += 8 673 case 2: 674 var length int 675 for shift := uint(0); ; shift += 7 { 676 if shift >= 64 { 677 return 0, ErrIntOverflowPagination 678 } 679 if iNdEx >= l { 680 return 0, io.ErrUnexpectedEOF 681 } 682 b := dAtA[iNdEx] 683 iNdEx++ 684 length |= (int(b) & 0x7F) << shift 685 if b < 0x80 { 686 break 687 } 688 } 689 if length < 0 { 690 return 0, ErrInvalidLengthPagination 691 } 692 iNdEx += length 693 case 3: 694 depth++ 695 case 4: 696 if depth == 0 { 697 return 0, ErrUnexpectedEndOfGroupPagination 698 } 699 depth-- 700 case 5: 701 iNdEx += 4 702 default: 703 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 704 } 705 if iNdEx < 0 { 706 return 0, ErrInvalidLengthPagination 707 } 708 if depth == 0 { 709 return iNdEx, nil 710 } 711 } 712 return 0, io.ErrUnexpectedEOF 713 } 714 715 var ( 716 ErrInvalidLengthPagination = fmt.Errorf("proto: negative length found during unmarshaling") 717 ErrIntOverflowPagination = fmt.Errorf("proto: integer overflow") 718 ErrUnexpectedEndOfGroupPagination = fmt.Errorf("proto: unexpected end of group") 719 )