github.com/pingcap/badger@v1.5.1-0.20230103063557-828f39b09b6d/protos/manifest.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: manifest.proto 3 4 package protos 5 6 import ( 7 fmt "fmt" 8 proto "github.com/golang/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.ProtoPackageIsVersion3 // please upgrade the proto package 24 25 type ManifestChange_Operation int32 26 27 const ( 28 ManifestChange_CREATE ManifestChange_Operation = 0 29 ManifestChange_DELETE ManifestChange_Operation = 1 30 ManifestChange_MOVE_DOWN ManifestChange_Operation = 2 31 ) 32 33 var ManifestChange_Operation_name = map[int32]string{ 34 0: "CREATE", 35 1: "DELETE", 36 2: "MOVE_DOWN", 37 } 38 39 var ManifestChange_Operation_value = map[string]int32{ 40 "CREATE": 0, 41 "DELETE": 1, 42 "MOVE_DOWN": 2, 43 } 44 45 func (x ManifestChange_Operation) String() string { 46 return proto.EnumName(ManifestChange_Operation_name, int32(x)) 47 } 48 49 func (ManifestChange_Operation) EnumDescriptor() ([]byte, []int) { 50 return fileDescriptor_0bb23f43f7afb4c1, []int{2, 0} 51 } 52 53 type ManifestChangeSet struct { 54 // A set of changes that are applied atomically. 55 Changes []*ManifestChange `protobuf:"bytes,1,rep,name=changes,proto3" json:"changes,omitempty"` 56 Head *HeadInfo `protobuf:"bytes,2,opt,name=head,proto3" json:"head,omitempty"` 57 XXX_NoUnkeyedLiteral struct{} `json:"-"` 58 XXX_unrecognized []byte `json:"-"` 59 XXX_sizecache int32 `json:"-"` 60 } 61 62 func (m *ManifestChangeSet) Reset() { *m = ManifestChangeSet{} } 63 func (m *ManifestChangeSet) String() string { return proto.CompactTextString(m) } 64 func (*ManifestChangeSet) ProtoMessage() {} 65 func (*ManifestChangeSet) Descriptor() ([]byte, []int) { 66 return fileDescriptor_0bb23f43f7afb4c1, []int{0} 67 } 68 func (m *ManifestChangeSet) XXX_Unmarshal(b []byte) error { 69 return m.Unmarshal(b) 70 } 71 func (m *ManifestChangeSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 72 if deterministic { 73 return xxx_messageInfo_ManifestChangeSet.Marshal(b, m, deterministic) 74 } else { 75 b = b[:cap(b)] 76 n, err := m.MarshalToSizedBuffer(b) 77 if err != nil { 78 return nil, err 79 } 80 return b[:n], nil 81 } 82 } 83 func (m *ManifestChangeSet) XXX_Merge(src proto.Message) { 84 xxx_messageInfo_ManifestChangeSet.Merge(m, src) 85 } 86 func (m *ManifestChangeSet) XXX_Size() int { 87 return m.Size() 88 } 89 func (m *ManifestChangeSet) XXX_DiscardUnknown() { 90 xxx_messageInfo_ManifestChangeSet.DiscardUnknown(m) 91 } 92 93 var xxx_messageInfo_ManifestChangeSet proto.InternalMessageInfo 94 95 func (m *ManifestChangeSet) GetChanges() []*ManifestChange { 96 if m != nil { 97 return m.Changes 98 } 99 return nil 100 } 101 102 func (m *ManifestChangeSet) GetHead() *HeadInfo { 103 if m != nil { 104 return m.Head 105 } 106 return nil 107 } 108 109 type HeadInfo struct { 110 Version uint64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` 111 LogID uint32 `protobuf:"varint,2,opt,name=logID,proto3" json:"logID,omitempty"` 112 LogOffset uint32 `protobuf:"varint,3,opt,name=logOffset,proto3" json:"logOffset,omitempty"` 113 XXX_NoUnkeyedLiteral struct{} `json:"-"` 114 XXX_unrecognized []byte `json:"-"` 115 XXX_sizecache int32 `json:"-"` 116 } 117 118 func (m *HeadInfo) Reset() { *m = HeadInfo{} } 119 func (m *HeadInfo) String() string { return proto.CompactTextString(m) } 120 func (*HeadInfo) ProtoMessage() {} 121 func (*HeadInfo) Descriptor() ([]byte, []int) { 122 return fileDescriptor_0bb23f43f7afb4c1, []int{1} 123 } 124 func (m *HeadInfo) XXX_Unmarshal(b []byte) error { 125 return m.Unmarshal(b) 126 } 127 func (m *HeadInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 128 if deterministic { 129 return xxx_messageInfo_HeadInfo.Marshal(b, m, deterministic) 130 } else { 131 b = b[:cap(b)] 132 n, err := m.MarshalToSizedBuffer(b) 133 if err != nil { 134 return nil, err 135 } 136 return b[:n], nil 137 } 138 } 139 func (m *HeadInfo) XXX_Merge(src proto.Message) { 140 xxx_messageInfo_HeadInfo.Merge(m, src) 141 } 142 func (m *HeadInfo) XXX_Size() int { 143 return m.Size() 144 } 145 func (m *HeadInfo) XXX_DiscardUnknown() { 146 xxx_messageInfo_HeadInfo.DiscardUnknown(m) 147 } 148 149 var xxx_messageInfo_HeadInfo proto.InternalMessageInfo 150 151 func (m *HeadInfo) GetVersion() uint64 { 152 if m != nil { 153 return m.Version 154 } 155 return 0 156 } 157 158 func (m *HeadInfo) GetLogID() uint32 { 159 if m != nil { 160 return m.LogID 161 } 162 return 0 163 } 164 165 func (m *HeadInfo) GetLogOffset() uint32 { 166 if m != nil { 167 return m.LogOffset 168 } 169 return 0 170 } 171 172 type ManifestChange struct { 173 Id uint64 `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty"` 174 Op ManifestChange_Operation `protobuf:"varint,2,opt,name=Op,proto3,enum=protos.ManifestChange_Operation" json:"Op,omitempty"` 175 Level uint32 `protobuf:"varint,3,opt,name=Level,proto3" json:"Level,omitempty"` 176 XXX_NoUnkeyedLiteral struct{} `json:"-"` 177 XXX_unrecognized []byte `json:"-"` 178 XXX_sizecache int32 `json:"-"` 179 } 180 181 func (m *ManifestChange) Reset() { *m = ManifestChange{} } 182 func (m *ManifestChange) String() string { return proto.CompactTextString(m) } 183 func (*ManifestChange) ProtoMessage() {} 184 func (*ManifestChange) Descriptor() ([]byte, []int) { 185 return fileDescriptor_0bb23f43f7afb4c1, []int{2} 186 } 187 func (m *ManifestChange) XXX_Unmarshal(b []byte) error { 188 return m.Unmarshal(b) 189 } 190 func (m *ManifestChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 191 if deterministic { 192 return xxx_messageInfo_ManifestChange.Marshal(b, m, deterministic) 193 } else { 194 b = b[:cap(b)] 195 n, err := m.MarshalToSizedBuffer(b) 196 if err != nil { 197 return nil, err 198 } 199 return b[:n], nil 200 } 201 } 202 func (m *ManifestChange) XXX_Merge(src proto.Message) { 203 xxx_messageInfo_ManifestChange.Merge(m, src) 204 } 205 func (m *ManifestChange) XXX_Size() int { 206 return m.Size() 207 } 208 func (m *ManifestChange) XXX_DiscardUnknown() { 209 xxx_messageInfo_ManifestChange.DiscardUnknown(m) 210 } 211 212 var xxx_messageInfo_ManifestChange proto.InternalMessageInfo 213 214 func (m *ManifestChange) GetId() uint64 { 215 if m != nil { 216 return m.Id 217 } 218 return 0 219 } 220 221 func (m *ManifestChange) GetOp() ManifestChange_Operation { 222 if m != nil { 223 return m.Op 224 } 225 return ManifestChange_CREATE 226 } 227 228 func (m *ManifestChange) GetLevel() uint32 { 229 if m != nil { 230 return m.Level 231 } 232 return 0 233 } 234 235 func init() { 236 proto.RegisterEnum("protos.ManifestChange_Operation", ManifestChange_Operation_name, ManifestChange_Operation_value) 237 proto.RegisterType((*ManifestChangeSet)(nil), "protos.ManifestChangeSet") 238 proto.RegisterType((*HeadInfo)(nil), "protos.HeadInfo") 239 proto.RegisterType((*ManifestChange)(nil), "protos.ManifestChange") 240 } 241 242 func init() { proto.RegisterFile("manifest.proto", fileDescriptor_0bb23f43f7afb4c1) } 243 244 var fileDescriptor_0bb23f43f7afb4c1 = []byte{ 245 // 297 bytes of a gzipped FileDescriptorProto 246 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xcb, 0x4d, 0xcc, 0xcb, 247 0x4c, 0x4b, 0x2d, 0x2e, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x03, 0x53, 0xc5, 0x4a, 248 0xd9, 0x5c, 0x82, 0xbe, 0x50, 0x19, 0xe7, 0x8c, 0xc4, 0xbc, 0xf4, 0xd4, 0xe0, 0xd4, 0x12, 0x21, 249 0x03, 0x2e, 0xf6, 0x64, 0x30, 0xa7, 0x58, 0x82, 0x51, 0x81, 0x59, 0x83, 0xdb, 0x48, 0x0c, 0xa2, 250 0xab, 0x58, 0x0f, 0x55, 0x6d, 0x10, 0x4c, 0x99, 0x90, 0x0a, 0x17, 0x4b, 0x46, 0x6a, 0x62, 0x8a, 251 0x04, 0x93, 0x02, 0xa3, 0x06, 0xb7, 0x91, 0x00, 0x4c, 0xb9, 0x47, 0x6a, 0x62, 0x8a, 0x67, 0x5e, 252 0x5a, 0x7e, 0x10, 0x58, 0x56, 0x29, 0x82, 0x8b, 0x03, 0x26, 0x22, 0x24, 0xc1, 0xc5, 0x5e, 0x96, 253 0x5a, 0x54, 0x9c, 0x99, 0x9f, 0x27, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x12, 0x04, 0xe3, 0x0a, 0x89, 254 0x70, 0xb1, 0xe6, 0xe4, 0xa7, 0x7b, 0xba, 0x80, 0x0d, 0xe3, 0x0d, 0x82, 0x70, 0x84, 0x64, 0xb8, 255 0x38, 0x73, 0xf2, 0xd3, 0xfd, 0xd3, 0xd2, 0x8a, 0x53, 0x4b, 0x24, 0x98, 0xc1, 0x32, 0x08, 0x01, 256 0xa5, 0x39, 0x8c, 0x5c, 0x7c, 0xa8, 0x6e, 0x13, 0xe2, 0xe3, 0x62, 0xf2, 0x4c, 0x81, 0x9a, 0xcd, 257 0xe4, 0x99, 0x22, 0x64, 0xc0, 0xc5, 0xe4, 0x5f, 0x00, 0x36, 0x93, 0xcf, 0x48, 0x01, 0xbb, 0x7f, 258 0xf4, 0xfc, 0x0b, 0x52, 0x8b, 0x12, 0x4b, 0x32, 0xf3, 0xf3, 0x82, 0x98, 0xfc, 0x0b, 0x40, 0x0e, 259 0xf1, 0x49, 0x2d, 0x4b, 0xcd, 0x81, 0x5a, 0x07, 0xe1, 0x28, 0x19, 0x71, 0x71, 0xc2, 0x95, 0x09, 260 0x71, 0x71, 0xb1, 0x39, 0x07, 0xb9, 0x3a, 0x86, 0xb8, 0x0a, 0x30, 0x80, 0xd8, 0x2e, 0xae, 0x3e, 261 0xae, 0x21, 0xae, 0x02, 0x8c, 0x42, 0xbc, 0x5c, 0x9c, 0xbe, 0xfe, 0x61, 0xae, 0xf1, 0x2e, 0xfe, 262 0xe1, 0x7e, 0x02, 0x4c, 0x4e, 0x02, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 263 0x91, 0x1c, 0xe3, 0x8c, 0xc7, 0x72, 0x0c, 0x49, 0x90, 0xf0, 0x37, 0x06, 0x04, 0x00, 0x00, 0xff, 264 0xff, 0x3a, 0x13, 0x93, 0x83, 0x98, 0x01, 0x00, 0x00, 265 } 266 267 func (m *ManifestChangeSet) Marshal() (dAtA []byte, err error) { 268 size := m.Size() 269 dAtA = make([]byte, size) 270 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 271 if err != nil { 272 return nil, err 273 } 274 return dAtA[:n], nil 275 } 276 277 func (m *ManifestChangeSet) MarshalTo(dAtA []byte) (int, error) { 278 size := m.Size() 279 return m.MarshalToSizedBuffer(dAtA[:size]) 280 } 281 282 func (m *ManifestChangeSet) MarshalToSizedBuffer(dAtA []byte) (int, error) { 283 i := len(dAtA) 284 _ = i 285 var l int 286 _ = l 287 if m.XXX_unrecognized != nil { 288 i -= len(m.XXX_unrecognized) 289 copy(dAtA[i:], m.XXX_unrecognized) 290 } 291 if m.Head != nil { 292 { 293 size, err := m.Head.MarshalToSizedBuffer(dAtA[:i]) 294 if err != nil { 295 return 0, err 296 } 297 i -= size 298 i = encodeVarintManifest(dAtA, i, uint64(size)) 299 } 300 i-- 301 dAtA[i] = 0x12 302 } 303 if len(m.Changes) > 0 { 304 for iNdEx := len(m.Changes) - 1; iNdEx >= 0; iNdEx-- { 305 { 306 size, err := m.Changes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 307 if err != nil { 308 return 0, err 309 } 310 i -= size 311 i = encodeVarintManifest(dAtA, i, uint64(size)) 312 } 313 i-- 314 dAtA[i] = 0xa 315 } 316 } 317 return len(dAtA) - i, nil 318 } 319 320 func (m *HeadInfo) Marshal() (dAtA []byte, err error) { 321 size := m.Size() 322 dAtA = make([]byte, size) 323 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 324 if err != nil { 325 return nil, err 326 } 327 return dAtA[:n], nil 328 } 329 330 func (m *HeadInfo) MarshalTo(dAtA []byte) (int, error) { 331 size := m.Size() 332 return m.MarshalToSizedBuffer(dAtA[:size]) 333 } 334 335 func (m *HeadInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { 336 i := len(dAtA) 337 _ = i 338 var l int 339 _ = l 340 if m.XXX_unrecognized != nil { 341 i -= len(m.XXX_unrecognized) 342 copy(dAtA[i:], m.XXX_unrecognized) 343 } 344 if m.LogOffset != 0 { 345 i = encodeVarintManifest(dAtA, i, uint64(m.LogOffset)) 346 i-- 347 dAtA[i] = 0x18 348 } 349 if m.LogID != 0 { 350 i = encodeVarintManifest(dAtA, i, uint64(m.LogID)) 351 i-- 352 dAtA[i] = 0x10 353 } 354 if m.Version != 0 { 355 i = encodeVarintManifest(dAtA, i, uint64(m.Version)) 356 i-- 357 dAtA[i] = 0x8 358 } 359 return len(dAtA) - i, nil 360 } 361 362 func (m *ManifestChange) Marshal() (dAtA []byte, err error) { 363 size := m.Size() 364 dAtA = make([]byte, size) 365 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 366 if err != nil { 367 return nil, err 368 } 369 return dAtA[:n], nil 370 } 371 372 func (m *ManifestChange) MarshalTo(dAtA []byte) (int, error) { 373 size := m.Size() 374 return m.MarshalToSizedBuffer(dAtA[:size]) 375 } 376 377 func (m *ManifestChange) MarshalToSizedBuffer(dAtA []byte) (int, error) { 378 i := len(dAtA) 379 _ = i 380 var l int 381 _ = l 382 if m.XXX_unrecognized != nil { 383 i -= len(m.XXX_unrecognized) 384 copy(dAtA[i:], m.XXX_unrecognized) 385 } 386 if m.Level != 0 { 387 i = encodeVarintManifest(dAtA, i, uint64(m.Level)) 388 i-- 389 dAtA[i] = 0x18 390 } 391 if m.Op != 0 { 392 i = encodeVarintManifest(dAtA, i, uint64(m.Op)) 393 i-- 394 dAtA[i] = 0x10 395 } 396 if m.Id != 0 { 397 i = encodeVarintManifest(dAtA, i, uint64(m.Id)) 398 i-- 399 dAtA[i] = 0x8 400 } 401 return len(dAtA) - i, nil 402 } 403 404 func encodeVarintManifest(dAtA []byte, offset int, v uint64) int { 405 offset -= sovManifest(v) 406 base := offset 407 for v >= 1<<7 { 408 dAtA[offset] = uint8(v&0x7f | 0x80) 409 v >>= 7 410 offset++ 411 } 412 dAtA[offset] = uint8(v) 413 return base 414 } 415 func (m *ManifestChangeSet) Size() (n int) { 416 if m == nil { 417 return 0 418 } 419 var l int 420 _ = l 421 if len(m.Changes) > 0 { 422 for _, e := range m.Changes { 423 l = e.Size() 424 n += 1 + l + sovManifest(uint64(l)) 425 } 426 } 427 if m.Head != nil { 428 l = m.Head.Size() 429 n += 1 + l + sovManifest(uint64(l)) 430 } 431 if m.XXX_unrecognized != nil { 432 n += len(m.XXX_unrecognized) 433 } 434 return n 435 } 436 437 func (m *HeadInfo) Size() (n int) { 438 if m == nil { 439 return 0 440 } 441 var l int 442 _ = l 443 if m.Version != 0 { 444 n += 1 + sovManifest(uint64(m.Version)) 445 } 446 if m.LogID != 0 { 447 n += 1 + sovManifest(uint64(m.LogID)) 448 } 449 if m.LogOffset != 0 { 450 n += 1 + sovManifest(uint64(m.LogOffset)) 451 } 452 if m.XXX_unrecognized != nil { 453 n += len(m.XXX_unrecognized) 454 } 455 return n 456 } 457 458 func (m *ManifestChange) Size() (n int) { 459 if m == nil { 460 return 0 461 } 462 var l int 463 _ = l 464 if m.Id != 0 { 465 n += 1 + sovManifest(uint64(m.Id)) 466 } 467 if m.Op != 0 { 468 n += 1 + sovManifest(uint64(m.Op)) 469 } 470 if m.Level != 0 { 471 n += 1 + sovManifest(uint64(m.Level)) 472 } 473 if m.XXX_unrecognized != nil { 474 n += len(m.XXX_unrecognized) 475 } 476 return n 477 } 478 479 func sovManifest(x uint64) (n int) { 480 return (math_bits.Len64(x|1) + 6) / 7 481 } 482 func sozManifest(x uint64) (n int) { 483 return sovManifest(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 484 } 485 func (m *ManifestChangeSet) Unmarshal(dAtA []byte) error { 486 l := len(dAtA) 487 iNdEx := 0 488 for iNdEx < l { 489 preIndex := iNdEx 490 var wire uint64 491 for shift := uint(0); ; shift += 7 { 492 if shift >= 64 { 493 return ErrIntOverflowManifest 494 } 495 if iNdEx >= l { 496 return io.ErrUnexpectedEOF 497 } 498 b := dAtA[iNdEx] 499 iNdEx++ 500 wire |= uint64(b&0x7F) << shift 501 if b < 0x80 { 502 break 503 } 504 } 505 fieldNum := int32(wire >> 3) 506 wireType := int(wire & 0x7) 507 if wireType == 4 { 508 return fmt.Errorf("proto: ManifestChangeSet: wiretype end group for non-group") 509 } 510 if fieldNum <= 0 { 511 return fmt.Errorf("proto: ManifestChangeSet: illegal tag %d (wire type %d)", fieldNum, wire) 512 } 513 switch fieldNum { 514 case 1: 515 if wireType != 2 { 516 return fmt.Errorf("proto: wrong wireType = %d for field Changes", wireType) 517 } 518 var msglen int 519 for shift := uint(0); ; shift += 7 { 520 if shift >= 64 { 521 return ErrIntOverflowManifest 522 } 523 if iNdEx >= l { 524 return io.ErrUnexpectedEOF 525 } 526 b := dAtA[iNdEx] 527 iNdEx++ 528 msglen |= int(b&0x7F) << shift 529 if b < 0x80 { 530 break 531 } 532 } 533 if msglen < 0 { 534 return ErrInvalidLengthManifest 535 } 536 postIndex := iNdEx + msglen 537 if postIndex < 0 { 538 return ErrInvalidLengthManifest 539 } 540 if postIndex > l { 541 return io.ErrUnexpectedEOF 542 } 543 m.Changes = append(m.Changes, &ManifestChange{}) 544 if err := m.Changes[len(m.Changes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 545 return err 546 } 547 iNdEx = postIndex 548 case 2: 549 if wireType != 2 { 550 return fmt.Errorf("proto: wrong wireType = %d for field Head", wireType) 551 } 552 var msglen int 553 for shift := uint(0); ; shift += 7 { 554 if shift >= 64 { 555 return ErrIntOverflowManifest 556 } 557 if iNdEx >= l { 558 return io.ErrUnexpectedEOF 559 } 560 b := dAtA[iNdEx] 561 iNdEx++ 562 msglen |= int(b&0x7F) << shift 563 if b < 0x80 { 564 break 565 } 566 } 567 if msglen < 0 { 568 return ErrInvalidLengthManifest 569 } 570 postIndex := iNdEx + msglen 571 if postIndex < 0 { 572 return ErrInvalidLengthManifest 573 } 574 if postIndex > l { 575 return io.ErrUnexpectedEOF 576 } 577 if m.Head == nil { 578 m.Head = &HeadInfo{} 579 } 580 if err := m.Head.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 581 return err 582 } 583 iNdEx = postIndex 584 default: 585 iNdEx = preIndex 586 skippy, err := skipManifest(dAtA[iNdEx:]) 587 if err != nil { 588 return err 589 } 590 if skippy < 0 { 591 return ErrInvalidLengthManifest 592 } 593 if (iNdEx + skippy) < 0 { 594 return ErrInvalidLengthManifest 595 } 596 if (iNdEx + skippy) > l { 597 return io.ErrUnexpectedEOF 598 } 599 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 600 iNdEx += skippy 601 } 602 } 603 604 if iNdEx > l { 605 return io.ErrUnexpectedEOF 606 } 607 return nil 608 } 609 func (m *HeadInfo) Unmarshal(dAtA []byte) error { 610 l := len(dAtA) 611 iNdEx := 0 612 for iNdEx < l { 613 preIndex := iNdEx 614 var wire uint64 615 for shift := uint(0); ; shift += 7 { 616 if shift >= 64 { 617 return ErrIntOverflowManifest 618 } 619 if iNdEx >= l { 620 return io.ErrUnexpectedEOF 621 } 622 b := dAtA[iNdEx] 623 iNdEx++ 624 wire |= uint64(b&0x7F) << shift 625 if b < 0x80 { 626 break 627 } 628 } 629 fieldNum := int32(wire >> 3) 630 wireType := int(wire & 0x7) 631 if wireType == 4 { 632 return fmt.Errorf("proto: HeadInfo: wiretype end group for non-group") 633 } 634 if fieldNum <= 0 { 635 return fmt.Errorf("proto: HeadInfo: illegal tag %d (wire type %d)", fieldNum, wire) 636 } 637 switch fieldNum { 638 case 1: 639 if wireType != 0 { 640 return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) 641 } 642 m.Version = 0 643 for shift := uint(0); ; shift += 7 { 644 if shift >= 64 { 645 return ErrIntOverflowManifest 646 } 647 if iNdEx >= l { 648 return io.ErrUnexpectedEOF 649 } 650 b := dAtA[iNdEx] 651 iNdEx++ 652 m.Version |= uint64(b&0x7F) << shift 653 if b < 0x80 { 654 break 655 } 656 } 657 case 2: 658 if wireType != 0 { 659 return fmt.Errorf("proto: wrong wireType = %d for field LogID", wireType) 660 } 661 m.LogID = 0 662 for shift := uint(0); ; shift += 7 { 663 if shift >= 64 { 664 return ErrIntOverflowManifest 665 } 666 if iNdEx >= l { 667 return io.ErrUnexpectedEOF 668 } 669 b := dAtA[iNdEx] 670 iNdEx++ 671 m.LogID |= uint32(b&0x7F) << shift 672 if b < 0x80 { 673 break 674 } 675 } 676 case 3: 677 if wireType != 0 { 678 return fmt.Errorf("proto: wrong wireType = %d for field LogOffset", wireType) 679 } 680 m.LogOffset = 0 681 for shift := uint(0); ; shift += 7 { 682 if shift >= 64 { 683 return ErrIntOverflowManifest 684 } 685 if iNdEx >= l { 686 return io.ErrUnexpectedEOF 687 } 688 b := dAtA[iNdEx] 689 iNdEx++ 690 m.LogOffset |= uint32(b&0x7F) << shift 691 if b < 0x80 { 692 break 693 } 694 } 695 default: 696 iNdEx = preIndex 697 skippy, err := skipManifest(dAtA[iNdEx:]) 698 if err != nil { 699 return err 700 } 701 if skippy < 0 { 702 return ErrInvalidLengthManifest 703 } 704 if (iNdEx + skippy) < 0 { 705 return ErrInvalidLengthManifest 706 } 707 if (iNdEx + skippy) > l { 708 return io.ErrUnexpectedEOF 709 } 710 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 711 iNdEx += skippy 712 } 713 } 714 715 if iNdEx > l { 716 return io.ErrUnexpectedEOF 717 } 718 return nil 719 } 720 func (m *ManifestChange) Unmarshal(dAtA []byte) error { 721 l := len(dAtA) 722 iNdEx := 0 723 for iNdEx < l { 724 preIndex := iNdEx 725 var wire uint64 726 for shift := uint(0); ; shift += 7 { 727 if shift >= 64 { 728 return ErrIntOverflowManifest 729 } 730 if iNdEx >= l { 731 return io.ErrUnexpectedEOF 732 } 733 b := dAtA[iNdEx] 734 iNdEx++ 735 wire |= uint64(b&0x7F) << shift 736 if b < 0x80 { 737 break 738 } 739 } 740 fieldNum := int32(wire >> 3) 741 wireType := int(wire & 0x7) 742 if wireType == 4 { 743 return fmt.Errorf("proto: ManifestChange: wiretype end group for non-group") 744 } 745 if fieldNum <= 0 { 746 return fmt.Errorf("proto: ManifestChange: illegal tag %d (wire type %d)", fieldNum, wire) 747 } 748 switch fieldNum { 749 case 1: 750 if wireType != 0 { 751 return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) 752 } 753 m.Id = 0 754 for shift := uint(0); ; shift += 7 { 755 if shift >= 64 { 756 return ErrIntOverflowManifest 757 } 758 if iNdEx >= l { 759 return io.ErrUnexpectedEOF 760 } 761 b := dAtA[iNdEx] 762 iNdEx++ 763 m.Id |= uint64(b&0x7F) << shift 764 if b < 0x80 { 765 break 766 } 767 } 768 case 2: 769 if wireType != 0 { 770 return fmt.Errorf("proto: wrong wireType = %d for field Op", wireType) 771 } 772 m.Op = 0 773 for shift := uint(0); ; shift += 7 { 774 if shift >= 64 { 775 return ErrIntOverflowManifest 776 } 777 if iNdEx >= l { 778 return io.ErrUnexpectedEOF 779 } 780 b := dAtA[iNdEx] 781 iNdEx++ 782 m.Op |= ManifestChange_Operation(b&0x7F) << shift 783 if b < 0x80 { 784 break 785 } 786 } 787 case 3: 788 if wireType != 0 { 789 return fmt.Errorf("proto: wrong wireType = %d for field Level", wireType) 790 } 791 m.Level = 0 792 for shift := uint(0); ; shift += 7 { 793 if shift >= 64 { 794 return ErrIntOverflowManifest 795 } 796 if iNdEx >= l { 797 return io.ErrUnexpectedEOF 798 } 799 b := dAtA[iNdEx] 800 iNdEx++ 801 m.Level |= uint32(b&0x7F) << shift 802 if b < 0x80 { 803 break 804 } 805 } 806 default: 807 iNdEx = preIndex 808 skippy, err := skipManifest(dAtA[iNdEx:]) 809 if err != nil { 810 return err 811 } 812 if skippy < 0 { 813 return ErrInvalidLengthManifest 814 } 815 if (iNdEx + skippy) < 0 { 816 return ErrInvalidLengthManifest 817 } 818 if (iNdEx + skippy) > l { 819 return io.ErrUnexpectedEOF 820 } 821 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 822 iNdEx += skippy 823 } 824 } 825 826 if iNdEx > l { 827 return io.ErrUnexpectedEOF 828 } 829 return nil 830 } 831 func skipManifest(dAtA []byte) (n int, err error) { 832 l := len(dAtA) 833 iNdEx := 0 834 depth := 0 835 for iNdEx < l { 836 var wire uint64 837 for shift := uint(0); ; shift += 7 { 838 if shift >= 64 { 839 return 0, ErrIntOverflowManifest 840 } 841 if iNdEx >= l { 842 return 0, io.ErrUnexpectedEOF 843 } 844 b := dAtA[iNdEx] 845 iNdEx++ 846 wire |= (uint64(b) & 0x7F) << shift 847 if b < 0x80 { 848 break 849 } 850 } 851 wireType := int(wire & 0x7) 852 switch wireType { 853 case 0: 854 for shift := uint(0); ; shift += 7 { 855 if shift >= 64 { 856 return 0, ErrIntOverflowManifest 857 } 858 if iNdEx >= l { 859 return 0, io.ErrUnexpectedEOF 860 } 861 iNdEx++ 862 if dAtA[iNdEx-1] < 0x80 { 863 break 864 } 865 } 866 case 1: 867 iNdEx += 8 868 case 2: 869 var length int 870 for shift := uint(0); ; shift += 7 { 871 if shift >= 64 { 872 return 0, ErrIntOverflowManifest 873 } 874 if iNdEx >= l { 875 return 0, io.ErrUnexpectedEOF 876 } 877 b := dAtA[iNdEx] 878 iNdEx++ 879 length |= (int(b) & 0x7F) << shift 880 if b < 0x80 { 881 break 882 } 883 } 884 if length < 0 { 885 return 0, ErrInvalidLengthManifest 886 } 887 iNdEx += length 888 case 3: 889 depth++ 890 case 4: 891 if depth == 0 { 892 return 0, ErrUnexpectedEndOfGroupManifest 893 } 894 depth-- 895 case 5: 896 iNdEx += 4 897 default: 898 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 899 } 900 if iNdEx < 0 { 901 return 0, ErrInvalidLengthManifest 902 } 903 if depth == 0 { 904 return iNdEx, nil 905 } 906 } 907 return 0, io.ErrUnexpectedEOF 908 } 909 910 var ( 911 ErrInvalidLengthManifest = fmt.Errorf("proto: negative length found during unmarshaling") 912 ErrIntOverflowManifest = fmt.Errorf("proto: integer overflow") 913 ErrUnexpectedEndOfGroupManifest = fmt.Errorf("proto: unexpected end of group") 914 )