github.com/demonoid81/containerd@v1.3.4/api/events/snapshot.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: github.com/containerd/containerd/api/events/snapshot.proto 3 4 package events 5 6 import ( 7 fmt "fmt" 8 proto "github.com/gogo/protobuf/proto" 9 io "io" 10 math "math" 11 reflect "reflect" 12 strings "strings" 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package 25 26 type SnapshotPrepare struct { 27 Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` 28 Parent string `protobuf:"bytes,2,opt,name=parent,proto3" json:"parent,omitempty"` 29 XXX_NoUnkeyedLiteral struct{} `json:"-"` 30 XXX_unrecognized []byte `json:"-"` 31 XXX_sizecache int32 `json:"-"` 32 } 33 34 func (m *SnapshotPrepare) Reset() { *m = SnapshotPrepare{} } 35 func (*SnapshotPrepare) ProtoMessage() {} 36 func (*SnapshotPrepare) Descriptor() ([]byte, []int) { 37 return fileDescriptor_bd6c184d3d9aa5f2, []int{0} 38 } 39 func (m *SnapshotPrepare) XXX_Unmarshal(b []byte) error { 40 return m.Unmarshal(b) 41 } 42 func (m *SnapshotPrepare) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 43 if deterministic { 44 return xxx_messageInfo_SnapshotPrepare.Marshal(b, m, deterministic) 45 } else { 46 b = b[:cap(b)] 47 n, err := m.MarshalTo(b) 48 if err != nil { 49 return nil, err 50 } 51 return b[:n], nil 52 } 53 } 54 func (m *SnapshotPrepare) XXX_Merge(src proto.Message) { 55 xxx_messageInfo_SnapshotPrepare.Merge(m, src) 56 } 57 func (m *SnapshotPrepare) XXX_Size() int { 58 return m.Size() 59 } 60 func (m *SnapshotPrepare) XXX_DiscardUnknown() { 61 xxx_messageInfo_SnapshotPrepare.DiscardUnknown(m) 62 } 63 64 var xxx_messageInfo_SnapshotPrepare proto.InternalMessageInfo 65 66 type SnapshotCommit struct { 67 Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` 68 Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` 69 XXX_NoUnkeyedLiteral struct{} `json:"-"` 70 XXX_unrecognized []byte `json:"-"` 71 XXX_sizecache int32 `json:"-"` 72 } 73 74 func (m *SnapshotCommit) Reset() { *m = SnapshotCommit{} } 75 func (*SnapshotCommit) ProtoMessage() {} 76 func (*SnapshotCommit) Descriptor() ([]byte, []int) { 77 return fileDescriptor_bd6c184d3d9aa5f2, []int{1} 78 } 79 func (m *SnapshotCommit) XXX_Unmarshal(b []byte) error { 80 return m.Unmarshal(b) 81 } 82 func (m *SnapshotCommit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 83 if deterministic { 84 return xxx_messageInfo_SnapshotCommit.Marshal(b, m, deterministic) 85 } else { 86 b = b[:cap(b)] 87 n, err := m.MarshalTo(b) 88 if err != nil { 89 return nil, err 90 } 91 return b[:n], nil 92 } 93 } 94 func (m *SnapshotCommit) XXX_Merge(src proto.Message) { 95 xxx_messageInfo_SnapshotCommit.Merge(m, src) 96 } 97 func (m *SnapshotCommit) XXX_Size() int { 98 return m.Size() 99 } 100 func (m *SnapshotCommit) XXX_DiscardUnknown() { 101 xxx_messageInfo_SnapshotCommit.DiscardUnknown(m) 102 } 103 104 var xxx_messageInfo_SnapshotCommit proto.InternalMessageInfo 105 106 type SnapshotRemove struct { 107 Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` 108 XXX_NoUnkeyedLiteral struct{} `json:"-"` 109 XXX_unrecognized []byte `json:"-"` 110 XXX_sizecache int32 `json:"-"` 111 } 112 113 func (m *SnapshotRemove) Reset() { *m = SnapshotRemove{} } 114 func (*SnapshotRemove) ProtoMessage() {} 115 func (*SnapshotRemove) Descriptor() ([]byte, []int) { 116 return fileDescriptor_bd6c184d3d9aa5f2, []int{2} 117 } 118 func (m *SnapshotRemove) XXX_Unmarshal(b []byte) error { 119 return m.Unmarshal(b) 120 } 121 func (m *SnapshotRemove) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 122 if deterministic { 123 return xxx_messageInfo_SnapshotRemove.Marshal(b, m, deterministic) 124 } else { 125 b = b[:cap(b)] 126 n, err := m.MarshalTo(b) 127 if err != nil { 128 return nil, err 129 } 130 return b[:n], nil 131 } 132 } 133 func (m *SnapshotRemove) XXX_Merge(src proto.Message) { 134 xxx_messageInfo_SnapshotRemove.Merge(m, src) 135 } 136 func (m *SnapshotRemove) XXX_Size() int { 137 return m.Size() 138 } 139 func (m *SnapshotRemove) XXX_DiscardUnknown() { 140 xxx_messageInfo_SnapshotRemove.DiscardUnknown(m) 141 } 142 143 var xxx_messageInfo_SnapshotRemove proto.InternalMessageInfo 144 145 func init() { 146 proto.RegisterType((*SnapshotPrepare)(nil), "containerd.events.SnapshotPrepare") 147 proto.RegisterType((*SnapshotCommit)(nil), "containerd.events.SnapshotCommit") 148 proto.RegisterType((*SnapshotRemove)(nil), "containerd.events.SnapshotRemove") 149 } 150 151 func init() { 152 proto.RegisterFile("github.com/containerd/containerd/api/events/snapshot.proto", fileDescriptor_bd6c184d3d9aa5f2) 153 } 154 155 var fileDescriptor_bd6c184d3d9aa5f2 = []byte{ 156 // 235 bytes of a gzipped FileDescriptorProto 157 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xb2, 0x4a, 0xcf, 0x2c, 0xc9, 158 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xce, 0xcf, 0x2b, 0x49, 0xcc, 0xcc, 0x4b, 0x2d, 159 0x4a, 0x41, 0x66, 0x26, 0x16, 0x64, 0xea, 0xa7, 0x96, 0xa5, 0xe6, 0x95, 0x14, 0xeb, 0x17, 0xe7, 160 0x25, 0x16, 0x14, 0x67, 0xe4, 0x97, 0xe8, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0x09, 0x22, 0x54, 161 0xe9, 0x41, 0x54, 0x48, 0x39, 0x10, 0x34, 0x0e, 0xac, 0x35, 0xa9, 0x34, 0x4d, 0xbf, 0x20, 0xa7, 162 0x34, 0x3d, 0x33, 0x4f, 0x3f, 0x2d, 0x33, 0x35, 0x27, 0xa5, 0x20, 0xb1, 0x24, 0x03, 0x62, 0xa8, 163 0x92, 0x35, 0x17, 0x7f, 0x30, 0xd4, 0x9a, 0x80, 0xa2, 0xd4, 0x82, 0xc4, 0xa2, 0x54, 0x21, 0x01, 164 0x2e, 0xe6, 0xec, 0xd4, 0x4a, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xce, 0x20, 0x10, 0x53, 0x48, 0x8c, 165 0x8b, 0x0d, 0x24, 0x93, 0x57, 0x22, 0xc1, 0x04, 0x16, 0x84, 0xf2, 0x94, 0xcc, 0xb8, 0xf8, 0x60, 166 0x9a, 0x9d, 0xf3, 0x73, 0x73, 0x33, 0x4b, 0xb0, 0xe8, 0x15, 0xe2, 0x62, 0xc9, 0x4b, 0xcc, 0x4d, 167 0x85, 0xea, 0x04, 0xb3, 0x95, 0x94, 0x10, 0xfa, 0x82, 0x52, 0x73, 0xf3, 0xcb, 0xb0, 0xd8, 0xe9, 168 0x14, 0x70, 0xe2, 0xa1, 0x1c, 0xc3, 0x8d, 0x87, 0x72, 0x0c, 0x0d, 0x8f, 0xe4, 0x18, 0x4f, 0x3c, 169 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x05, 0x5f, 0xe4, 0x18, 0xa3, 170 0x8c, 0x48, 0x08, 0x47, 0x6b, 0x08, 0x15, 0xc1, 0x90, 0xc4, 0x06, 0xf6, 0xb3, 0x31, 0x20, 0x00, 171 0x00, 0xff, 0xff, 0x69, 0x66, 0xa9, 0x2a, 0x86, 0x01, 0x00, 0x00, 172 } 173 174 // Field returns the value for the given fieldpath as a string, if defined. 175 // If the value is not defined, the second value will be false. 176 func (m *SnapshotPrepare) Field(fieldpath []string) (string, bool) { 177 if len(fieldpath) == 0 { 178 return "", false 179 } 180 181 switch fieldpath[0] { 182 case "key": 183 return string(m.Key), len(m.Key) > 0 184 case "parent": 185 return string(m.Parent), len(m.Parent) > 0 186 } 187 return "", false 188 } 189 190 // Field returns the value for the given fieldpath as a string, if defined. 191 // If the value is not defined, the second value will be false. 192 func (m *SnapshotCommit) Field(fieldpath []string) (string, bool) { 193 if len(fieldpath) == 0 { 194 return "", false 195 } 196 197 switch fieldpath[0] { 198 case "key": 199 return string(m.Key), len(m.Key) > 0 200 case "name": 201 return string(m.Name), len(m.Name) > 0 202 } 203 return "", false 204 } 205 206 // Field returns the value for the given fieldpath as a string, if defined. 207 // If the value is not defined, the second value will be false. 208 func (m *SnapshotRemove) Field(fieldpath []string) (string, bool) { 209 if len(fieldpath) == 0 { 210 return "", false 211 } 212 213 switch fieldpath[0] { 214 case "key": 215 return string(m.Key), len(m.Key) > 0 216 } 217 return "", false 218 } 219 func (m *SnapshotPrepare) Marshal() (dAtA []byte, err error) { 220 size := m.Size() 221 dAtA = make([]byte, size) 222 n, err := m.MarshalTo(dAtA) 223 if err != nil { 224 return nil, err 225 } 226 return dAtA[:n], nil 227 } 228 229 func (m *SnapshotPrepare) MarshalTo(dAtA []byte) (int, error) { 230 var i int 231 _ = i 232 var l int 233 _ = l 234 if len(m.Key) > 0 { 235 dAtA[i] = 0xa 236 i++ 237 i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Key))) 238 i += copy(dAtA[i:], m.Key) 239 } 240 if len(m.Parent) > 0 { 241 dAtA[i] = 0x12 242 i++ 243 i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Parent))) 244 i += copy(dAtA[i:], m.Parent) 245 } 246 if m.XXX_unrecognized != nil { 247 i += copy(dAtA[i:], m.XXX_unrecognized) 248 } 249 return i, nil 250 } 251 252 func (m *SnapshotCommit) Marshal() (dAtA []byte, err error) { 253 size := m.Size() 254 dAtA = make([]byte, size) 255 n, err := m.MarshalTo(dAtA) 256 if err != nil { 257 return nil, err 258 } 259 return dAtA[:n], nil 260 } 261 262 func (m *SnapshotCommit) MarshalTo(dAtA []byte) (int, error) { 263 var i int 264 _ = i 265 var l int 266 _ = l 267 if len(m.Key) > 0 { 268 dAtA[i] = 0xa 269 i++ 270 i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Key))) 271 i += copy(dAtA[i:], m.Key) 272 } 273 if len(m.Name) > 0 { 274 dAtA[i] = 0x12 275 i++ 276 i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Name))) 277 i += copy(dAtA[i:], m.Name) 278 } 279 if m.XXX_unrecognized != nil { 280 i += copy(dAtA[i:], m.XXX_unrecognized) 281 } 282 return i, nil 283 } 284 285 func (m *SnapshotRemove) Marshal() (dAtA []byte, err error) { 286 size := m.Size() 287 dAtA = make([]byte, size) 288 n, err := m.MarshalTo(dAtA) 289 if err != nil { 290 return nil, err 291 } 292 return dAtA[:n], nil 293 } 294 295 func (m *SnapshotRemove) MarshalTo(dAtA []byte) (int, error) { 296 var i int 297 _ = i 298 var l int 299 _ = l 300 if len(m.Key) > 0 { 301 dAtA[i] = 0xa 302 i++ 303 i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Key))) 304 i += copy(dAtA[i:], m.Key) 305 } 306 if m.XXX_unrecognized != nil { 307 i += copy(dAtA[i:], m.XXX_unrecognized) 308 } 309 return i, nil 310 } 311 312 func encodeVarintSnapshot(dAtA []byte, offset int, v uint64) int { 313 for v >= 1<<7 { 314 dAtA[offset] = uint8(v&0x7f | 0x80) 315 v >>= 7 316 offset++ 317 } 318 dAtA[offset] = uint8(v) 319 return offset + 1 320 } 321 func (m *SnapshotPrepare) Size() (n int) { 322 if m == nil { 323 return 0 324 } 325 var l int 326 _ = l 327 l = len(m.Key) 328 if l > 0 { 329 n += 1 + l + sovSnapshot(uint64(l)) 330 } 331 l = len(m.Parent) 332 if l > 0 { 333 n += 1 + l + sovSnapshot(uint64(l)) 334 } 335 if m.XXX_unrecognized != nil { 336 n += len(m.XXX_unrecognized) 337 } 338 return n 339 } 340 341 func (m *SnapshotCommit) Size() (n int) { 342 if m == nil { 343 return 0 344 } 345 var l int 346 _ = l 347 l = len(m.Key) 348 if l > 0 { 349 n += 1 + l + sovSnapshot(uint64(l)) 350 } 351 l = len(m.Name) 352 if l > 0 { 353 n += 1 + l + sovSnapshot(uint64(l)) 354 } 355 if m.XXX_unrecognized != nil { 356 n += len(m.XXX_unrecognized) 357 } 358 return n 359 } 360 361 func (m *SnapshotRemove) Size() (n int) { 362 if m == nil { 363 return 0 364 } 365 var l int 366 _ = l 367 l = len(m.Key) 368 if l > 0 { 369 n += 1 + l + sovSnapshot(uint64(l)) 370 } 371 if m.XXX_unrecognized != nil { 372 n += len(m.XXX_unrecognized) 373 } 374 return n 375 } 376 377 func sovSnapshot(x uint64) (n int) { 378 for { 379 n++ 380 x >>= 7 381 if x == 0 { 382 break 383 } 384 } 385 return n 386 } 387 func sozSnapshot(x uint64) (n int) { 388 return sovSnapshot(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 389 } 390 func (this *SnapshotPrepare) String() string { 391 if this == nil { 392 return "nil" 393 } 394 s := strings.Join([]string{`&SnapshotPrepare{`, 395 `Key:` + fmt.Sprintf("%v", this.Key) + `,`, 396 `Parent:` + fmt.Sprintf("%v", this.Parent) + `,`, 397 `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, 398 `}`, 399 }, "") 400 return s 401 } 402 func (this *SnapshotCommit) String() string { 403 if this == nil { 404 return "nil" 405 } 406 s := strings.Join([]string{`&SnapshotCommit{`, 407 `Key:` + fmt.Sprintf("%v", this.Key) + `,`, 408 `Name:` + fmt.Sprintf("%v", this.Name) + `,`, 409 `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, 410 `}`, 411 }, "") 412 return s 413 } 414 func (this *SnapshotRemove) String() string { 415 if this == nil { 416 return "nil" 417 } 418 s := strings.Join([]string{`&SnapshotRemove{`, 419 `Key:` + fmt.Sprintf("%v", this.Key) + `,`, 420 `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, 421 `}`, 422 }, "") 423 return s 424 } 425 func valueToStringSnapshot(v interface{}) string { 426 rv := reflect.ValueOf(v) 427 if rv.IsNil() { 428 return "nil" 429 } 430 pv := reflect.Indirect(rv).Interface() 431 return fmt.Sprintf("*%v", pv) 432 } 433 func (m *SnapshotPrepare) Unmarshal(dAtA []byte) error { 434 l := len(dAtA) 435 iNdEx := 0 436 for iNdEx < l { 437 preIndex := iNdEx 438 var wire uint64 439 for shift := uint(0); ; shift += 7 { 440 if shift >= 64 { 441 return ErrIntOverflowSnapshot 442 } 443 if iNdEx >= l { 444 return io.ErrUnexpectedEOF 445 } 446 b := dAtA[iNdEx] 447 iNdEx++ 448 wire |= uint64(b&0x7F) << shift 449 if b < 0x80 { 450 break 451 } 452 } 453 fieldNum := int32(wire >> 3) 454 wireType := int(wire & 0x7) 455 if wireType == 4 { 456 return fmt.Errorf("proto: SnapshotPrepare: wiretype end group for non-group") 457 } 458 if fieldNum <= 0 { 459 return fmt.Errorf("proto: SnapshotPrepare: illegal tag %d (wire type %d)", fieldNum, wire) 460 } 461 switch fieldNum { 462 case 1: 463 if wireType != 2 { 464 return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) 465 } 466 var stringLen uint64 467 for shift := uint(0); ; shift += 7 { 468 if shift >= 64 { 469 return ErrIntOverflowSnapshot 470 } 471 if iNdEx >= l { 472 return io.ErrUnexpectedEOF 473 } 474 b := dAtA[iNdEx] 475 iNdEx++ 476 stringLen |= uint64(b&0x7F) << shift 477 if b < 0x80 { 478 break 479 } 480 } 481 intStringLen := int(stringLen) 482 if intStringLen < 0 { 483 return ErrInvalidLengthSnapshot 484 } 485 postIndex := iNdEx + intStringLen 486 if postIndex < 0 { 487 return ErrInvalidLengthSnapshot 488 } 489 if postIndex > l { 490 return io.ErrUnexpectedEOF 491 } 492 m.Key = string(dAtA[iNdEx:postIndex]) 493 iNdEx = postIndex 494 case 2: 495 if wireType != 2 { 496 return fmt.Errorf("proto: wrong wireType = %d for field Parent", wireType) 497 } 498 var stringLen uint64 499 for shift := uint(0); ; shift += 7 { 500 if shift >= 64 { 501 return ErrIntOverflowSnapshot 502 } 503 if iNdEx >= l { 504 return io.ErrUnexpectedEOF 505 } 506 b := dAtA[iNdEx] 507 iNdEx++ 508 stringLen |= uint64(b&0x7F) << shift 509 if b < 0x80 { 510 break 511 } 512 } 513 intStringLen := int(stringLen) 514 if intStringLen < 0 { 515 return ErrInvalidLengthSnapshot 516 } 517 postIndex := iNdEx + intStringLen 518 if postIndex < 0 { 519 return ErrInvalidLengthSnapshot 520 } 521 if postIndex > l { 522 return io.ErrUnexpectedEOF 523 } 524 m.Parent = string(dAtA[iNdEx:postIndex]) 525 iNdEx = postIndex 526 default: 527 iNdEx = preIndex 528 skippy, err := skipSnapshot(dAtA[iNdEx:]) 529 if err != nil { 530 return err 531 } 532 if skippy < 0 { 533 return ErrInvalidLengthSnapshot 534 } 535 if (iNdEx + skippy) < 0 { 536 return ErrInvalidLengthSnapshot 537 } 538 if (iNdEx + skippy) > l { 539 return io.ErrUnexpectedEOF 540 } 541 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 542 iNdEx += skippy 543 } 544 } 545 546 if iNdEx > l { 547 return io.ErrUnexpectedEOF 548 } 549 return nil 550 } 551 func (m *SnapshotCommit) Unmarshal(dAtA []byte) error { 552 l := len(dAtA) 553 iNdEx := 0 554 for iNdEx < l { 555 preIndex := iNdEx 556 var wire uint64 557 for shift := uint(0); ; shift += 7 { 558 if shift >= 64 { 559 return ErrIntOverflowSnapshot 560 } 561 if iNdEx >= l { 562 return io.ErrUnexpectedEOF 563 } 564 b := dAtA[iNdEx] 565 iNdEx++ 566 wire |= uint64(b&0x7F) << shift 567 if b < 0x80 { 568 break 569 } 570 } 571 fieldNum := int32(wire >> 3) 572 wireType := int(wire & 0x7) 573 if wireType == 4 { 574 return fmt.Errorf("proto: SnapshotCommit: wiretype end group for non-group") 575 } 576 if fieldNum <= 0 { 577 return fmt.Errorf("proto: SnapshotCommit: illegal tag %d (wire type %d)", fieldNum, wire) 578 } 579 switch fieldNum { 580 case 1: 581 if wireType != 2 { 582 return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) 583 } 584 var stringLen uint64 585 for shift := uint(0); ; shift += 7 { 586 if shift >= 64 { 587 return ErrIntOverflowSnapshot 588 } 589 if iNdEx >= l { 590 return io.ErrUnexpectedEOF 591 } 592 b := dAtA[iNdEx] 593 iNdEx++ 594 stringLen |= uint64(b&0x7F) << shift 595 if b < 0x80 { 596 break 597 } 598 } 599 intStringLen := int(stringLen) 600 if intStringLen < 0 { 601 return ErrInvalidLengthSnapshot 602 } 603 postIndex := iNdEx + intStringLen 604 if postIndex < 0 { 605 return ErrInvalidLengthSnapshot 606 } 607 if postIndex > l { 608 return io.ErrUnexpectedEOF 609 } 610 m.Key = string(dAtA[iNdEx:postIndex]) 611 iNdEx = postIndex 612 case 2: 613 if wireType != 2 { 614 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) 615 } 616 var stringLen uint64 617 for shift := uint(0); ; shift += 7 { 618 if shift >= 64 { 619 return ErrIntOverflowSnapshot 620 } 621 if iNdEx >= l { 622 return io.ErrUnexpectedEOF 623 } 624 b := dAtA[iNdEx] 625 iNdEx++ 626 stringLen |= uint64(b&0x7F) << shift 627 if b < 0x80 { 628 break 629 } 630 } 631 intStringLen := int(stringLen) 632 if intStringLen < 0 { 633 return ErrInvalidLengthSnapshot 634 } 635 postIndex := iNdEx + intStringLen 636 if postIndex < 0 { 637 return ErrInvalidLengthSnapshot 638 } 639 if postIndex > l { 640 return io.ErrUnexpectedEOF 641 } 642 m.Name = string(dAtA[iNdEx:postIndex]) 643 iNdEx = postIndex 644 default: 645 iNdEx = preIndex 646 skippy, err := skipSnapshot(dAtA[iNdEx:]) 647 if err != nil { 648 return err 649 } 650 if skippy < 0 { 651 return ErrInvalidLengthSnapshot 652 } 653 if (iNdEx + skippy) < 0 { 654 return ErrInvalidLengthSnapshot 655 } 656 if (iNdEx + skippy) > l { 657 return io.ErrUnexpectedEOF 658 } 659 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 660 iNdEx += skippy 661 } 662 } 663 664 if iNdEx > l { 665 return io.ErrUnexpectedEOF 666 } 667 return nil 668 } 669 func (m *SnapshotRemove) Unmarshal(dAtA []byte) error { 670 l := len(dAtA) 671 iNdEx := 0 672 for iNdEx < l { 673 preIndex := iNdEx 674 var wire uint64 675 for shift := uint(0); ; shift += 7 { 676 if shift >= 64 { 677 return ErrIntOverflowSnapshot 678 } 679 if iNdEx >= l { 680 return io.ErrUnexpectedEOF 681 } 682 b := dAtA[iNdEx] 683 iNdEx++ 684 wire |= uint64(b&0x7F) << shift 685 if b < 0x80 { 686 break 687 } 688 } 689 fieldNum := int32(wire >> 3) 690 wireType := int(wire & 0x7) 691 if wireType == 4 { 692 return fmt.Errorf("proto: SnapshotRemove: wiretype end group for non-group") 693 } 694 if fieldNum <= 0 { 695 return fmt.Errorf("proto: SnapshotRemove: illegal tag %d (wire type %d)", fieldNum, wire) 696 } 697 switch fieldNum { 698 case 1: 699 if wireType != 2 { 700 return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) 701 } 702 var stringLen uint64 703 for shift := uint(0); ; shift += 7 { 704 if shift >= 64 { 705 return ErrIntOverflowSnapshot 706 } 707 if iNdEx >= l { 708 return io.ErrUnexpectedEOF 709 } 710 b := dAtA[iNdEx] 711 iNdEx++ 712 stringLen |= uint64(b&0x7F) << shift 713 if b < 0x80 { 714 break 715 } 716 } 717 intStringLen := int(stringLen) 718 if intStringLen < 0 { 719 return ErrInvalidLengthSnapshot 720 } 721 postIndex := iNdEx + intStringLen 722 if postIndex < 0 { 723 return ErrInvalidLengthSnapshot 724 } 725 if postIndex > l { 726 return io.ErrUnexpectedEOF 727 } 728 m.Key = string(dAtA[iNdEx:postIndex]) 729 iNdEx = postIndex 730 default: 731 iNdEx = preIndex 732 skippy, err := skipSnapshot(dAtA[iNdEx:]) 733 if err != nil { 734 return err 735 } 736 if skippy < 0 { 737 return ErrInvalidLengthSnapshot 738 } 739 if (iNdEx + skippy) < 0 { 740 return ErrInvalidLengthSnapshot 741 } 742 if (iNdEx + skippy) > l { 743 return io.ErrUnexpectedEOF 744 } 745 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 746 iNdEx += skippy 747 } 748 } 749 750 if iNdEx > l { 751 return io.ErrUnexpectedEOF 752 } 753 return nil 754 } 755 func skipSnapshot(dAtA []byte) (n int, err error) { 756 l := len(dAtA) 757 iNdEx := 0 758 for iNdEx < l { 759 var wire uint64 760 for shift := uint(0); ; shift += 7 { 761 if shift >= 64 { 762 return 0, ErrIntOverflowSnapshot 763 } 764 if iNdEx >= l { 765 return 0, io.ErrUnexpectedEOF 766 } 767 b := dAtA[iNdEx] 768 iNdEx++ 769 wire |= (uint64(b) & 0x7F) << shift 770 if b < 0x80 { 771 break 772 } 773 } 774 wireType := int(wire & 0x7) 775 switch wireType { 776 case 0: 777 for shift := uint(0); ; shift += 7 { 778 if shift >= 64 { 779 return 0, ErrIntOverflowSnapshot 780 } 781 if iNdEx >= l { 782 return 0, io.ErrUnexpectedEOF 783 } 784 iNdEx++ 785 if dAtA[iNdEx-1] < 0x80 { 786 break 787 } 788 } 789 return iNdEx, nil 790 case 1: 791 iNdEx += 8 792 return iNdEx, nil 793 case 2: 794 var length int 795 for shift := uint(0); ; shift += 7 { 796 if shift >= 64 { 797 return 0, ErrIntOverflowSnapshot 798 } 799 if iNdEx >= l { 800 return 0, io.ErrUnexpectedEOF 801 } 802 b := dAtA[iNdEx] 803 iNdEx++ 804 length |= (int(b) & 0x7F) << shift 805 if b < 0x80 { 806 break 807 } 808 } 809 if length < 0 { 810 return 0, ErrInvalidLengthSnapshot 811 } 812 iNdEx += length 813 if iNdEx < 0 { 814 return 0, ErrInvalidLengthSnapshot 815 } 816 return iNdEx, nil 817 case 3: 818 for { 819 var innerWire uint64 820 var start int = iNdEx 821 for shift := uint(0); ; shift += 7 { 822 if shift >= 64 { 823 return 0, ErrIntOverflowSnapshot 824 } 825 if iNdEx >= l { 826 return 0, io.ErrUnexpectedEOF 827 } 828 b := dAtA[iNdEx] 829 iNdEx++ 830 innerWire |= (uint64(b) & 0x7F) << shift 831 if b < 0x80 { 832 break 833 } 834 } 835 innerWireType := int(innerWire & 0x7) 836 if innerWireType == 4 { 837 break 838 } 839 next, err := skipSnapshot(dAtA[start:]) 840 if err != nil { 841 return 0, err 842 } 843 iNdEx = start + next 844 if iNdEx < 0 { 845 return 0, ErrInvalidLengthSnapshot 846 } 847 } 848 return iNdEx, nil 849 case 4: 850 return iNdEx, nil 851 case 5: 852 iNdEx += 4 853 return iNdEx, nil 854 default: 855 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 856 } 857 } 858 panic("unreachable") 859 } 860 861 var ( 862 ErrInvalidLengthSnapshot = fmt.Errorf("proto: negative length found during unmarshaling") 863 ErrIntOverflowSnapshot = fmt.Errorf("proto: integer overflow") 864 )