github.com/minio/minio@v0.0.0-20240328213742-3f72439b8a27/cmd/bucket-replication-utils_gen.go (about) 1 package cmd 2 3 // Code generated by github.com/tinylib/msgp DO NOT EDIT. 4 5 import ( 6 "github.com/minio/minio/internal/bucket/replication" 7 "github.com/tinylib/msgp/msgp" 8 ) 9 10 // DecodeMsg implements msgp.Decodable 11 func (z *BucketReplicationResyncStatus) DecodeMsg(dc *msgp.Reader) (err error) { 12 var field []byte 13 _ = field 14 var zb0001 uint32 15 zb0001, err = dc.ReadMapHeader() 16 if err != nil { 17 err = msgp.WrapError(err) 18 return 19 } 20 for zb0001 > 0 { 21 zb0001-- 22 field, err = dc.ReadMapKeyPtr() 23 if err != nil { 24 err = msgp.WrapError(err) 25 return 26 } 27 switch msgp.UnsafeString(field) { 28 case "v": 29 z.Version, err = dc.ReadInt() 30 if err != nil { 31 err = msgp.WrapError(err, "Version") 32 return 33 } 34 case "brs": 35 var zb0002 uint32 36 zb0002, err = dc.ReadMapHeader() 37 if err != nil { 38 err = msgp.WrapError(err, "TargetsMap") 39 return 40 } 41 if z.TargetsMap == nil { 42 z.TargetsMap = make(map[string]TargetReplicationResyncStatus, zb0002) 43 } else if len(z.TargetsMap) > 0 { 44 for key := range z.TargetsMap { 45 delete(z.TargetsMap, key) 46 } 47 } 48 for zb0002 > 0 { 49 zb0002-- 50 var za0001 string 51 var za0002 TargetReplicationResyncStatus 52 za0001, err = dc.ReadString() 53 if err != nil { 54 err = msgp.WrapError(err, "TargetsMap") 55 return 56 } 57 err = za0002.DecodeMsg(dc) 58 if err != nil { 59 err = msgp.WrapError(err, "TargetsMap", za0001) 60 return 61 } 62 z.TargetsMap[za0001] = za0002 63 } 64 case "id": 65 z.ID, err = dc.ReadInt() 66 if err != nil { 67 err = msgp.WrapError(err, "ID") 68 return 69 } 70 case "lu": 71 z.LastUpdate, err = dc.ReadTime() 72 if err != nil { 73 err = msgp.WrapError(err, "LastUpdate") 74 return 75 } 76 default: 77 err = dc.Skip() 78 if err != nil { 79 err = msgp.WrapError(err) 80 return 81 } 82 } 83 } 84 return 85 } 86 87 // EncodeMsg implements msgp.Encodable 88 func (z *BucketReplicationResyncStatus) EncodeMsg(en *msgp.Writer) (err error) { 89 // map header, size 4 90 // write "v" 91 err = en.Append(0x84, 0xa1, 0x76) 92 if err != nil { 93 return 94 } 95 err = en.WriteInt(z.Version) 96 if err != nil { 97 err = msgp.WrapError(err, "Version") 98 return 99 } 100 // write "brs" 101 err = en.Append(0xa3, 0x62, 0x72, 0x73) 102 if err != nil { 103 return 104 } 105 err = en.WriteMapHeader(uint32(len(z.TargetsMap))) 106 if err != nil { 107 err = msgp.WrapError(err, "TargetsMap") 108 return 109 } 110 for za0001, za0002 := range z.TargetsMap { 111 err = en.WriteString(za0001) 112 if err != nil { 113 err = msgp.WrapError(err, "TargetsMap") 114 return 115 } 116 err = za0002.EncodeMsg(en) 117 if err != nil { 118 err = msgp.WrapError(err, "TargetsMap", za0001) 119 return 120 } 121 } 122 // write "id" 123 err = en.Append(0xa2, 0x69, 0x64) 124 if err != nil { 125 return 126 } 127 err = en.WriteInt(z.ID) 128 if err != nil { 129 err = msgp.WrapError(err, "ID") 130 return 131 } 132 // write "lu" 133 err = en.Append(0xa2, 0x6c, 0x75) 134 if err != nil { 135 return 136 } 137 err = en.WriteTime(z.LastUpdate) 138 if err != nil { 139 err = msgp.WrapError(err, "LastUpdate") 140 return 141 } 142 return 143 } 144 145 // MarshalMsg implements msgp.Marshaler 146 func (z *BucketReplicationResyncStatus) MarshalMsg(b []byte) (o []byte, err error) { 147 o = msgp.Require(b, z.Msgsize()) 148 // map header, size 4 149 // string "v" 150 o = append(o, 0x84, 0xa1, 0x76) 151 o = msgp.AppendInt(o, z.Version) 152 // string "brs" 153 o = append(o, 0xa3, 0x62, 0x72, 0x73) 154 o = msgp.AppendMapHeader(o, uint32(len(z.TargetsMap))) 155 for za0001, za0002 := range z.TargetsMap { 156 o = msgp.AppendString(o, za0001) 157 o, err = za0002.MarshalMsg(o) 158 if err != nil { 159 err = msgp.WrapError(err, "TargetsMap", za0001) 160 return 161 } 162 } 163 // string "id" 164 o = append(o, 0xa2, 0x69, 0x64) 165 o = msgp.AppendInt(o, z.ID) 166 // string "lu" 167 o = append(o, 0xa2, 0x6c, 0x75) 168 o = msgp.AppendTime(o, z.LastUpdate) 169 return 170 } 171 172 // UnmarshalMsg implements msgp.Unmarshaler 173 func (z *BucketReplicationResyncStatus) UnmarshalMsg(bts []byte) (o []byte, err error) { 174 var field []byte 175 _ = field 176 var zb0001 uint32 177 zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) 178 if err != nil { 179 err = msgp.WrapError(err) 180 return 181 } 182 for zb0001 > 0 { 183 zb0001-- 184 field, bts, err = msgp.ReadMapKeyZC(bts) 185 if err != nil { 186 err = msgp.WrapError(err) 187 return 188 } 189 switch msgp.UnsafeString(field) { 190 case "v": 191 z.Version, bts, err = msgp.ReadIntBytes(bts) 192 if err != nil { 193 err = msgp.WrapError(err, "Version") 194 return 195 } 196 case "brs": 197 var zb0002 uint32 198 zb0002, bts, err = msgp.ReadMapHeaderBytes(bts) 199 if err != nil { 200 err = msgp.WrapError(err, "TargetsMap") 201 return 202 } 203 if z.TargetsMap == nil { 204 z.TargetsMap = make(map[string]TargetReplicationResyncStatus, zb0002) 205 } else if len(z.TargetsMap) > 0 { 206 for key := range z.TargetsMap { 207 delete(z.TargetsMap, key) 208 } 209 } 210 for zb0002 > 0 { 211 var za0001 string 212 var za0002 TargetReplicationResyncStatus 213 zb0002-- 214 za0001, bts, err = msgp.ReadStringBytes(bts) 215 if err != nil { 216 err = msgp.WrapError(err, "TargetsMap") 217 return 218 } 219 bts, err = za0002.UnmarshalMsg(bts) 220 if err != nil { 221 err = msgp.WrapError(err, "TargetsMap", za0001) 222 return 223 } 224 z.TargetsMap[za0001] = za0002 225 } 226 case "id": 227 z.ID, bts, err = msgp.ReadIntBytes(bts) 228 if err != nil { 229 err = msgp.WrapError(err, "ID") 230 return 231 } 232 case "lu": 233 z.LastUpdate, bts, err = msgp.ReadTimeBytes(bts) 234 if err != nil { 235 err = msgp.WrapError(err, "LastUpdate") 236 return 237 } 238 default: 239 bts, err = msgp.Skip(bts) 240 if err != nil { 241 err = msgp.WrapError(err) 242 return 243 } 244 } 245 } 246 o = bts 247 return 248 } 249 250 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 251 func (z *BucketReplicationResyncStatus) Msgsize() (s int) { 252 s = 1 + 2 + msgp.IntSize + 4 + msgp.MapHeaderSize 253 if z.TargetsMap != nil { 254 for za0001, za0002 := range z.TargetsMap { 255 _ = za0002 256 s += msgp.StringPrefixSize + len(za0001) + za0002.Msgsize() 257 } 258 } 259 s += 3 + msgp.IntSize + 3 + msgp.TimeSize 260 return 261 } 262 263 // DecodeMsg implements msgp.Decodable 264 func (z *MRFReplicateEntries) DecodeMsg(dc *msgp.Reader) (err error) { 265 var field []byte 266 _ = field 267 var zb0001 uint32 268 zb0001, err = dc.ReadMapHeader() 269 if err != nil { 270 err = msgp.WrapError(err) 271 return 272 } 273 for zb0001 > 0 { 274 zb0001-- 275 field, err = dc.ReadMapKeyPtr() 276 if err != nil { 277 err = msgp.WrapError(err) 278 return 279 } 280 switch msgp.UnsafeString(field) { 281 case "e": 282 var zb0002 uint32 283 zb0002, err = dc.ReadMapHeader() 284 if err != nil { 285 err = msgp.WrapError(err, "Entries") 286 return 287 } 288 if z.Entries == nil { 289 z.Entries = make(map[string]MRFReplicateEntry, zb0002) 290 } else if len(z.Entries) > 0 { 291 for key := range z.Entries { 292 delete(z.Entries, key) 293 } 294 } 295 for zb0002 > 0 { 296 zb0002-- 297 var za0001 string 298 var za0002 MRFReplicateEntry 299 za0001, err = dc.ReadString() 300 if err != nil { 301 err = msgp.WrapError(err, "Entries") 302 return 303 } 304 var zb0003 uint32 305 zb0003, err = dc.ReadMapHeader() 306 if err != nil { 307 err = msgp.WrapError(err, "Entries", za0001) 308 return 309 } 310 for zb0003 > 0 { 311 zb0003-- 312 field, err = dc.ReadMapKeyPtr() 313 if err != nil { 314 err = msgp.WrapError(err, "Entries", za0001) 315 return 316 } 317 switch msgp.UnsafeString(field) { 318 case "b": 319 za0002.Bucket, err = dc.ReadString() 320 if err != nil { 321 err = msgp.WrapError(err, "Entries", za0001, "Bucket") 322 return 323 } 324 case "o": 325 za0002.Object, err = dc.ReadString() 326 if err != nil { 327 err = msgp.WrapError(err, "Entries", za0001, "Object") 328 return 329 } 330 case "rc": 331 za0002.RetryCount, err = dc.ReadInt() 332 if err != nil { 333 err = msgp.WrapError(err, "Entries", za0001, "RetryCount") 334 return 335 } 336 default: 337 err = dc.Skip() 338 if err != nil { 339 err = msgp.WrapError(err, "Entries", za0001) 340 return 341 } 342 } 343 } 344 z.Entries[za0001] = za0002 345 } 346 case "v": 347 z.Version, err = dc.ReadInt() 348 if err != nil { 349 err = msgp.WrapError(err, "Version") 350 return 351 } 352 default: 353 err = dc.Skip() 354 if err != nil { 355 err = msgp.WrapError(err) 356 return 357 } 358 } 359 } 360 return 361 } 362 363 // EncodeMsg implements msgp.Encodable 364 func (z *MRFReplicateEntries) EncodeMsg(en *msgp.Writer) (err error) { 365 // map header, size 2 366 // write "e" 367 err = en.Append(0x82, 0xa1, 0x65) 368 if err != nil { 369 return 370 } 371 err = en.WriteMapHeader(uint32(len(z.Entries))) 372 if err != nil { 373 err = msgp.WrapError(err, "Entries") 374 return 375 } 376 for za0001, za0002 := range z.Entries { 377 err = en.WriteString(za0001) 378 if err != nil { 379 err = msgp.WrapError(err, "Entries") 380 return 381 } 382 // map header, size 3 383 // write "b" 384 err = en.Append(0x83, 0xa1, 0x62) 385 if err != nil { 386 return 387 } 388 err = en.WriteString(za0002.Bucket) 389 if err != nil { 390 err = msgp.WrapError(err, "Entries", za0001, "Bucket") 391 return 392 } 393 // write "o" 394 err = en.Append(0xa1, 0x6f) 395 if err != nil { 396 return 397 } 398 err = en.WriteString(za0002.Object) 399 if err != nil { 400 err = msgp.WrapError(err, "Entries", za0001, "Object") 401 return 402 } 403 // write "rc" 404 err = en.Append(0xa2, 0x72, 0x63) 405 if err != nil { 406 return 407 } 408 err = en.WriteInt(za0002.RetryCount) 409 if err != nil { 410 err = msgp.WrapError(err, "Entries", za0001, "RetryCount") 411 return 412 } 413 } 414 // write "v" 415 err = en.Append(0xa1, 0x76) 416 if err != nil { 417 return 418 } 419 err = en.WriteInt(z.Version) 420 if err != nil { 421 err = msgp.WrapError(err, "Version") 422 return 423 } 424 return 425 } 426 427 // MarshalMsg implements msgp.Marshaler 428 func (z *MRFReplicateEntries) MarshalMsg(b []byte) (o []byte, err error) { 429 o = msgp.Require(b, z.Msgsize()) 430 // map header, size 2 431 // string "e" 432 o = append(o, 0x82, 0xa1, 0x65) 433 o = msgp.AppendMapHeader(o, uint32(len(z.Entries))) 434 for za0001, za0002 := range z.Entries { 435 o = msgp.AppendString(o, za0001) 436 // map header, size 3 437 // string "b" 438 o = append(o, 0x83, 0xa1, 0x62) 439 o = msgp.AppendString(o, za0002.Bucket) 440 // string "o" 441 o = append(o, 0xa1, 0x6f) 442 o = msgp.AppendString(o, za0002.Object) 443 // string "rc" 444 o = append(o, 0xa2, 0x72, 0x63) 445 o = msgp.AppendInt(o, za0002.RetryCount) 446 } 447 // string "v" 448 o = append(o, 0xa1, 0x76) 449 o = msgp.AppendInt(o, z.Version) 450 return 451 } 452 453 // UnmarshalMsg implements msgp.Unmarshaler 454 func (z *MRFReplicateEntries) UnmarshalMsg(bts []byte) (o []byte, err error) { 455 var field []byte 456 _ = field 457 var zb0001 uint32 458 zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) 459 if err != nil { 460 err = msgp.WrapError(err) 461 return 462 } 463 for zb0001 > 0 { 464 zb0001-- 465 field, bts, err = msgp.ReadMapKeyZC(bts) 466 if err != nil { 467 err = msgp.WrapError(err) 468 return 469 } 470 switch msgp.UnsafeString(field) { 471 case "e": 472 var zb0002 uint32 473 zb0002, bts, err = msgp.ReadMapHeaderBytes(bts) 474 if err != nil { 475 err = msgp.WrapError(err, "Entries") 476 return 477 } 478 if z.Entries == nil { 479 z.Entries = make(map[string]MRFReplicateEntry, zb0002) 480 } else if len(z.Entries) > 0 { 481 for key := range z.Entries { 482 delete(z.Entries, key) 483 } 484 } 485 for zb0002 > 0 { 486 var za0001 string 487 var za0002 MRFReplicateEntry 488 zb0002-- 489 za0001, bts, err = msgp.ReadStringBytes(bts) 490 if err != nil { 491 err = msgp.WrapError(err, "Entries") 492 return 493 } 494 var zb0003 uint32 495 zb0003, bts, err = msgp.ReadMapHeaderBytes(bts) 496 if err != nil { 497 err = msgp.WrapError(err, "Entries", za0001) 498 return 499 } 500 for zb0003 > 0 { 501 zb0003-- 502 field, bts, err = msgp.ReadMapKeyZC(bts) 503 if err != nil { 504 err = msgp.WrapError(err, "Entries", za0001) 505 return 506 } 507 switch msgp.UnsafeString(field) { 508 case "b": 509 za0002.Bucket, bts, err = msgp.ReadStringBytes(bts) 510 if err != nil { 511 err = msgp.WrapError(err, "Entries", za0001, "Bucket") 512 return 513 } 514 case "o": 515 za0002.Object, bts, err = msgp.ReadStringBytes(bts) 516 if err != nil { 517 err = msgp.WrapError(err, "Entries", za0001, "Object") 518 return 519 } 520 case "rc": 521 za0002.RetryCount, bts, err = msgp.ReadIntBytes(bts) 522 if err != nil { 523 err = msgp.WrapError(err, "Entries", za0001, "RetryCount") 524 return 525 } 526 default: 527 bts, err = msgp.Skip(bts) 528 if err != nil { 529 err = msgp.WrapError(err, "Entries", za0001) 530 return 531 } 532 } 533 } 534 z.Entries[za0001] = za0002 535 } 536 case "v": 537 z.Version, bts, err = msgp.ReadIntBytes(bts) 538 if err != nil { 539 err = msgp.WrapError(err, "Version") 540 return 541 } 542 default: 543 bts, err = msgp.Skip(bts) 544 if err != nil { 545 err = msgp.WrapError(err) 546 return 547 } 548 } 549 } 550 o = bts 551 return 552 } 553 554 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 555 func (z *MRFReplicateEntries) Msgsize() (s int) { 556 s = 1 + 2 + msgp.MapHeaderSize 557 if z.Entries != nil { 558 for za0001, za0002 := range z.Entries { 559 _ = za0002 560 s += msgp.StringPrefixSize + len(za0001) + 1 + 2 + msgp.StringPrefixSize + len(za0002.Bucket) + 2 + msgp.StringPrefixSize + len(za0002.Object) + 3 + msgp.IntSize 561 } 562 } 563 s += 2 + msgp.IntSize 564 return 565 } 566 567 // DecodeMsg implements msgp.Decodable 568 func (z *MRFReplicateEntry) DecodeMsg(dc *msgp.Reader) (err error) { 569 var field []byte 570 _ = field 571 var zb0001 uint32 572 zb0001, err = dc.ReadMapHeader() 573 if err != nil { 574 err = msgp.WrapError(err) 575 return 576 } 577 for zb0001 > 0 { 578 zb0001-- 579 field, err = dc.ReadMapKeyPtr() 580 if err != nil { 581 err = msgp.WrapError(err) 582 return 583 } 584 switch msgp.UnsafeString(field) { 585 case "b": 586 z.Bucket, err = dc.ReadString() 587 if err != nil { 588 err = msgp.WrapError(err, "Bucket") 589 return 590 } 591 case "o": 592 z.Object, err = dc.ReadString() 593 if err != nil { 594 err = msgp.WrapError(err, "Object") 595 return 596 } 597 case "rc": 598 z.RetryCount, err = dc.ReadInt() 599 if err != nil { 600 err = msgp.WrapError(err, "RetryCount") 601 return 602 } 603 default: 604 err = dc.Skip() 605 if err != nil { 606 err = msgp.WrapError(err) 607 return 608 } 609 } 610 } 611 return 612 } 613 614 // EncodeMsg implements msgp.Encodable 615 func (z MRFReplicateEntry) EncodeMsg(en *msgp.Writer) (err error) { 616 // map header, size 3 617 // write "b" 618 err = en.Append(0x83, 0xa1, 0x62) 619 if err != nil { 620 return 621 } 622 err = en.WriteString(z.Bucket) 623 if err != nil { 624 err = msgp.WrapError(err, "Bucket") 625 return 626 } 627 // write "o" 628 err = en.Append(0xa1, 0x6f) 629 if err != nil { 630 return 631 } 632 err = en.WriteString(z.Object) 633 if err != nil { 634 err = msgp.WrapError(err, "Object") 635 return 636 } 637 // write "rc" 638 err = en.Append(0xa2, 0x72, 0x63) 639 if err != nil { 640 return 641 } 642 err = en.WriteInt(z.RetryCount) 643 if err != nil { 644 err = msgp.WrapError(err, "RetryCount") 645 return 646 } 647 return 648 } 649 650 // MarshalMsg implements msgp.Marshaler 651 func (z MRFReplicateEntry) MarshalMsg(b []byte) (o []byte, err error) { 652 o = msgp.Require(b, z.Msgsize()) 653 // map header, size 3 654 // string "b" 655 o = append(o, 0x83, 0xa1, 0x62) 656 o = msgp.AppendString(o, z.Bucket) 657 // string "o" 658 o = append(o, 0xa1, 0x6f) 659 o = msgp.AppendString(o, z.Object) 660 // string "rc" 661 o = append(o, 0xa2, 0x72, 0x63) 662 o = msgp.AppendInt(o, z.RetryCount) 663 return 664 } 665 666 // UnmarshalMsg implements msgp.Unmarshaler 667 func (z *MRFReplicateEntry) UnmarshalMsg(bts []byte) (o []byte, err error) { 668 var field []byte 669 _ = field 670 var zb0001 uint32 671 zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) 672 if err != nil { 673 err = msgp.WrapError(err) 674 return 675 } 676 for zb0001 > 0 { 677 zb0001-- 678 field, bts, err = msgp.ReadMapKeyZC(bts) 679 if err != nil { 680 err = msgp.WrapError(err) 681 return 682 } 683 switch msgp.UnsafeString(field) { 684 case "b": 685 z.Bucket, bts, err = msgp.ReadStringBytes(bts) 686 if err != nil { 687 err = msgp.WrapError(err, "Bucket") 688 return 689 } 690 case "o": 691 z.Object, bts, err = msgp.ReadStringBytes(bts) 692 if err != nil { 693 err = msgp.WrapError(err, "Object") 694 return 695 } 696 case "rc": 697 z.RetryCount, bts, err = msgp.ReadIntBytes(bts) 698 if err != nil { 699 err = msgp.WrapError(err, "RetryCount") 700 return 701 } 702 default: 703 bts, err = msgp.Skip(bts) 704 if err != nil { 705 err = msgp.WrapError(err) 706 return 707 } 708 } 709 } 710 o = bts 711 return 712 } 713 714 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 715 func (z MRFReplicateEntry) Msgsize() (s int) { 716 s = 1 + 2 + msgp.StringPrefixSize + len(z.Bucket) + 2 + msgp.StringPrefixSize + len(z.Object) + 3 + msgp.IntSize 717 return 718 } 719 720 // DecodeMsg implements msgp.Decodable 721 func (z *ReplicateDecision) DecodeMsg(dc *msgp.Reader) (err error) { 722 var field []byte 723 _ = field 724 var zb0001 uint32 725 zb0001, err = dc.ReadMapHeader() 726 if err != nil { 727 err = msgp.WrapError(err) 728 return 729 } 730 for zb0001 > 0 { 731 zb0001-- 732 field, err = dc.ReadMapKeyPtr() 733 if err != nil { 734 err = msgp.WrapError(err) 735 return 736 } 737 switch msgp.UnsafeString(field) { 738 default: 739 err = dc.Skip() 740 if err != nil { 741 err = msgp.WrapError(err) 742 return 743 } 744 } 745 } 746 return 747 } 748 749 // EncodeMsg implements msgp.Encodable 750 func (z ReplicateDecision) EncodeMsg(en *msgp.Writer) (err error) { 751 // map header, size 0 752 _ = z 753 err = en.Append(0x80) 754 if err != nil { 755 return 756 } 757 return 758 } 759 760 // MarshalMsg implements msgp.Marshaler 761 func (z ReplicateDecision) MarshalMsg(b []byte) (o []byte, err error) { 762 o = msgp.Require(b, z.Msgsize()) 763 // map header, size 0 764 _ = z 765 o = append(o, 0x80) 766 return 767 } 768 769 // UnmarshalMsg implements msgp.Unmarshaler 770 func (z *ReplicateDecision) UnmarshalMsg(bts []byte) (o []byte, err error) { 771 var field []byte 772 _ = field 773 var zb0001 uint32 774 zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) 775 if err != nil { 776 err = msgp.WrapError(err) 777 return 778 } 779 for zb0001 > 0 { 780 zb0001-- 781 field, bts, err = msgp.ReadMapKeyZC(bts) 782 if err != nil { 783 err = msgp.WrapError(err) 784 return 785 } 786 switch msgp.UnsafeString(field) { 787 default: 788 bts, err = msgp.Skip(bts) 789 if err != nil { 790 err = msgp.WrapError(err) 791 return 792 } 793 } 794 } 795 o = bts 796 return 797 } 798 799 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 800 func (z ReplicateDecision) Msgsize() (s int) { 801 s = 1 802 return 803 } 804 805 // DecodeMsg implements msgp.Decodable 806 func (z *ReplicationState) DecodeMsg(dc *msgp.Reader) (err error) { 807 var field []byte 808 _ = field 809 var zb0001 uint32 810 zb0001, err = dc.ReadMapHeader() 811 if err != nil { 812 err = msgp.WrapError(err) 813 return 814 } 815 for zb0001 > 0 { 816 zb0001-- 817 field, err = dc.ReadMapKeyPtr() 818 if err != nil { 819 err = msgp.WrapError(err) 820 return 821 } 822 switch msgp.UnsafeString(field) { 823 case "ReplicaTimeStamp": 824 z.ReplicaTimeStamp, err = dc.ReadTime() 825 if err != nil { 826 err = msgp.WrapError(err, "ReplicaTimeStamp") 827 return 828 } 829 case "ReplicaStatus": 830 err = z.ReplicaStatus.DecodeMsg(dc) 831 if err != nil { 832 err = msgp.WrapError(err, "ReplicaStatus") 833 return 834 } 835 case "DeleteMarker": 836 z.DeleteMarker, err = dc.ReadBool() 837 if err != nil { 838 err = msgp.WrapError(err, "DeleteMarker") 839 return 840 } 841 case "ReplicationTimeStamp": 842 z.ReplicationTimeStamp, err = dc.ReadTime() 843 if err != nil { 844 err = msgp.WrapError(err, "ReplicationTimeStamp") 845 return 846 } 847 case "ReplicationStatusInternal": 848 z.ReplicationStatusInternal, err = dc.ReadString() 849 if err != nil { 850 err = msgp.WrapError(err, "ReplicationStatusInternal") 851 return 852 } 853 case "VersionPurgeStatusInternal": 854 z.VersionPurgeStatusInternal, err = dc.ReadString() 855 if err != nil { 856 err = msgp.WrapError(err, "VersionPurgeStatusInternal") 857 return 858 } 859 case "ReplicateDecisionStr": 860 z.ReplicateDecisionStr, err = dc.ReadString() 861 if err != nil { 862 err = msgp.WrapError(err, "ReplicateDecisionStr") 863 return 864 } 865 case "Targets": 866 var zb0002 uint32 867 zb0002, err = dc.ReadMapHeader() 868 if err != nil { 869 err = msgp.WrapError(err, "Targets") 870 return 871 } 872 if z.Targets == nil { 873 z.Targets = make(map[string]replication.StatusType, zb0002) 874 } else if len(z.Targets) > 0 { 875 for key := range z.Targets { 876 delete(z.Targets, key) 877 } 878 } 879 for zb0002 > 0 { 880 zb0002-- 881 var za0001 string 882 var za0002 replication.StatusType 883 za0001, err = dc.ReadString() 884 if err != nil { 885 err = msgp.WrapError(err, "Targets") 886 return 887 } 888 err = za0002.DecodeMsg(dc) 889 if err != nil { 890 err = msgp.WrapError(err, "Targets", za0001) 891 return 892 } 893 z.Targets[za0001] = za0002 894 } 895 case "PurgeTargets": 896 var zb0003 uint32 897 zb0003, err = dc.ReadMapHeader() 898 if err != nil { 899 err = msgp.WrapError(err, "PurgeTargets") 900 return 901 } 902 if z.PurgeTargets == nil { 903 z.PurgeTargets = make(map[string]VersionPurgeStatusType, zb0003) 904 } else if len(z.PurgeTargets) > 0 { 905 for key := range z.PurgeTargets { 906 delete(z.PurgeTargets, key) 907 } 908 } 909 for zb0003 > 0 { 910 zb0003-- 911 var za0003 string 912 var za0004 VersionPurgeStatusType 913 za0003, err = dc.ReadString() 914 if err != nil { 915 err = msgp.WrapError(err, "PurgeTargets") 916 return 917 } 918 { 919 var zb0004 string 920 zb0004, err = dc.ReadString() 921 if err != nil { 922 err = msgp.WrapError(err, "PurgeTargets", za0003) 923 return 924 } 925 za0004 = VersionPurgeStatusType(zb0004) 926 } 927 z.PurgeTargets[za0003] = za0004 928 } 929 case "ResetStatusesMap": 930 var zb0005 uint32 931 zb0005, err = dc.ReadMapHeader() 932 if err != nil { 933 err = msgp.WrapError(err, "ResetStatusesMap") 934 return 935 } 936 if z.ResetStatusesMap == nil { 937 z.ResetStatusesMap = make(map[string]string, zb0005) 938 } else if len(z.ResetStatusesMap) > 0 { 939 for key := range z.ResetStatusesMap { 940 delete(z.ResetStatusesMap, key) 941 } 942 } 943 for zb0005 > 0 { 944 zb0005-- 945 var za0005 string 946 var za0006 string 947 za0005, err = dc.ReadString() 948 if err != nil { 949 err = msgp.WrapError(err, "ResetStatusesMap") 950 return 951 } 952 za0006, err = dc.ReadString() 953 if err != nil { 954 err = msgp.WrapError(err, "ResetStatusesMap", za0005) 955 return 956 } 957 z.ResetStatusesMap[za0005] = za0006 958 } 959 default: 960 err = dc.Skip() 961 if err != nil { 962 err = msgp.WrapError(err) 963 return 964 } 965 } 966 } 967 return 968 } 969 970 // EncodeMsg implements msgp.Encodable 971 func (z *ReplicationState) EncodeMsg(en *msgp.Writer) (err error) { 972 // map header, size 10 973 // write "ReplicaTimeStamp" 974 err = en.Append(0x8a, 0xb0, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70) 975 if err != nil { 976 return 977 } 978 err = en.WriteTime(z.ReplicaTimeStamp) 979 if err != nil { 980 err = msgp.WrapError(err, "ReplicaTimeStamp") 981 return 982 } 983 // write "ReplicaStatus" 984 err = en.Append(0xad, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73) 985 if err != nil { 986 return 987 } 988 err = z.ReplicaStatus.EncodeMsg(en) 989 if err != nil { 990 err = msgp.WrapError(err, "ReplicaStatus") 991 return 992 } 993 // write "DeleteMarker" 994 err = en.Append(0xac, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x72) 995 if err != nil { 996 return 997 } 998 err = en.WriteBool(z.DeleteMarker) 999 if err != nil { 1000 err = msgp.WrapError(err, "DeleteMarker") 1001 return 1002 } 1003 // write "ReplicationTimeStamp" 1004 err = en.Append(0xb4, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70) 1005 if err != nil { 1006 return 1007 } 1008 err = en.WriteTime(z.ReplicationTimeStamp) 1009 if err != nil { 1010 err = msgp.WrapError(err, "ReplicationTimeStamp") 1011 return 1012 } 1013 // write "ReplicationStatusInternal" 1014 err = en.Append(0xb9, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c) 1015 if err != nil { 1016 return 1017 } 1018 err = en.WriteString(z.ReplicationStatusInternal) 1019 if err != nil { 1020 err = msgp.WrapError(err, "ReplicationStatusInternal") 1021 return 1022 } 1023 // write "VersionPurgeStatusInternal" 1024 err = en.Append(0xba, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x75, 0x72, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c) 1025 if err != nil { 1026 return 1027 } 1028 err = en.WriteString(z.VersionPurgeStatusInternal) 1029 if err != nil { 1030 err = msgp.WrapError(err, "VersionPurgeStatusInternal") 1031 return 1032 } 1033 // write "ReplicateDecisionStr" 1034 err = en.Append(0xb4, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72) 1035 if err != nil { 1036 return 1037 } 1038 err = en.WriteString(z.ReplicateDecisionStr) 1039 if err != nil { 1040 err = msgp.WrapError(err, "ReplicateDecisionStr") 1041 return 1042 } 1043 // write "Targets" 1044 err = en.Append(0xa7, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73) 1045 if err != nil { 1046 return 1047 } 1048 err = en.WriteMapHeader(uint32(len(z.Targets))) 1049 if err != nil { 1050 err = msgp.WrapError(err, "Targets") 1051 return 1052 } 1053 for za0001, za0002 := range z.Targets { 1054 err = en.WriteString(za0001) 1055 if err != nil { 1056 err = msgp.WrapError(err, "Targets") 1057 return 1058 } 1059 err = za0002.EncodeMsg(en) 1060 if err != nil { 1061 err = msgp.WrapError(err, "Targets", za0001) 1062 return 1063 } 1064 } 1065 // write "PurgeTargets" 1066 err = en.Append(0xac, 0x50, 0x75, 0x72, 0x67, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73) 1067 if err != nil { 1068 return 1069 } 1070 err = en.WriteMapHeader(uint32(len(z.PurgeTargets))) 1071 if err != nil { 1072 err = msgp.WrapError(err, "PurgeTargets") 1073 return 1074 } 1075 for za0003, za0004 := range z.PurgeTargets { 1076 err = en.WriteString(za0003) 1077 if err != nil { 1078 err = msgp.WrapError(err, "PurgeTargets") 1079 return 1080 } 1081 err = en.WriteString(string(za0004)) 1082 if err != nil { 1083 err = msgp.WrapError(err, "PurgeTargets", za0003) 1084 return 1085 } 1086 } 1087 // write "ResetStatusesMap" 1088 err = en.Append(0xb0, 0x52, 0x65, 0x73, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x4d, 0x61, 0x70) 1089 if err != nil { 1090 return 1091 } 1092 err = en.WriteMapHeader(uint32(len(z.ResetStatusesMap))) 1093 if err != nil { 1094 err = msgp.WrapError(err, "ResetStatusesMap") 1095 return 1096 } 1097 for za0005, za0006 := range z.ResetStatusesMap { 1098 err = en.WriteString(za0005) 1099 if err != nil { 1100 err = msgp.WrapError(err, "ResetStatusesMap") 1101 return 1102 } 1103 err = en.WriteString(za0006) 1104 if err != nil { 1105 err = msgp.WrapError(err, "ResetStatusesMap", za0005) 1106 return 1107 } 1108 } 1109 return 1110 } 1111 1112 // MarshalMsg implements msgp.Marshaler 1113 func (z *ReplicationState) MarshalMsg(b []byte) (o []byte, err error) { 1114 o = msgp.Require(b, z.Msgsize()) 1115 // map header, size 10 1116 // string "ReplicaTimeStamp" 1117 o = append(o, 0x8a, 0xb0, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70) 1118 o = msgp.AppendTime(o, z.ReplicaTimeStamp) 1119 // string "ReplicaStatus" 1120 o = append(o, 0xad, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73) 1121 o, err = z.ReplicaStatus.MarshalMsg(o) 1122 if err != nil { 1123 err = msgp.WrapError(err, "ReplicaStatus") 1124 return 1125 } 1126 // string "DeleteMarker" 1127 o = append(o, 0xac, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x72) 1128 o = msgp.AppendBool(o, z.DeleteMarker) 1129 // string "ReplicationTimeStamp" 1130 o = append(o, 0xb4, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70) 1131 o = msgp.AppendTime(o, z.ReplicationTimeStamp) 1132 // string "ReplicationStatusInternal" 1133 o = append(o, 0xb9, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c) 1134 o = msgp.AppendString(o, z.ReplicationStatusInternal) 1135 // string "VersionPurgeStatusInternal" 1136 o = append(o, 0xba, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x75, 0x72, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c) 1137 o = msgp.AppendString(o, z.VersionPurgeStatusInternal) 1138 // string "ReplicateDecisionStr" 1139 o = append(o, 0xb4, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72) 1140 o = msgp.AppendString(o, z.ReplicateDecisionStr) 1141 // string "Targets" 1142 o = append(o, 0xa7, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73) 1143 o = msgp.AppendMapHeader(o, uint32(len(z.Targets))) 1144 for za0001, za0002 := range z.Targets { 1145 o = msgp.AppendString(o, za0001) 1146 o, err = za0002.MarshalMsg(o) 1147 if err != nil { 1148 err = msgp.WrapError(err, "Targets", za0001) 1149 return 1150 } 1151 } 1152 // string "PurgeTargets" 1153 o = append(o, 0xac, 0x50, 0x75, 0x72, 0x67, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73) 1154 o = msgp.AppendMapHeader(o, uint32(len(z.PurgeTargets))) 1155 for za0003, za0004 := range z.PurgeTargets { 1156 o = msgp.AppendString(o, za0003) 1157 o = msgp.AppendString(o, string(za0004)) 1158 } 1159 // string "ResetStatusesMap" 1160 o = append(o, 0xb0, 0x52, 0x65, 0x73, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x4d, 0x61, 0x70) 1161 o = msgp.AppendMapHeader(o, uint32(len(z.ResetStatusesMap))) 1162 for za0005, za0006 := range z.ResetStatusesMap { 1163 o = msgp.AppendString(o, za0005) 1164 o = msgp.AppendString(o, za0006) 1165 } 1166 return 1167 } 1168 1169 // UnmarshalMsg implements msgp.Unmarshaler 1170 func (z *ReplicationState) UnmarshalMsg(bts []byte) (o []byte, err error) { 1171 var field []byte 1172 _ = field 1173 var zb0001 uint32 1174 zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) 1175 if err != nil { 1176 err = msgp.WrapError(err) 1177 return 1178 } 1179 for zb0001 > 0 { 1180 zb0001-- 1181 field, bts, err = msgp.ReadMapKeyZC(bts) 1182 if err != nil { 1183 err = msgp.WrapError(err) 1184 return 1185 } 1186 switch msgp.UnsafeString(field) { 1187 case "ReplicaTimeStamp": 1188 z.ReplicaTimeStamp, bts, err = msgp.ReadTimeBytes(bts) 1189 if err != nil { 1190 err = msgp.WrapError(err, "ReplicaTimeStamp") 1191 return 1192 } 1193 case "ReplicaStatus": 1194 bts, err = z.ReplicaStatus.UnmarshalMsg(bts) 1195 if err != nil { 1196 err = msgp.WrapError(err, "ReplicaStatus") 1197 return 1198 } 1199 case "DeleteMarker": 1200 z.DeleteMarker, bts, err = msgp.ReadBoolBytes(bts) 1201 if err != nil { 1202 err = msgp.WrapError(err, "DeleteMarker") 1203 return 1204 } 1205 case "ReplicationTimeStamp": 1206 z.ReplicationTimeStamp, bts, err = msgp.ReadTimeBytes(bts) 1207 if err != nil { 1208 err = msgp.WrapError(err, "ReplicationTimeStamp") 1209 return 1210 } 1211 case "ReplicationStatusInternal": 1212 z.ReplicationStatusInternal, bts, err = msgp.ReadStringBytes(bts) 1213 if err != nil { 1214 err = msgp.WrapError(err, "ReplicationStatusInternal") 1215 return 1216 } 1217 case "VersionPurgeStatusInternal": 1218 z.VersionPurgeStatusInternal, bts, err = msgp.ReadStringBytes(bts) 1219 if err != nil { 1220 err = msgp.WrapError(err, "VersionPurgeStatusInternal") 1221 return 1222 } 1223 case "ReplicateDecisionStr": 1224 z.ReplicateDecisionStr, bts, err = msgp.ReadStringBytes(bts) 1225 if err != nil { 1226 err = msgp.WrapError(err, "ReplicateDecisionStr") 1227 return 1228 } 1229 case "Targets": 1230 var zb0002 uint32 1231 zb0002, bts, err = msgp.ReadMapHeaderBytes(bts) 1232 if err != nil { 1233 err = msgp.WrapError(err, "Targets") 1234 return 1235 } 1236 if z.Targets == nil { 1237 z.Targets = make(map[string]replication.StatusType, zb0002) 1238 } else if len(z.Targets) > 0 { 1239 for key := range z.Targets { 1240 delete(z.Targets, key) 1241 } 1242 } 1243 for zb0002 > 0 { 1244 var za0001 string 1245 var za0002 replication.StatusType 1246 zb0002-- 1247 za0001, bts, err = msgp.ReadStringBytes(bts) 1248 if err != nil { 1249 err = msgp.WrapError(err, "Targets") 1250 return 1251 } 1252 bts, err = za0002.UnmarshalMsg(bts) 1253 if err != nil { 1254 err = msgp.WrapError(err, "Targets", za0001) 1255 return 1256 } 1257 z.Targets[za0001] = za0002 1258 } 1259 case "PurgeTargets": 1260 var zb0003 uint32 1261 zb0003, bts, err = msgp.ReadMapHeaderBytes(bts) 1262 if err != nil { 1263 err = msgp.WrapError(err, "PurgeTargets") 1264 return 1265 } 1266 if z.PurgeTargets == nil { 1267 z.PurgeTargets = make(map[string]VersionPurgeStatusType, zb0003) 1268 } else if len(z.PurgeTargets) > 0 { 1269 for key := range z.PurgeTargets { 1270 delete(z.PurgeTargets, key) 1271 } 1272 } 1273 for zb0003 > 0 { 1274 var za0003 string 1275 var za0004 VersionPurgeStatusType 1276 zb0003-- 1277 za0003, bts, err = msgp.ReadStringBytes(bts) 1278 if err != nil { 1279 err = msgp.WrapError(err, "PurgeTargets") 1280 return 1281 } 1282 { 1283 var zb0004 string 1284 zb0004, bts, err = msgp.ReadStringBytes(bts) 1285 if err != nil { 1286 err = msgp.WrapError(err, "PurgeTargets", za0003) 1287 return 1288 } 1289 za0004 = VersionPurgeStatusType(zb0004) 1290 } 1291 z.PurgeTargets[za0003] = za0004 1292 } 1293 case "ResetStatusesMap": 1294 var zb0005 uint32 1295 zb0005, bts, err = msgp.ReadMapHeaderBytes(bts) 1296 if err != nil { 1297 err = msgp.WrapError(err, "ResetStatusesMap") 1298 return 1299 } 1300 if z.ResetStatusesMap == nil { 1301 z.ResetStatusesMap = make(map[string]string, zb0005) 1302 } else if len(z.ResetStatusesMap) > 0 { 1303 for key := range z.ResetStatusesMap { 1304 delete(z.ResetStatusesMap, key) 1305 } 1306 } 1307 for zb0005 > 0 { 1308 var za0005 string 1309 var za0006 string 1310 zb0005-- 1311 za0005, bts, err = msgp.ReadStringBytes(bts) 1312 if err != nil { 1313 err = msgp.WrapError(err, "ResetStatusesMap") 1314 return 1315 } 1316 za0006, bts, err = msgp.ReadStringBytes(bts) 1317 if err != nil { 1318 err = msgp.WrapError(err, "ResetStatusesMap", za0005) 1319 return 1320 } 1321 z.ResetStatusesMap[za0005] = za0006 1322 } 1323 default: 1324 bts, err = msgp.Skip(bts) 1325 if err != nil { 1326 err = msgp.WrapError(err) 1327 return 1328 } 1329 } 1330 } 1331 o = bts 1332 return 1333 } 1334 1335 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 1336 func (z *ReplicationState) Msgsize() (s int) { 1337 s = 1 + 17 + msgp.TimeSize + 14 + z.ReplicaStatus.Msgsize() + 13 + msgp.BoolSize + 21 + msgp.TimeSize + 26 + msgp.StringPrefixSize + len(z.ReplicationStatusInternal) + 27 + msgp.StringPrefixSize + len(z.VersionPurgeStatusInternal) + 21 + msgp.StringPrefixSize + len(z.ReplicateDecisionStr) + 8 + msgp.MapHeaderSize 1338 if z.Targets != nil { 1339 for za0001, za0002 := range z.Targets { 1340 _ = za0002 1341 s += msgp.StringPrefixSize + len(za0001) + za0002.Msgsize() 1342 } 1343 } 1344 s += 13 + msgp.MapHeaderSize 1345 if z.PurgeTargets != nil { 1346 for za0003, za0004 := range z.PurgeTargets { 1347 _ = za0004 1348 s += msgp.StringPrefixSize + len(za0003) + msgp.StringPrefixSize + len(string(za0004)) 1349 } 1350 } 1351 s += 17 + msgp.MapHeaderSize 1352 if z.ResetStatusesMap != nil { 1353 for za0005, za0006 := range z.ResetStatusesMap { 1354 _ = za0006 1355 s += msgp.StringPrefixSize + len(za0005) + msgp.StringPrefixSize + len(za0006) 1356 } 1357 } 1358 return 1359 } 1360 1361 // DecodeMsg implements msgp.Decodable 1362 func (z *ResyncDecision) DecodeMsg(dc *msgp.Reader) (err error) { 1363 var field []byte 1364 _ = field 1365 var zb0001 uint32 1366 zb0001, err = dc.ReadMapHeader() 1367 if err != nil { 1368 err = msgp.WrapError(err) 1369 return 1370 } 1371 for zb0001 > 0 { 1372 zb0001-- 1373 field, err = dc.ReadMapKeyPtr() 1374 if err != nil { 1375 err = msgp.WrapError(err) 1376 return 1377 } 1378 switch msgp.UnsafeString(field) { 1379 default: 1380 err = dc.Skip() 1381 if err != nil { 1382 err = msgp.WrapError(err) 1383 return 1384 } 1385 } 1386 } 1387 return 1388 } 1389 1390 // EncodeMsg implements msgp.Encodable 1391 func (z ResyncDecision) EncodeMsg(en *msgp.Writer) (err error) { 1392 // map header, size 0 1393 _ = z 1394 err = en.Append(0x80) 1395 if err != nil { 1396 return 1397 } 1398 return 1399 } 1400 1401 // MarshalMsg implements msgp.Marshaler 1402 func (z ResyncDecision) MarshalMsg(b []byte) (o []byte, err error) { 1403 o = msgp.Require(b, z.Msgsize()) 1404 // map header, size 0 1405 _ = z 1406 o = append(o, 0x80) 1407 return 1408 } 1409 1410 // UnmarshalMsg implements msgp.Unmarshaler 1411 func (z *ResyncDecision) UnmarshalMsg(bts []byte) (o []byte, err error) { 1412 var field []byte 1413 _ = field 1414 var zb0001 uint32 1415 zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) 1416 if err != nil { 1417 err = msgp.WrapError(err) 1418 return 1419 } 1420 for zb0001 > 0 { 1421 zb0001-- 1422 field, bts, err = msgp.ReadMapKeyZC(bts) 1423 if err != nil { 1424 err = msgp.WrapError(err) 1425 return 1426 } 1427 switch msgp.UnsafeString(field) { 1428 default: 1429 bts, err = msgp.Skip(bts) 1430 if err != nil { 1431 err = msgp.WrapError(err) 1432 return 1433 } 1434 } 1435 } 1436 o = bts 1437 return 1438 } 1439 1440 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 1441 func (z ResyncDecision) Msgsize() (s int) { 1442 s = 1 1443 return 1444 } 1445 1446 // DecodeMsg implements msgp.Decodable 1447 func (z *ResyncStatusType) DecodeMsg(dc *msgp.Reader) (err error) { 1448 { 1449 var zb0001 int 1450 zb0001, err = dc.ReadInt() 1451 if err != nil { 1452 err = msgp.WrapError(err) 1453 return 1454 } 1455 (*z) = ResyncStatusType(zb0001) 1456 } 1457 return 1458 } 1459 1460 // EncodeMsg implements msgp.Encodable 1461 func (z ResyncStatusType) EncodeMsg(en *msgp.Writer) (err error) { 1462 err = en.WriteInt(int(z)) 1463 if err != nil { 1464 err = msgp.WrapError(err) 1465 return 1466 } 1467 return 1468 } 1469 1470 // MarshalMsg implements msgp.Marshaler 1471 func (z ResyncStatusType) MarshalMsg(b []byte) (o []byte, err error) { 1472 o = msgp.Require(b, z.Msgsize()) 1473 o = msgp.AppendInt(o, int(z)) 1474 return 1475 } 1476 1477 // UnmarshalMsg implements msgp.Unmarshaler 1478 func (z *ResyncStatusType) UnmarshalMsg(bts []byte) (o []byte, err error) { 1479 { 1480 var zb0001 int 1481 zb0001, bts, err = msgp.ReadIntBytes(bts) 1482 if err != nil { 1483 err = msgp.WrapError(err) 1484 return 1485 } 1486 (*z) = ResyncStatusType(zb0001) 1487 } 1488 o = bts 1489 return 1490 } 1491 1492 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 1493 func (z ResyncStatusType) Msgsize() (s int) { 1494 s = msgp.IntSize 1495 return 1496 } 1497 1498 // DecodeMsg implements msgp.Decodable 1499 func (z *ResyncTarget) DecodeMsg(dc *msgp.Reader) (err error) { 1500 var field []byte 1501 _ = field 1502 var zb0001 uint32 1503 zb0001, err = dc.ReadMapHeader() 1504 if err != nil { 1505 err = msgp.WrapError(err) 1506 return 1507 } 1508 for zb0001 > 0 { 1509 zb0001-- 1510 field, err = dc.ReadMapKeyPtr() 1511 if err != nil { 1512 err = msgp.WrapError(err) 1513 return 1514 } 1515 switch msgp.UnsafeString(field) { 1516 case "Arn": 1517 z.Arn, err = dc.ReadString() 1518 if err != nil { 1519 err = msgp.WrapError(err, "Arn") 1520 return 1521 } 1522 case "ResetID": 1523 z.ResetID, err = dc.ReadString() 1524 if err != nil { 1525 err = msgp.WrapError(err, "ResetID") 1526 return 1527 } 1528 case "StartTime": 1529 z.StartTime, err = dc.ReadTime() 1530 if err != nil { 1531 err = msgp.WrapError(err, "StartTime") 1532 return 1533 } 1534 case "EndTime": 1535 z.EndTime, err = dc.ReadTime() 1536 if err != nil { 1537 err = msgp.WrapError(err, "EndTime") 1538 return 1539 } 1540 case "ResyncStatus": 1541 z.ResyncStatus, err = dc.ReadString() 1542 if err != nil { 1543 err = msgp.WrapError(err, "ResyncStatus") 1544 return 1545 } 1546 case "ReplicatedSize": 1547 z.ReplicatedSize, err = dc.ReadInt64() 1548 if err != nil { 1549 err = msgp.WrapError(err, "ReplicatedSize") 1550 return 1551 } 1552 case "FailedSize": 1553 z.FailedSize, err = dc.ReadInt64() 1554 if err != nil { 1555 err = msgp.WrapError(err, "FailedSize") 1556 return 1557 } 1558 case "FailedCount": 1559 z.FailedCount, err = dc.ReadInt64() 1560 if err != nil { 1561 err = msgp.WrapError(err, "FailedCount") 1562 return 1563 } 1564 case "ReplicatedCount": 1565 z.ReplicatedCount, err = dc.ReadInt64() 1566 if err != nil { 1567 err = msgp.WrapError(err, "ReplicatedCount") 1568 return 1569 } 1570 case "Bucket": 1571 z.Bucket, err = dc.ReadString() 1572 if err != nil { 1573 err = msgp.WrapError(err, "Bucket") 1574 return 1575 } 1576 case "Object": 1577 z.Object, err = dc.ReadString() 1578 if err != nil { 1579 err = msgp.WrapError(err, "Object") 1580 return 1581 } 1582 default: 1583 err = dc.Skip() 1584 if err != nil { 1585 err = msgp.WrapError(err) 1586 return 1587 } 1588 } 1589 } 1590 return 1591 } 1592 1593 // EncodeMsg implements msgp.Encodable 1594 func (z *ResyncTarget) EncodeMsg(en *msgp.Writer) (err error) { 1595 // map header, size 11 1596 // write "Arn" 1597 err = en.Append(0x8b, 0xa3, 0x41, 0x72, 0x6e) 1598 if err != nil { 1599 return 1600 } 1601 err = en.WriteString(z.Arn) 1602 if err != nil { 1603 err = msgp.WrapError(err, "Arn") 1604 return 1605 } 1606 // write "ResetID" 1607 err = en.Append(0xa7, 0x52, 0x65, 0x73, 0x65, 0x74, 0x49, 0x44) 1608 if err != nil { 1609 return 1610 } 1611 err = en.WriteString(z.ResetID) 1612 if err != nil { 1613 err = msgp.WrapError(err, "ResetID") 1614 return 1615 } 1616 // write "StartTime" 1617 err = en.Append(0xa9, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65) 1618 if err != nil { 1619 return 1620 } 1621 err = en.WriteTime(z.StartTime) 1622 if err != nil { 1623 err = msgp.WrapError(err, "StartTime") 1624 return 1625 } 1626 // write "EndTime" 1627 err = en.Append(0xa7, 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65) 1628 if err != nil { 1629 return 1630 } 1631 err = en.WriteTime(z.EndTime) 1632 if err != nil { 1633 err = msgp.WrapError(err, "EndTime") 1634 return 1635 } 1636 // write "ResyncStatus" 1637 err = en.Append(0xac, 0x52, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73) 1638 if err != nil { 1639 return 1640 } 1641 err = en.WriteString(z.ResyncStatus) 1642 if err != nil { 1643 err = msgp.WrapError(err, "ResyncStatus") 1644 return 1645 } 1646 // write "ReplicatedSize" 1647 err = en.Append(0xae, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x53, 0x69, 0x7a, 0x65) 1648 if err != nil { 1649 return 1650 } 1651 err = en.WriteInt64(z.ReplicatedSize) 1652 if err != nil { 1653 err = msgp.WrapError(err, "ReplicatedSize") 1654 return 1655 } 1656 // write "FailedSize" 1657 err = en.Append(0xaa, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x53, 0x69, 0x7a, 0x65) 1658 if err != nil { 1659 return 1660 } 1661 err = en.WriteInt64(z.FailedSize) 1662 if err != nil { 1663 err = msgp.WrapError(err, "FailedSize") 1664 return 1665 } 1666 // write "FailedCount" 1667 err = en.Append(0xab, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74) 1668 if err != nil { 1669 return 1670 } 1671 err = en.WriteInt64(z.FailedCount) 1672 if err != nil { 1673 err = msgp.WrapError(err, "FailedCount") 1674 return 1675 } 1676 // write "ReplicatedCount" 1677 err = en.Append(0xaf, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74) 1678 if err != nil { 1679 return 1680 } 1681 err = en.WriteInt64(z.ReplicatedCount) 1682 if err != nil { 1683 err = msgp.WrapError(err, "ReplicatedCount") 1684 return 1685 } 1686 // write "Bucket" 1687 err = en.Append(0xa6, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74) 1688 if err != nil { 1689 return 1690 } 1691 err = en.WriteString(z.Bucket) 1692 if err != nil { 1693 err = msgp.WrapError(err, "Bucket") 1694 return 1695 } 1696 // write "Object" 1697 err = en.Append(0xa6, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74) 1698 if err != nil { 1699 return 1700 } 1701 err = en.WriteString(z.Object) 1702 if err != nil { 1703 err = msgp.WrapError(err, "Object") 1704 return 1705 } 1706 return 1707 } 1708 1709 // MarshalMsg implements msgp.Marshaler 1710 func (z *ResyncTarget) MarshalMsg(b []byte) (o []byte, err error) { 1711 o = msgp.Require(b, z.Msgsize()) 1712 // map header, size 11 1713 // string "Arn" 1714 o = append(o, 0x8b, 0xa3, 0x41, 0x72, 0x6e) 1715 o = msgp.AppendString(o, z.Arn) 1716 // string "ResetID" 1717 o = append(o, 0xa7, 0x52, 0x65, 0x73, 0x65, 0x74, 0x49, 0x44) 1718 o = msgp.AppendString(o, z.ResetID) 1719 // string "StartTime" 1720 o = append(o, 0xa9, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65) 1721 o = msgp.AppendTime(o, z.StartTime) 1722 // string "EndTime" 1723 o = append(o, 0xa7, 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65) 1724 o = msgp.AppendTime(o, z.EndTime) 1725 // string "ResyncStatus" 1726 o = append(o, 0xac, 0x52, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73) 1727 o = msgp.AppendString(o, z.ResyncStatus) 1728 // string "ReplicatedSize" 1729 o = append(o, 0xae, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x53, 0x69, 0x7a, 0x65) 1730 o = msgp.AppendInt64(o, z.ReplicatedSize) 1731 // string "FailedSize" 1732 o = append(o, 0xaa, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x53, 0x69, 0x7a, 0x65) 1733 o = msgp.AppendInt64(o, z.FailedSize) 1734 // string "FailedCount" 1735 o = append(o, 0xab, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74) 1736 o = msgp.AppendInt64(o, z.FailedCount) 1737 // string "ReplicatedCount" 1738 o = append(o, 0xaf, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74) 1739 o = msgp.AppendInt64(o, z.ReplicatedCount) 1740 // string "Bucket" 1741 o = append(o, 0xa6, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74) 1742 o = msgp.AppendString(o, z.Bucket) 1743 // string "Object" 1744 o = append(o, 0xa6, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74) 1745 o = msgp.AppendString(o, z.Object) 1746 return 1747 } 1748 1749 // UnmarshalMsg implements msgp.Unmarshaler 1750 func (z *ResyncTarget) UnmarshalMsg(bts []byte) (o []byte, err error) { 1751 var field []byte 1752 _ = field 1753 var zb0001 uint32 1754 zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) 1755 if err != nil { 1756 err = msgp.WrapError(err) 1757 return 1758 } 1759 for zb0001 > 0 { 1760 zb0001-- 1761 field, bts, err = msgp.ReadMapKeyZC(bts) 1762 if err != nil { 1763 err = msgp.WrapError(err) 1764 return 1765 } 1766 switch msgp.UnsafeString(field) { 1767 case "Arn": 1768 z.Arn, bts, err = msgp.ReadStringBytes(bts) 1769 if err != nil { 1770 err = msgp.WrapError(err, "Arn") 1771 return 1772 } 1773 case "ResetID": 1774 z.ResetID, bts, err = msgp.ReadStringBytes(bts) 1775 if err != nil { 1776 err = msgp.WrapError(err, "ResetID") 1777 return 1778 } 1779 case "StartTime": 1780 z.StartTime, bts, err = msgp.ReadTimeBytes(bts) 1781 if err != nil { 1782 err = msgp.WrapError(err, "StartTime") 1783 return 1784 } 1785 case "EndTime": 1786 z.EndTime, bts, err = msgp.ReadTimeBytes(bts) 1787 if err != nil { 1788 err = msgp.WrapError(err, "EndTime") 1789 return 1790 } 1791 case "ResyncStatus": 1792 z.ResyncStatus, bts, err = msgp.ReadStringBytes(bts) 1793 if err != nil { 1794 err = msgp.WrapError(err, "ResyncStatus") 1795 return 1796 } 1797 case "ReplicatedSize": 1798 z.ReplicatedSize, bts, err = msgp.ReadInt64Bytes(bts) 1799 if err != nil { 1800 err = msgp.WrapError(err, "ReplicatedSize") 1801 return 1802 } 1803 case "FailedSize": 1804 z.FailedSize, bts, err = msgp.ReadInt64Bytes(bts) 1805 if err != nil { 1806 err = msgp.WrapError(err, "FailedSize") 1807 return 1808 } 1809 case "FailedCount": 1810 z.FailedCount, bts, err = msgp.ReadInt64Bytes(bts) 1811 if err != nil { 1812 err = msgp.WrapError(err, "FailedCount") 1813 return 1814 } 1815 case "ReplicatedCount": 1816 z.ReplicatedCount, bts, err = msgp.ReadInt64Bytes(bts) 1817 if err != nil { 1818 err = msgp.WrapError(err, "ReplicatedCount") 1819 return 1820 } 1821 case "Bucket": 1822 z.Bucket, bts, err = msgp.ReadStringBytes(bts) 1823 if err != nil { 1824 err = msgp.WrapError(err, "Bucket") 1825 return 1826 } 1827 case "Object": 1828 z.Object, bts, err = msgp.ReadStringBytes(bts) 1829 if err != nil { 1830 err = msgp.WrapError(err, "Object") 1831 return 1832 } 1833 default: 1834 bts, err = msgp.Skip(bts) 1835 if err != nil { 1836 err = msgp.WrapError(err) 1837 return 1838 } 1839 } 1840 } 1841 o = bts 1842 return 1843 } 1844 1845 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 1846 func (z *ResyncTarget) Msgsize() (s int) { 1847 s = 1 + 4 + msgp.StringPrefixSize + len(z.Arn) + 8 + msgp.StringPrefixSize + len(z.ResetID) + 10 + msgp.TimeSize + 8 + msgp.TimeSize + 13 + msgp.StringPrefixSize + len(z.ResyncStatus) + 15 + msgp.Int64Size + 11 + msgp.Int64Size + 12 + msgp.Int64Size + 16 + msgp.Int64Size + 7 + msgp.StringPrefixSize + len(z.Bucket) + 7 + msgp.StringPrefixSize + len(z.Object) 1848 return 1849 } 1850 1851 // DecodeMsg implements msgp.Decodable 1852 func (z *ResyncTargetDecision) DecodeMsg(dc *msgp.Reader) (err error) { 1853 var field []byte 1854 _ = field 1855 var zb0001 uint32 1856 zb0001, err = dc.ReadMapHeader() 1857 if err != nil { 1858 err = msgp.WrapError(err) 1859 return 1860 } 1861 for zb0001 > 0 { 1862 zb0001-- 1863 field, err = dc.ReadMapKeyPtr() 1864 if err != nil { 1865 err = msgp.WrapError(err) 1866 return 1867 } 1868 switch msgp.UnsafeString(field) { 1869 case "Replicate": 1870 z.Replicate, err = dc.ReadBool() 1871 if err != nil { 1872 err = msgp.WrapError(err, "Replicate") 1873 return 1874 } 1875 case "ResetID": 1876 z.ResetID, err = dc.ReadString() 1877 if err != nil { 1878 err = msgp.WrapError(err, "ResetID") 1879 return 1880 } 1881 case "ResetBeforeDate": 1882 z.ResetBeforeDate, err = dc.ReadTime() 1883 if err != nil { 1884 err = msgp.WrapError(err, "ResetBeforeDate") 1885 return 1886 } 1887 default: 1888 err = dc.Skip() 1889 if err != nil { 1890 err = msgp.WrapError(err) 1891 return 1892 } 1893 } 1894 } 1895 return 1896 } 1897 1898 // EncodeMsg implements msgp.Encodable 1899 func (z ResyncTargetDecision) EncodeMsg(en *msgp.Writer) (err error) { 1900 // map header, size 3 1901 // write "Replicate" 1902 err = en.Append(0x83, 0xa9, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65) 1903 if err != nil { 1904 return 1905 } 1906 err = en.WriteBool(z.Replicate) 1907 if err != nil { 1908 err = msgp.WrapError(err, "Replicate") 1909 return 1910 } 1911 // write "ResetID" 1912 err = en.Append(0xa7, 0x52, 0x65, 0x73, 0x65, 0x74, 0x49, 0x44) 1913 if err != nil { 1914 return 1915 } 1916 err = en.WriteString(z.ResetID) 1917 if err != nil { 1918 err = msgp.WrapError(err, "ResetID") 1919 return 1920 } 1921 // write "ResetBeforeDate" 1922 err = en.Append(0xaf, 0x52, 0x65, 0x73, 0x65, 0x74, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x44, 0x61, 0x74, 0x65) 1923 if err != nil { 1924 return 1925 } 1926 err = en.WriteTime(z.ResetBeforeDate) 1927 if err != nil { 1928 err = msgp.WrapError(err, "ResetBeforeDate") 1929 return 1930 } 1931 return 1932 } 1933 1934 // MarshalMsg implements msgp.Marshaler 1935 func (z ResyncTargetDecision) MarshalMsg(b []byte) (o []byte, err error) { 1936 o = msgp.Require(b, z.Msgsize()) 1937 // map header, size 3 1938 // string "Replicate" 1939 o = append(o, 0x83, 0xa9, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65) 1940 o = msgp.AppendBool(o, z.Replicate) 1941 // string "ResetID" 1942 o = append(o, 0xa7, 0x52, 0x65, 0x73, 0x65, 0x74, 0x49, 0x44) 1943 o = msgp.AppendString(o, z.ResetID) 1944 // string "ResetBeforeDate" 1945 o = append(o, 0xaf, 0x52, 0x65, 0x73, 0x65, 0x74, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x44, 0x61, 0x74, 0x65) 1946 o = msgp.AppendTime(o, z.ResetBeforeDate) 1947 return 1948 } 1949 1950 // UnmarshalMsg implements msgp.Unmarshaler 1951 func (z *ResyncTargetDecision) UnmarshalMsg(bts []byte) (o []byte, err error) { 1952 var field []byte 1953 _ = field 1954 var zb0001 uint32 1955 zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) 1956 if err != nil { 1957 err = msgp.WrapError(err) 1958 return 1959 } 1960 for zb0001 > 0 { 1961 zb0001-- 1962 field, bts, err = msgp.ReadMapKeyZC(bts) 1963 if err != nil { 1964 err = msgp.WrapError(err) 1965 return 1966 } 1967 switch msgp.UnsafeString(field) { 1968 case "Replicate": 1969 z.Replicate, bts, err = msgp.ReadBoolBytes(bts) 1970 if err != nil { 1971 err = msgp.WrapError(err, "Replicate") 1972 return 1973 } 1974 case "ResetID": 1975 z.ResetID, bts, err = msgp.ReadStringBytes(bts) 1976 if err != nil { 1977 err = msgp.WrapError(err, "ResetID") 1978 return 1979 } 1980 case "ResetBeforeDate": 1981 z.ResetBeforeDate, bts, err = msgp.ReadTimeBytes(bts) 1982 if err != nil { 1983 err = msgp.WrapError(err, "ResetBeforeDate") 1984 return 1985 } 1986 default: 1987 bts, err = msgp.Skip(bts) 1988 if err != nil { 1989 err = msgp.WrapError(err) 1990 return 1991 } 1992 } 1993 } 1994 o = bts 1995 return 1996 } 1997 1998 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 1999 func (z ResyncTargetDecision) Msgsize() (s int) { 2000 s = 1 + 10 + msgp.BoolSize + 8 + msgp.StringPrefixSize + len(z.ResetID) + 16 + msgp.TimeSize 2001 return 2002 } 2003 2004 // DecodeMsg implements msgp.Decodable 2005 func (z *ResyncTargetsInfo) DecodeMsg(dc *msgp.Reader) (err error) { 2006 var field []byte 2007 _ = field 2008 var zb0001 uint32 2009 zb0001, err = dc.ReadMapHeader() 2010 if err != nil { 2011 err = msgp.WrapError(err) 2012 return 2013 } 2014 for zb0001 > 0 { 2015 zb0001-- 2016 field, err = dc.ReadMapKeyPtr() 2017 if err != nil { 2018 err = msgp.WrapError(err) 2019 return 2020 } 2021 switch msgp.UnsafeString(field) { 2022 case "Targets": 2023 var zb0002 uint32 2024 zb0002, err = dc.ReadArrayHeader() 2025 if err != nil { 2026 err = msgp.WrapError(err, "Targets") 2027 return 2028 } 2029 if cap(z.Targets) >= int(zb0002) { 2030 z.Targets = (z.Targets)[:zb0002] 2031 } else { 2032 z.Targets = make([]ResyncTarget, zb0002) 2033 } 2034 for za0001 := range z.Targets { 2035 err = z.Targets[za0001].DecodeMsg(dc) 2036 if err != nil { 2037 err = msgp.WrapError(err, "Targets", za0001) 2038 return 2039 } 2040 } 2041 default: 2042 err = dc.Skip() 2043 if err != nil { 2044 err = msgp.WrapError(err) 2045 return 2046 } 2047 } 2048 } 2049 return 2050 } 2051 2052 // EncodeMsg implements msgp.Encodable 2053 func (z *ResyncTargetsInfo) EncodeMsg(en *msgp.Writer) (err error) { 2054 // map header, size 1 2055 // write "Targets" 2056 err = en.Append(0x81, 0xa7, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73) 2057 if err != nil { 2058 return 2059 } 2060 err = en.WriteArrayHeader(uint32(len(z.Targets))) 2061 if err != nil { 2062 err = msgp.WrapError(err, "Targets") 2063 return 2064 } 2065 for za0001 := range z.Targets { 2066 err = z.Targets[za0001].EncodeMsg(en) 2067 if err != nil { 2068 err = msgp.WrapError(err, "Targets", za0001) 2069 return 2070 } 2071 } 2072 return 2073 } 2074 2075 // MarshalMsg implements msgp.Marshaler 2076 func (z *ResyncTargetsInfo) MarshalMsg(b []byte) (o []byte, err error) { 2077 o = msgp.Require(b, z.Msgsize()) 2078 // map header, size 1 2079 // string "Targets" 2080 o = append(o, 0x81, 0xa7, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73) 2081 o = msgp.AppendArrayHeader(o, uint32(len(z.Targets))) 2082 for za0001 := range z.Targets { 2083 o, err = z.Targets[za0001].MarshalMsg(o) 2084 if err != nil { 2085 err = msgp.WrapError(err, "Targets", za0001) 2086 return 2087 } 2088 } 2089 return 2090 } 2091 2092 // UnmarshalMsg implements msgp.Unmarshaler 2093 func (z *ResyncTargetsInfo) UnmarshalMsg(bts []byte) (o []byte, err error) { 2094 var field []byte 2095 _ = field 2096 var zb0001 uint32 2097 zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) 2098 if err != nil { 2099 err = msgp.WrapError(err) 2100 return 2101 } 2102 for zb0001 > 0 { 2103 zb0001-- 2104 field, bts, err = msgp.ReadMapKeyZC(bts) 2105 if err != nil { 2106 err = msgp.WrapError(err) 2107 return 2108 } 2109 switch msgp.UnsafeString(field) { 2110 case "Targets": 2111 var zb0002 uint32 2112 zb0002, bts, err = msgp.ReadArrayHeaderBytes(bts) 2113 if err != nil { 2114 err = msgp.WrapError(err, "Targets") 2115 return 2116 } 2117 if cap(z.Targets) >= int(zb0002) { 2118 z.Targets = (z.Targets)[:zb0002] 2119 } else { 2120 z.Targets = make([]ResyncTarget, zb0002) 2121 } 2122 for za0001 := range z.Targets { 2123 bts, err = z.Targets[za0001].UnmarshalMsg(bts) 2124 if err != nil { 2125 err = msgp.WrapError(err, "Targets", za0001) 2126 return 2127 } 2128 } 2129 default: 2130 bts, err = msgp.Skip(bts) 2131 if err != nil { 2132 err = msgp.WrapError(err) 2133 return 2134 } 2135 } 2136 } 2137 o = bts 2138 return 2139 } 2140 2141 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 2142 func (z *ResyncTargetsInfo) Msgsize() (s int) { 2143 s = 1 + 8 + msgp.ArrayHeaderSize 2144 for za0001 := range z.Targets { 2145 s += z.Targets[za0001].Msgsize() 2146 } 2147 return 2148 } 2149 2150 // DecodeMsg implements msgp.Decodable 2151 func (z *TargetReplicationResyncStatus) DecodeMsg(dc *msgp.Reader) (err error) { 2152 var field []byte 2153 _ = field 2154 var zb0001 uint32 2155 zb0001, err = dc.ReadMapHeader() 2156 if err != nil { 2157 err = msgp.WrapError(err) 2158 return 2159 } 2160 for zb0001 > 0 { 2161 zb0001-- 2162 field, err = dc.ReadMapKeyPtr() 2163 if err != nil { 2164 err = msgp.WrapError(err) 2165 return 2166 } 2167 switch msgp.UnsafeString(field) { 2168 case "st": 2169 z.StartTime, err = dc.ReadTime() 2170 if err != nil { 2171 err = msgp.WrapError(err, "StartTime") 2172 return 2173 } 2174 case "lst": 2175 z.LastUpdate, err = dc.ReadTime() 2176 if err != nil { 2177 err = msgp.WrapError(err, "LastUpdate") 2178 return 2179 } 2180 case "id": 2181 z.ResyncID, err = dc.ReadString() 2182 if err != nil { 2183 err = msgp.WrapError(err, "ResyncID") 2184 return 2185 } 2186 case "rdt": 2187 z.ResyncBeforeDate, err = dc.ReadTime() 2188 if err != nil { 2189 err = msgp.WrapError(err, "ResyncBeforeDate") 2190 return 2191 } 2192 case "rst": 2193 { 2194 var zb0002 int 2195 zb0002, err = dc.ReadInt() 2196 if err != nil { 2197 err = msgp.WrapError(err, "ResyncStatus") 2198 return 2199 } 2200 z.ResyncStatus = ResyncStatusType(zb0002) 2201 } 2202 case "fs": 2203 z.FailedSize, err = dc.ReadInt64() 2204 if err != nil { 2205 err = msgp.WrapError(err, "FailedSize") 2206 return 2207 } 2208 case "frc": 2209 z.FailedCount, err = dc.ReadInt64() 2210 if err != nil { 2211 err = msgp.WrapError(err, "FailedCount") 2212 return 2213 } 2214 case "rs": 2215 z.ReplicatedSize, err = dc.ReadInt64() 2216 if err != nil { 2217 err = msgp.WrapError(err, "ReplicatedSize") 2218 return 2219 } 2220 case "rrc": 2221 z.ReplicatedCount, err = dc.ReadInt64() 2222 if err != nil { 2223 err = msgp.WrapError(err, "ReplicatedCount") 2224 return 2225 } 2226 case "bkt": 2227 z.Bucket, err = dc.ReadString() 2228 if err != nil { 2229 err = msgp.WrapError(err, "Bucket") 2230 return 2231 } 2232 case "obj": 2233 z.Object, err = dc.ReadString() 2234 if err != nil { 2235 err = msgp.WrapError(err, "Object") 2236 return 2237 } 2238 default: 2239 err = dc.Skip() 2240 if err != nil { 2241 err = msgp.WrapError(err) 2242 return 2243 } 2244 } 2245 } 2246 return 2247 } 2248 2249 // EncodeMsg implements msgp.Encodable 2250 func (z *TargetReplicationResyncStatus) EncodeMsg(en *msgp.Writer) (err error) { 2251 // map header, size 11 2252 // write "st" 2253 err = en.Append(0x8b, 0xa2, 0x73, 0x74) 2254 if err != nil { 2255 return 2256 } 2257 err = en.WriteTime(z.StartTime) 2258 if err != nil { 2259 err = msgp.WrapError(err, "StartTime") 2260 return 2261 } 2262 // write "lst" 2263 err = en.Append(0xa3, 0x6c, 0x73, 0x74) 2264 if err != nil { 2265 return 2266 } 2267 err = en.WriteTime(z.LastUpdate) 2268 if err != nil { 2269 err = msgp.WrapError(err, "LastUpdate") 2270 return 2271 } 2272 // write "id" 2273 err = en.Append(0xa2, 0x69, 0x64) 2274 if err != nil { 2275 return 2276 } 2277 err = en.WriteString(z.ResyncID) 2278 if err != nil { 2279 err = msgp.WrapError(err, "ResyncID") 2280 return 2281 } 2282 // write "rdt" 2283 err = en.Append(0xa3, 0x72, 0x64, 0x74) 2284 if err != nil { 2285 return 2286 } 2287 err = en.WriteTime(z.ResyncBeforeDate) 2288 if err != nil { 2289 err = msgp.WrapError(err, "ResyncBeforeDate") 2290 return 2291 } 2292 // write "rst" 2293 err = en.Append(0xa3, 0x72, 0x73, 0x74) 2294 if err != nil { 2295 return 2296 } 2297 err = en.WriteInt(int(z.ResyncStatus)) 2298 if err != nil { 2299 err = msgp.WrapError(err, "ResyncStatus") 2300 return 2301 } 2302 // write "fs" 2303 err = en.Append(0xa2, 0x66, 0x73) 2304 if err != nil { 2305 return 2306 } 2307 err = en.WriteInt64(z.FailedSize) 2308 if err != nil { 2309 err = msgp.WrapError(err, "FailedSize") 2310 return 2311 } 2312 // write "frc" 2313 err = en.Append(0xa3, 0x66, 0x72, 0x63) 2314 if err != nil { 2315 return 2316 } 2317 err = en.WriteInt64(z.FailedCount) 2318 if err != nil { 2319 err = msgp.WrapError(err, "FailedCount") 2320 return 2321 } 2322 // write "rs" 2323 err = en.Append(0xa2, 0x72, 0x73) 2324 if err != nil { 2325 return 2326 } 2327 err = en.WriteInt64(z.ReplicatedSize) 2328 if err != nil { 2329 err = msgp.WrapError(err, "ReplicatedSize") 2330 return 2331 } 2332 // write "rrc" 2333 err = en.Append(0xa3, 0x72, 0x72, 0x63) 2334 if err != nil { 2335 return 2336 } 2337 err = en.WriteInt64(z.ReplicatedCount) 2338 if err != nil { 2339 err = msgp.WrapError(err, "ReplicatedCount") 2340 return 2341 } 2342 // write "bkt" 2343 err = en.Append(0xa3, 0x62, 0x6b, 0x74) 2344 if err != nil { 2345 return 2346 } 2347 err = en.WriteString(z.Bucket) 2348 if err != nil { 2349 err = msgp.WrapError(err, "Bucket") 2350 return 2351 } 2352 // write "obj" 2353 err = en.Append(0xa3, 0x6f, 0x62, 0x6a) 2354 if err != nil { 2355 return 2356 } 2357 err = en.WriteString(z.Object) 2358 if err != nil { 2359 err = msgp.WrapError(err, "Object") 2360 return 2361 } 2362 return 2363 } 2364 2365 // MarshalMsg implements msgp.Marshaler 2366 func (z *TargetReplicationResyncStatus) MarshalMsg(b []byte) (o []byte, err error) { 2367 o = msgp.Require(b, z.Msgsize()) 2368 // map header, size 11 2369 // string "st" 2370 o = append(o, 0x8b, 0xa2, 0x73, 0x74) 2371 o = msgp.AppendTime(o, z.StartTime) 2372 // string "lst" 2373 o = append(o, 0xa3, 0x6c, 0x73, 0x74) 2374 o = msgp.AppendTime(o, z.LastUpdate) 2375 // string "id" 2376 o = append(o, 0xa2, 0x69, 0x64) 2377 o = msgp.AppendString(o, z.ResyncID) 2378 // string "rdt" 2379 o = append(o, 0xa3, 0x72, 0x64, 0x74) 2380 o = msgp.AppendTime(o, z.ResyncBeforeDate) 2381 // string "rst" 2382 o = append(o, 0xa3, 0x72, 0x73, 0x74) 2383 o = msgp.AppendInt(o, int(z.ResyncStatus)) 2384 // string "fs" 2385 o = append(o, 0xa2, 0x66, 0x73) 2386 o = msgp.AppendInt64(o, z.FailedSize) 2387 // string "frc" 2388 o = append(o, 0xa3, 0x66, 0x72, 0x63) 2389 o = msgp.AppendInt64(o, z.FailedCount) 2390 // string "rs" 2391 o = append(o, 0xa2, 0x72, 0x73) 2392 o = msgp.AppendInt64(o, z.ReplicatedSize) 2393 // string "rrc" 2394 o = append(o, 0xa3, 0x72, 0x72, 0x63) 2395 o = msgp.AppendInt64(o, z.ReplicatedCount) 2396 // string "bkt" 2397 o = append(o, 0xa3, 0x62, 0x6b, 0x74) 2398 o = msgp.AppendString(o, z.Bucket) 2399 // string "obj" 2400 o = append(o, 0xa3, 0x6f, 0x62, 0x6a) 2401 o = msgp.AppendString(o, z.Object) 2402 return 2403 } 2404 2405 // UnmarshalMsg implements msgp.Unmarshaler 2406 func (z *TargetReplicationResyncStatus) UnmarshalMsg(bts []byte) (o []byte, err error) { 2407 var field []byte 2408 _ = field 2409 var zb0001 uint32 2410 zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) 2411 if err != nil { 2412 err = msgp.WrapError(err) 2413 return 2414 } 2415 for zb0001 > 0 { 2416 zb0001-- 2417 field, bts, err = msgp.ReadMapKeyZC(bts) 2418 if err != nil { 2419 err = msgp.WrapError(err) 2420 return 2421 } 2422 switch msgp.UnsafeString(field) { 2423 case "st": 2424 z.StartTime, bts, err = msgp.ReadTimeBytes(bts) 2425 if err != nil { 2426 err = msgp.WrapError(err, "StartTime") 2427 return 2428 } 2429 case "lst": 2430 z.LastUpdate, bts, err = msgp.ReadTimeBytes(bts) 2431 if err != nil { 2432 err = msgp.WrapError(err, "LastUpdate") 2433 return 2434 } 2435 case "id": 2436 z.ResyncID, bts, err = msgp.ReadStringBytes(bts) 2437 if err != nil { 2438 err = msgp.WrapError(err, "ResyncID") 2439 return 2440 } 2441 case "rdt": 2442 z.ResyncBeforeDate, bts, err = msgp.ReadTimeBytes(bts) 2443 if err != nil { 2444 err = msgp.WrapError(err, "ResyncBeforeDate") 2445 return 2446 } 2447 case "rst": 2448 { 2449 var zb0002 int 2450 zb0002, bts, err = msgp.ReadIntBytes(bts) 2451 if err != nil { 2452 err = msgp.WrapError(err, "ResyncStatus") 2453 return 2454 } 2455 z.ResyncStatus = ResyncStatusType(zb0002) 2456 } 2457 case "fs": 2458 z.FailedSize, bts, err = msgp.ReadInt64Bytes(bts) 2459 if err != nil { 2460 err = msgp.WrapError(err, "FailedSize") 2461 return 2462 } 2463 case "frc": 2464 z.FailedCount, bts, err = msgp.ReadInt64Bytes(bts) 2465 if err != nil { 2466 err = msgp.WrapError(err, "FailedCount") 2467 return 2468 } 2469 case "rs": 2470 z.ReplicatedSize, bts, err = msgp.ReadInt64Bytes(bts) 2471 if err != nil { 2472 err = msgp.WrapError(err, "ReplicatedSize") 2473 return 2474 } 2475 case "rrc": 2476 z.ReplicatedCount, bts, err = msgp.ReadInt64Bytes(bts) 2477 if err != nil { 2478 err = msgp.WrapError(err, "ReplicatedCount") 2479 return 2480 } 2481 case "bkt": 2482 z.Bucket, bts, err = msgp.ReadStringBytes(bts) 2483 if err != nil { 2484 err = msgp.WrapError(err, "Bucket") 2485 return 2486 } 2487 case "obj": 2488 z.Object, bts, err = msgp.ReadStringBytes(bts) 2489 if err != nil { 2490 err = msgp.WrapError(err, "Object") 2491 return 2492 } 2493 default: 2494 bts, err = msgp.Skip(bts) 2495 if err != nil { 2496 err = msgp.WrapError(err) 2497 return 2498 } 2499 } 2500 } 2501 o = bts 2502 return 2503 } 2504 2505 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 2506 func (z *TargetReplicationResyncStatus) Msgsize() (s int) { 2507 s = 1 + 3 + msgp.TimeSize + 4 + msgp.TimeSize + 3 + msgp.StringPrefixSize + len(z.ResyncID) + 4 + msgp.TimeSize + 4 + msgp.IntSize + 3 + msgp.Int64Size + 4 + msgp.Int64Size + 3 + msgp.Int64Size + 4 + msgp.Int64Size + 4 + msgp.StringPrefixSize + len(z.Bucket) + 4 + msgp.StringPrefixSize + len(z.Object) 2508 return 2509 } 2510 2511 // DecodeMsg implements msgp.Decodable 2512 func (z *VersionPurgeStatusType) DecodeMsg(dc *msgp.Reader) (err error) { 2513 { 2514 var zb0001 string 2515 zb0001, err = dc.ReadString() 2516 if err != nil { 2517 err = msgp.WrapError(err) 2518 return 2519 } 2520 (*z) = VersionPurgeStatusType(zb0001) 2521 } 2522 return 2523 } 2524 2525 // EncodeMsg implements msgp.Encodable 2526 func (z VersionPurgeStatusType) EncodeMsg(en *msgp.Writer) (err error) { 2527 err = en.WriteString(string(z)) 2528 if err != nil { 2529 err = msgp.WrapError(err) 2530 return 2531 } 2532 return 2533 } 2534 2535 // MarshalMsg implements msgp.Marshaler 2536 func (z VersionPurgeStatusType) MarshalMsg(b []byte) (o []byte, err error) { 2537 o = msgp.Require(b, z.Msgsize()) 2538 o = msgp.AppendString(o, string(z)) 2539 return 2540 } 2541 2542 // UnmarshalMsg implements msgp.Unmarshaler 2543 func (z *VersionPurgeStatusType) UnmarshalMsg(bts []byte) (o []byte, err error) { 2544 { 2545 var zb0001 string 2546 zb0001, bts, err = msgp.ReadStringBytes(bts) 2547 if err != nil { 2548 err = msgp.WrapError(err) 2549 return 2550 } 2551 (*z) = VersionPurgeStatusType(zb0001) 2552 } 2553 o = bts 2554 return 2555 } 2556 2557 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 2558 func (z VersionPurgeStatusType) Msgsize() (s int) { 2559 s = msgp.StringPrefixSize + len(string(z)) 2560 return 2561 }