mirror of
https://github.com/minio/minio.git
synced 2024-12-25 22:55:54 -05:00
111 lines
2.2 KiB
Go
111 lines
2.2 KiB
Go
|
package cmd
|
||
|
|
||
|
// Code generated by github.com/tinylib/msgp DO NOT EDIT.
|
||
|
|
||
|
import (
|
||
|
"github.com/tinylib/msgp/msgp"
|
||
|
)
|
||
|
|
||
|
// DecodeMsg implements msgp.Decodable
|
||
|
func (z *healingTracker) DecodeMsg(dc *msgp.Reader) (err error) {
|
||
|
var field []byte
|
||
|
_ = field
|
||
|
var zb0001 uint32
|
||
|
zb0001, err = dc.ReadMapHeader()
|
||
|
if err != nil {
|
||
|
err = msgp.WrapError(err)
|
||
|
return
|
||
|
}
|
||
|
for zb0001 > 0 {
|
||
|
zb0001--
|
||
|
field, err = dc.ReadMapKeyPtr()
|
||
|
if err != nil {
|
||
|
err = msgp.WrapError(err)
|
||
|
return
|
||
|
}
|
||
|
switch msgp.UnsafeString(field) {
|
||
|
case "ID":
|
||
|
z.ID, err = dc.ReadString()
|
||
|
if err != nil {
|
||
|
err = msgp.WrapError(err, "ID")
|
||
|
return
|
||
|
}
|
||
|
default:
|
||
|
err = dc.Skip()
|
||
|
if err != nil {
|
||
|
err = msgp.WrapError(err)
|
||
|
return
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
return
|
||
|
}
|
||
|
|
||
|
// EncodeMsg implements msgp.Encodable
|
||
|
func (z healingTracker) EncodeMsg(en *msgp.Writer) (err error) {
|
||
|
// map header, size 1
|
||
|
// write "ID"
|
||
|
err = en.Append(0x81, 0xa2, 0x49, 0x44)
|
||
|
if err != nil {
|
||
|
return
|
||
|
}
|
||
|
err = en.WriteString(z.ID)
|
||
|
if err != nil {
|
||
|
err = msgp.WrapError(err, "ID")
|
||
|
return
|
||
|
}
|
||
|
return
|
||
|
}
|
||
|
|
||
|
// MarshalMsg implements msgp.Marshaler
|
||
|
func (z healingTracker) MarshalMsg(b []byte) (o []byte, err error) {
|
||
|
o = msgp.Require(b, z.Msgsize())
|
||
|
// map header, size 1
|
||
|
// string "ID"
|
||
|
o = append(o, 0x81, 0xa2, 0x49, 0x44)
|
||
|
o = msgp.AppendString(o, z.ID)
|
||
|
return
|
||
|
}
|
||
|
|
||
|
// UnmarshalMsg implements msgp.Unmarshaler
|
||
|
func (z *healingTracker) UnmarshalMsg(bts []byte) (o []byte, err error) {
|
||
|
var field []byte
|
||
|
_ = field
|
||
|
var zb0001 uint32
|
||
|
zb0001, bts, err = msgp.ReadMapHeaderBytes(bts)
|
||
|
if err != nil {
|
||
|
err = msgp.WrapError(err)
|
||
|
return
|
||
|
}
|
||
|
for zb0001 > 0 {
|
||
|
zb0001--
|
||
|
field, bts, err = msgp.ReadMapKeyZC(bts)
|
||
|
if err != nil {
|
||
|
err = msgp.WrapError(err)
|
||
|
return
|
||
|
}
|
||
|
switch msgp.UnsafeString(field) {
|
||
|
case "ID":
|
||
|
z.ID, bts, err = msgp.ReadStringBytes(bts)
|
||
|
if err != nil {
|
||
|
err = msgp.WrapError(err, "ID")
|
||
|
return
|
||
|
}
|
||
|
default:
|
||
|
bts, err = msgp.Skip(bts)
|
||
|
if err != nil {
|
||
|
err = msgp.WrapError(err)
|
||
|
return
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
o = bts
|
||
|
return
|
||
|
}
|
||
|
|
||
|
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
|
||
|
func (z healingTracker) Msgsize() (s int) {
|
||
|
s = 1 + 3 + msgp.StringPrefixSize + len(z.ID)
|
||
|
return
|
||
|
}
|