|
|
@ -8,205 +8,129 @@ import ( |
|
|
|
|
|
|
|
|
|
|
|
// DecodeMsg implements msgp.Decodable
|
|
|
|
// DecodeMsg implements msgp.Decodable
|
|
|
|
func (z *DiskInfo) DecodeMsg(dc *msgp.Reader) (err error) { |
|
|
|
func (z *DiskInfo) DecodeMsg(dc *msgp.Reader) (err error) { |
|
|
|
var field []byte |
|
|
|
|
|
|
|
_ = field |
|
|
|
|
|
|
|
var zb0001 uint32 |
|
|
|
var zb0001 uint32 |
|
|
|
zb0001, err = dc.ReadMapHeader() |
|
|
|
zb0001, err = dc.ReadArrayHeader() |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
err = msgp.WrapError(err) |
|
|
|
err = msgp.WrapError(err) |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
for zb0001 > 0 { |
|
|
|
if zb0001 != 11 { |
|
|
|
zb0001-- |
|
|
|
err = msgp.ArrayError{Wanted: 11, Got: zb0001} |
|
|
|
field, err = dc.ReadMapKeyPtr() |
|
|
|
return |
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err) |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
switch msgp.UnsafeString(field) { |
|
|
|
|
|
|
|
case "Total": |
|
|
|
|
|
|
|
z.Total, err = dc.ReadUint64() |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err, "Total") |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
case "Free": |
|
|
|
|
|
|
|
z.Free, err = dc.ReadUint64() |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err, "Free") |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
case "Used": |
|
|
|
|
|
|
|
z.Used, err = dc.ReadUint64() |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err, "Used") |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
case "UsedInodes": |
|
|
|
|
|
|
|
z.UsedInodes, err = dc.ReadUint64() |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err, "UsedInodes") |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
case "FSType": |
|
|
|
|
|
|
|
z.FSType, err = dc.ReadString() |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err, "FSType") |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
case "RootDisk": |
|
|
|
|
|
|
|
z.RootDisk, err = dc.ReadBool() |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err, "RootDisk") |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
case "Healing": |
|
|
|
|
|
|
|
z.Healing, err = dc.ReadBool() |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err, "Healing") |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
case "Endpoint": |
|
|
|
|
|
|
|
z.Endpoint, err = dc.ReadString() |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err, "Endpoint") |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
case "MountPath": |
|
|
|
|
|
|
|
z.MountPath, err = dc.ReadString() |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err, "MountPath") |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
case "ID": |
|
|
|
|
|
|
|
z.ID, err = dc.ReadString() |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err, "ID") |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
case "Error": |
|
|
|
|
|
|
|
z.Error, err = dc.ReadString() |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err, "Error") |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
default: |
|
|
|
|
|
|
|
err = dc.Skip() |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err) |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
return |
|
|
|
z.Total, err = dc.ReadUint64() |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// EncodeMsg implements msgp.Encodable
|
|
|
|
|
|
|
|
func (z *DiskInfo) EncodeMsg(en *msgp.Writer) (err error) { |
|
|
|
|
|
|
|
// map header, size 11
|
|
|
|
|
|
|
|
// write "Total"
|
|
|
|
|
|
|
|
err = en.Append(0x8b, 0xa5, 0x54, 0x6f, 0x74, 0x61, 0x6c) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err, "Total") |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
err = en.WriteUint64(z.Total) |
|
|
|
z.Free, err = dc.ReadUint64() |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
err = msgp.WrapError(err, "Total") |
|
|
|
err = msgp.WrapError(err, "Free") |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
// write "Free"
|
|
|
|
z.Used, err = dc.ReadUint64() |
|
|
|
err = en.Append(0xa4, 0x46, 0x72, 0x65, 0x65) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err, "Used") |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
err = en.WriteUint64(z.Free) |
|
|
|
z.UsedInodes, err = dc.ReadUint64() |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
err = msgp.WrapError(err, "Free") |
|
|
|
err = msgp.WrapError(err, "UsedInodes") |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
// write "Used"
|
|
|
|
z.FSType, err = dc.ReadString() |
|
|
|
err = en.Append(0xa4, 0x55, 0x73, 0x65, 0x64) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err, "FSType") |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
err = en.WriteUint64(z.Used) |
|
|
|
z.RootDisk, err = dc.ReadBool() |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
err = msgp.WrapError(err, "Used") |
|
|
|
err = msgp.WrapError(err, "RootDisk") |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
// write "UsedInodes"
|
|
|
|
z.Healing, err = dc.ReadBool() |
|
|
|
err = en.Append(0xaa, 0x55, 0x73, 0x65, 0x64, 0x49, 0x6e, 0x6f, 0x64, 0x65, 0x73) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err, "Healing") |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
err = en.WriteUint64(z.UsedInodes) |
|
|
|
z.Endpoint, err = dc.ReadString() |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
err = msgp.WrapError(err, "UsedInodes") |
|
|
|
err = msgp.WrapError(err, "Endpoint") |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
// write "FSType"
|
|
|
|
z.MountPath, err = dc.ReadString() |
|
|
|
err = en.Append(0xa6, 0x46, 0x53, 0x54, 0x79, 0x70, 0x65) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err, "MountPath") |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
err = en.WriteString(z.FSType) |
|
|
|
z.ID, err = dc.ReadString() |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
err = msgp.WrapError(err, "FSType") |
|
|
|
err = msgp.WrapError(err, "ID") |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
// write "RootDisk"
|
|
|
|
z.Error, err = dc.ReadString() |
|
|
|
err = en.Append(0xa8, 0x52, 0x6f, 0x6f, 0x74, 0x44, 0x69, 0x73, 0x6b) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err, "Error") |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
err = en.WriteBool(z.RootDisk) |
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// EncodeMsg implements msgp.Encodable
|
|
|
|
|
|
|
|
func (z *DiskInfo) EncodeMsg(en *msgp.Writer) (err error) { |
|
|
|
|
|
|
|
// array header, size 11
|
|
|
|
|
|
|
|
err = en.Append(0x9b) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
err = msgp.WrapError(err, "RootDisk") |
|
|
|
|
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
// write "Healing"
|
|
|
|
err = en.WriteUint64(z.Total) |
|
|
|
err = en.Append(0xa7, 0x48, 0x65, 0x61, 0x6c, 0x69, 0x6e, 0x67) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err, "Total") |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
err = en.WriteBool(z.Healing) |
|
|
|
err = en.WriteUint64(z.Free) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
err = msgp.WrapError(err, "Healing") |
|
|
|
err = msgp.WrapError(err, "Free") |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
// write "Endpoint"
|
|
|
|
err = en.WriteUint64(z.Used) |
|
|
|
err = en.Append(0xa8, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err, "Used") |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
err = en.WriteString(z.Endpoint) |
|
|
|
err = en.WriteUint64(z.UsedInodes) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
err = msgp.WrapError(err, "Endpoint") |
|
|
|
err = msgp.WrapError(err, "UsedInodes") |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
// write "MountPath"
|
|
|
|
err = en.WriteString(z.FSType) |
|
|
|
err = en.Append(0xa9, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x61, 0x74, 0x68) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err, "FSType") |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
err = en.WriteString(z.MountPath) |
|
|
|
err = en.WriteBool(z.RootDisk) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
err = msgp.WrapError(err, "MountPath") |
|
|
|
err = msgp.WrapError(err, "RootDisk") |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
// write "ID"
|
|
|
|
err = en.WriteBool(z.Healing) |
|
|
|
err = en.Append(0xa2, 0x49, 0x44) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err, "Healing") |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
err = en.WriteString(z.ID) |
|
|
|
err = en.WriteString(z.Endpoint) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
err = msgp.WrapError(err, "ID") |
|
|
|
err = msgp.WrapError(err, "Endpoint") |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
// write "Error"
|
|
|
|
err = en.WriteString(z.MountPath) |
|
|
|
err = en.Append(0xa5, 0x45, 0x72, 0x72, 0x6f, 0x72) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err, "MountPath") |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
err = en.WriteString(z.ID) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err, "ID") |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
err = en.WriteString(z.Error) |
|
|
|
err = en.WriteString(z.Error) |
|
|
@ -220,134 +144,88 @@ func (z *DiskInfo) EncodeMsg(en *msgp.Writer) (err error) { |
|
|
|
// MarshalMsg implements msgp.Marshaler
|
|
|
|
// MarshalMsg implements msgp.Marshaler
|
|
|
|
func (z *DiskInfo) MarshalMsg(b []byte) (o []byte, err error) { |
|
|
|
func (z *DiskInfo) MarshalMsg(b []byte) (o []byte, err error) { |
|
|
|
o = msgp.Require(b, z.Msgsize()) |
|
|
|
o = msgp.Require(b, z.Msgsize()) |
|
|
|
// map header, size 11
|
|
|
|
// array header, size 11
|
|
|
|
// string "Total"
|
|
|
|
o = append(o, 0x9b) |
|
|
|
o = append(o, 0x8b, 0xa5, 0x54, 0x6f, 0x74, 0x61, 0x6c) |
|
|
|
|
|
|
|
o = msgp.AppendUint64(o, z.Total) |
|
|
|
o = msgp.AppendUint64(o, z.Total) |
|
|
|
// string "Free"
|
|
|
|
|
|
|
|
o = append(o, 0xa4, 0x46, 0x72, 0x65, 0x65) |
|
|
|
|
|
|
|
o = msgp.AppendUint64(o, z.Free) |
|
|
|
o = msgp.AppendUint64(o, z.Free) |
|
|
|
// string "Used"
|
|
|
|
|
|
|
|
o = append(o, 0xa4, 0x55, 0x73, 0x65, 0x64) |
|
|
|
|
|
|
|
o = msgp.AppendUint64(o, z.Used) |
|
|
|
o = msgp.AppendUint64(o, z.Used) |
|
|
|
// string "UsedInodes"
|
|
|
|
|
|
|
|
o = append(o, 0xaa, 0x55, 0x73, 0x65, 0x64, 0x49, 0x6e, 0x6f, 0x64, 0x65, 0x73) |
|
|
|
|
|
|
|
o = msgp.AppendUint64(o, z.UsedInodes) |
|
|
|
o = msgp.AppendUint64(o, z.UsedInodes) |
|
|
|
// string "FSType"
|
|
|
|
|
|
|
|
o = append(o, 0xa6, 0x46, 0x53, 0x54, 0x79, 0x70, 0x65) |
|
|
|
|
|
|
|
o = msgp.AppendString(o, z.FSType) |
|
|
|
o = msgp.AppendString(o, z.FSType) |
|
|
|
// string "RootDisk"
|
|
|
|
|
|
|
|
o = append(o, 0xa8, 0x52, 0x6f, 0x6f, 0x74, 0x44, 0x69, 0x73, 0x6b) |
|
|
|
|
|
|
|
o = msgp.AppendBool(o, z.RootDisk) |
|
|
|
o = msgp.AppendBool(o, z.RootDisk) |
|
|
|
// string "Healing"
|
|
|
|
|
|
|
|
o = append(o, 0xa7, 0x48, 0x65, 0x61, 0x6c, 0x69, 0x6e, 0x67) |
|
|
|
|
|
|
|
o = msgp.AppendBool(o, z.Healing) |
|
|
|
o = msgp.AppendBool(o, z.Healing) |
|
|
|
// string "Endpoint"
|
|
|
|
|
|
|
|
o = append(o, 0xa8, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74) |
|
|
|
|
|
|
|
o = msgp.AppendString(o, z.Endpoint) |
|
|
|
o = msgp.AppendString(o, z.Endpoint) |
|
|
|
// string "MountPath"
|
|
|
|
|
|
|
|
o = append(o, 0xa9, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x61, 0x74, 0x68) |
|
|
|
|
|
|
|
o = msgp.AppendString(o, z.MountPath) |
|
|
|
o = msgp.AppendString(o, z.MountPath) |
|
|
|
// string "ID"
|
|
|
|
|
|
|
|
o = append(o, 0xa2, 0x49, 0x44) |
|
|
|
|
|
|
|
o = msgp.AppendString(o, z.ID) |
|
|
|
o = msgp.AppendString(o, z.ID) |
|
|
|
// string "Error"
|
|
|
|
|
|
|
|
o = append(o, 0xa5, 0x45, 0x72, 0x72, 0x6f, 0x72) |
|
|
|
|
|
|
|
o = msgp.AppendString(o, z.Error) |
|
|
|
o = msgp.AppendString(o, z.Error) |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
|
|
|
func (z *DiskInfo) UnmarshalMsg(bts []byte) (o []byte, err error) { |
|
|
|
func (z *DiskInfo) UnmarshalMsg(bts []byte) (o []byte, err error) { |
|
|
|
var field []byte |
|
|
|
|
|
|
|
_ = field |
|
|
|
|
|
|
|
var zb0001 uint32 |
|
|
|
var zb0001 uint32 |
|
|
|
zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) |
|
|
|
zb0001, bts, err = msgp.ReadArrayHeaderBytes(bts) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
err = msgp.WrapError(err) |
|
|
|
err = msgp.WrapError(err) |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
for zb0001 > 0 { |
|
|
|
if zb0001 != 11 { |
|
|
|
zb0001-- |
|
|
|
err = msgp.ArrayError{Wanted: 11, Got: zb0001} |
|
|
|
field, bts, err = msgp.ReadMapKeyZC(bts) |
|
|
|
return |
|
|
|
if err != nil { |
|
|
|
} |
|
|
|
err = msgp.WrapError(err) |
|
|
|
z.Total, bts, err = msgp.ReadUint64Bytes(bts) |
|
|
|
return |
|
|
|
if err != nil { |
|
|
|
} |
|
|
|
err = msgp.WrapError(err, "Total") |
|
|
|
switch msgp.UnsafeString(field) { |
|
|
|
return |
|
|
|
case "Total": |
|
|
|
} |
|
|
|
z.Total, bts, err = msgp.ReadUint64Bytes(bts) |
|
|
|
z.Free, bts, err = msgp.ReadUint64Bytes(bts) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
err = msgp.WrapError(err, "Total") |
|
|
|
err = msgp.WrapError(err, "Free") |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
case "Free": |
|
|
|
z.Used, bts, err = msgp.ReadUint64Bytes(bts) |
|
|
|
z.Free, bts, err = msgp.ReadUint64Bytes(bts) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
err = msgp.WrapError(err, "Used") |
|
|
|
err = msgp.WrapError(err, "Free") |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
z.UsedInodes, bts, err = msgp.ReadUint64Bytes(bts) |
|
|
|
case "Used": |
|
|
|
if err != nil { |
|
|
|
z.Used, bts, err = msgp.ReadUint64Bytes(bts) |
|
|
|
err = msgp.WrapError(err, "UsedInodes") |
|
|
|
if err != nil { |
|
|
|
return |
|
|
|
err = msgp.WrapError(err, "Used") |
|
|
|
} |
|
|
|
return |
|
|
|
z.FSType, bts, err = msgp.ReadStringBytes(bts) |
|
|
|
} |
|
|
|
if err != nil { |
|
|
|
case "UsedInodes": |
|
|
|
err = msgp.WrapError(err, "FSType") |
|
|
|
z.UsedInodes, bts, err = msgp.ReadUint64Bytes(bts) |
|
|
|
return |
|
|
|
if err != nil { |
|
|
|
} |
|
|
|
err = msgp.WrapError(err, "UsedInodes") |
|
|
|
z.RootDisk, bts, err = msgp.ReadBoolBytes(bts) |
|
|
|
return |
|
|
|
if err != nil { |
|
|
|
} |
|
|
|
err = msgp.WrapError(err, "RootDisk") |
|
|
|
case "FSType": |
|
|
|
return |
|
|
|
z.FSType, bts, err = msgp.ReadStringBytes(bts) |
|
|
|
} |
|
|
|
if err != nil { |
|
|
|
z.Healing, bts, err = msgp.ReadBoolBytes(bts) |
|
|
|
err = msgp.WrapError(err, "FSType") |
|
|
|
if err != nil { |
|
|
|
return |
|
|
|
err = msgp.WrapError(err, "Healing") |
|
|
|
} |
|
|
|
return |
|
|
|
case "RootDisk": |
|
|
|
} |
|
|
|
z.RootDisk, bts, err = msgp.ReadBoolBytes(bts) |
|
|
|
z.Endpoint, bts, err = msgp.ReadStringBytes(bts) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
err = msgp.WrapError(err, "RootDisk") |
|
|
|
err = msgp.WrapError(err, "Endpoint") |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
case "Healing": |
|
|
|
z.MountPath, bts, err = msgp.ReadStringBytes(bts) |
|
|
|
z.Healing, bts, err = msgp.ReadBoolBytes(bts) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
err = msgp.WrapError(err, "MountPath") |
|
|
|
err = msgp.WrapError(err, "Healing") |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
z.ID, bts, err = msgp.ReadStringBytes(bts) |
|
|
|
case "Endpoint": |
|
|
|
if err != nil { |
|
|
|
z.Endpoint, bts, err = msgp.ReadStringBytes(bts) |
|
|
|
err = msgp.WrapError(err, "ID") |
|
|
|
if err != nil { |
|
|
|
return |
|
|
|
err = msgp.WrapError(err, "Endpoint") |
|
|
|
} |
|
|
|
return |
|
|
|
z.Error, bts, err = msgp.ReadStringBytes(bts) |
|
|
|
} |
|
|
|
if err != nil { |
|
|
|
case "MountPath": |
|
|
|
err = msgp.WrapError(err, "Error") |
|
|
|
z.MountPath, bts, err = msgp.ReadStringBytes(bts) |
|
|
|
return |
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err, "MountPath") |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
case "ID": |
|
|
|
|
|
|
|
z.ID, bts, err = msgp.ReadStringBytes(bts) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err, "ID") |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
case "Error": |
|
|
|
|
|
|
|
z.Error, bts, err = msgp.ReadStringBytes(bts) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err, "Error") |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
default: |
|
|
|
|
|
|
|
bts, err = msgp.Skip(bts) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err) |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
o = bts |
|
|
|
o = bts |
|
|
|
return |
|
|
|
return |
|
|
@ -355,7 +233,7 @@ func (z *DiskInfo) UnmarshalMsg(bts []byte) (o []byte, err error) { |
|
|
|
|
|
|
|
|
|
|
|
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
|
|
|
|
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
|
|
|
|
func (z *DiskInfo) Msgsize() (s int) { |
|
|
|
func (z *DiskInfo) Msgsize() (s int) { |
|
|
|
s = 1 + 6 + msgp.Uint64Size + 5 + msgp.Uint64Size + 5 + msgp.Uint64Size + 11 + msgp.Uint64Size + 7 + msgp.StringPrefixSize + len(z.FSType) + 9 + msgp.BoolSize + 8 + msgp.BoolSize + 9 + msgp.StringPrefixSize + len(z.Endpoint) + 10 + msgp.StringPrefixSize + len(z.MountPath) + 3 + msgp.StringPrefixSize + len(z.ID) + 6 + msgp.StringPrefixSize + len(z.Error) |
|
|
|
s = 1 + msgp.Uint64Size + msgp.Uint64Size + msgp.Uint64Size + msgp.Uint64Size + msgp.StringPrefixSize + len(z.FSType) + msgp.BoolSize + msgp.BoolSize + msgp.StringPrefixSize + len(z.Endpoint) + msgp.StringPrefixSize + len(z.MountPath) + msgp.StringPrefixSize + len(z.ID) + msgp.StringPrefixSize + len(z.Error) |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -367,8 +245,8 @@ func (z *FileInfo) DecodeMsg(dc *msgp.Reader) (err error) { |
|
|
|
err = msgp.WrapError(err) |
|
|
|
err = msgp.WrapError(err) |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
if zb0001 != 17 { |
|
|
|
if zb0001 != 18 { |
|
|
|
err = msgp.ArrayError{Wanted: 17, Got: zb0001} |
|
|
|
err = msgp.ArrayError{Wanted: 18, Got: zb0001} |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
z.Volume, err = dc.ReadString() |
|
|
|
z.Volume, err = dc.ReadString() |
|
|
@ -497,13 +375,18 @@ func (z *FileInfo) DecodeMsg(dc *msgp.Reader) (err error) { |
|
|
|
} |
|
|
|
} |
|
|
|
z.VersionPurgeStatus = VersionPurgeStatusType(zb0004) |
|
|
|
z.VersionPurgeStatus = VersionPurgeStatusType(zb0004) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
z.Data, err = dc.ReadBytes(z.Data) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err, "Data") |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// EncodeMsg implements msgp.Encodable
|
|
|
|
// EncodeMsg implements msgp.Encodable
|
|
|
|
func (z *FileInfo) EncodeMsg(en *msgp.Writer) (err error) { |
|
|
|
func (z *FileInfo) EncodeMsg(en *msgp.Writer) (err error) { |
|
|
|
// array header, size 17
|
|
|
|
// array header, size 18
|
|
|
|
err = en.Append(0xdc, 0x0, 0x11) |
|
|
|
err = en.Append(0xdc, 0x0, 0x12) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
@ -611,14 +494,19 @@ func (z *FileInfo) EncodeMsg(en *msgp.Writer) (err error) { |
|
|
|
err = msgp.WrapError(err, "VersionPurgeStatus") |
|
|
|
err = msgp.WrapError(err, "VersionPurgeStatus") |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
err = en.WriteBytes(z.Data) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err, "Data") |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// MarshalMsg implements msgp.Marshaler
|
|
|
|
// MarshalMsg implements msgp.Marshaler
|
|
|
|
func (z *FileInfo) MarshalMsg(b []byte) (o []byte, err error) { |
|
|
|
func (z *FileInfo) MarshalMsg(b []byte) (o []byte, err error) { |
|
|
|
o = msgp.Require(b, z.Msgsize()) |
|
|
|
o = msgp.Require(b, z.Msgsize()) |
|
|
|
// array header, size 17
|
|
|
|
// array header, size 18
|
|
|
|
o = append(o, 0xdc, 0x0, 0x11) |
|
|
|
o = append(o, 0xdc, 0x0, 0x12) |
|
|
|
o = msgp.AppendString(o, z.Volume) |
|
|
|
o = msgp.AppendString(o, z.Volume) |
|
|
|
o = msgp.AppendString(o, z.Name) |
|
|
|
o = msgp.AppendString(o, z.Name) |
|
|
|
o = msgp.AppendString(o, z.VersionID) |
|
|
|
o = msgp.AppendString(o, z.VersionID) |
|
|
@ -651,6 +539,7 @@ func (z *FileInfo) MarshalMsg(b []byte) (o []byte, err error) { |
|
|
|
o = msgp.AppendBool(o, z.MarkDeleted) |
|
|
|
o = msgp.AppendBool(o, z.MarkDeleted) |
|
|
|
o = msgp.AppendString(o, z.DeleteMarkerReplicationStatus) |
|
|
|
o = msgp.AppendString(o, z.DeleteMarkerReplicationStatus) |
|
|
|
o = msgp.AppendString(o, string(z.VersionPurgeStatus)) |
|
|
|
o = msgp.AppendString(o, string(z.VersionPurgeStatus)) |
|
|
|
|
|
|
|
o = msgp.AppendBytes(o, z.Data) |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -662,8 +551,8 @@ func (z *FileInfo) UnmarshalMsg(bts []byte) (o []byte, err error) { |
|
|
|
err = msgp.WrapError(err) |
|
|
|
err = msgp.WrapError(err) |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
if zb0001 != 17 { |
|
|
|
if zb0001 != 18 { |
|
|
|
err = msgp.ArrayError{Wanted: 17, Got: zb0001} |
|
|
|
err = msgp.ArrayError{Wanted: 18, Got: zb0001} |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
z.Volume, bts, err = msgp.ReadStringBytes(bts) |
|
|
|
z.Volume, bts, err = msgp.ReadStringBytes(bts) |
|
|
@ -792,6 +681,11 @@ func (z *FileInfo) UnmarshalMsg(bts []byte) (o []byte, err error) { |
|
|
|
} |
|
|
|
} |
|
|
|
z.VersionPurgeStatus = VersionPurgeStatusType(zb0004) |
|
|
|
z.VersionPurgeStatus = VersionPurgeStatusType(zb0004) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
z.Data, bts, err = msgp.ReadBytesBytes(bts, z.Data) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err, "Data") |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
o = bts |
|
|
|
o = bts |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
@ -809,7 +703,7 @@ func (z *FileInfo) Msgsize() (s int) { |
|
|
|
for za0003 := range z.Parts { |
|
|
|
for za0003 := range z.Parts { |
|
|
|
s += z.Parts[za0003].Msgsize() |
|
|
|
s += z.Parts[za0003].Msgsize() |
|
|
|
} |
|
|
|
} |
|
|
|
s += z.Erasure.Msgsize() + msgp.BoolSize + msgp.StringPrefixSize + len(z.DeleteMarkerReplicationStatus) + msgp.StringPrefixSize + len(string(z.VersionPurgeStatus)) |
|
|
|
s += z.Erasure.Msgsize() + msgp.BoolSize + msgp.StringPrefixSize + len(z.DeleteMarkerReplicationStatus) + msgp.StringPrefixSize + len(string(z.VersionPurgeStatus)) + msgp.BytesPrefixSize + len(z.Data) |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -1432,50 +1326,33 @@ func (z VersionPurgeStatusType) Msgsize() (s int) { |
|
|
|
|
|
|
|
|
|
|
|
// DecodeMsg implements msgp.Decodable
|
|
|
|
// DecodeMsg implements msgp.Decodable
|
|
|
|
func (z *VolInfo) DecodeMsg(dc *msgp.Reader) (err error) { |
|
|
|
func (z *VolInfo) DecodeMsg(dc *msgp.Reader) (err error) { |
|
|
|
var field []byte |
|
|
|
|
|
|
|
_ = field |
|
|
|
|
|
|
|
var zb0001 uint32 |
|
|
|
var zb0001 uint32 |
|
|
|
zb0001, err = dc.ReadMapHeader() |
|
|
|
zb0001, err = dc.ReadArrayHeader() |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
err = msgp.WrapError(err) |
|
|
|
err = msgp.WrapError(err) |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
for zb0001 > 0 { |
|
|
|
if zb0001 != 2 { |
|
|
|
zb0001-- |
|
|
|
err = msgp.ArrayError{Wanted: 2, Got: zb0001} |
|
|
|
field, err = dc.ReadMapKeyPtr() |
|
|
|
return |
|
|
|
if err != nil { |
|
|
|
} |
|
|
|
err = msgp.WrapError(err) |
|
|
|
z.Name, err = dc.ReadString() |
|
|
|
return |
|
|
|
if err != nil { |
|
|
|
} |
|
|
|
err = msgp.WrapError(err, "Name") |
|
|
|
switch msgp.UnsafeString(field) { |
|
|
|
return |
|
|
|
case "Name": |
|
|
|
} |
|
|
|
z.Name, err = dc.ReadString() |
|
|
|
z.Created, err = dc.ReadTime() |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
err = msgp.WrapError(err, "Name") |
|
|
|
err = msgp.WrapError(err, "Created") |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
case "Created": |
|
|
|
|
|
|
|
z.Created, err = dc.ReadTime() |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err, "Created") |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
default: |
|
|
|
|
|
|
|
err = dc.Skip() |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err) |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// EncodeMsg implements msgp.Encodable
|
|
|
|
// EncodeMsg implements msgp.Encodable
|
|
|
|
func (z VolInfo) EncodeMsg(en *msgp.Writer) (err error) { |
|
|
|
func (z VolInfo) EncodeMsg(en *msgp.Writer) (err error) { |
|
|
|
// map header, size 2
|
|
|
|
// array header, size 2
|
|
|
|
// write "Name"
|
|
|
|
err = en.Append(0x92) |
|
|
|
err = en.Append(0x82, 0xa4, 0x4e, 0x61, 0x6d, 0x65) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
@ -1484,11 +1361,6 @@ func (z VolInfo) EncodeMsg(en *msgp.Writer) (err error) { |
|
|
|
err = msgp.WrapError(err, "Name") |
|
|
|
err = msgp.WrapError(err, "Name") |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
// write "Created"
|
|
|
|
|
|
|
|
err = en.Append(0xa7, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
err = en.WriteTime(z.Created) |
|
|
|
err = en.WriteTime(z.Created) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
err = msgp.WrapError(err, "Created") |
|
|
|
err = msgp.WrapError(err, "Created") |
|
|
@ -1500,53 +1372,34 @@ func (z VolInfo) EncodeMsg(en *msgp.Writer) (err error) { |
|
|
|
// MarshalMsg implements msgp.Marshaler
|
|
|
|
// MarshalMsg implements msgp.Marshaler
|
|
|
|
func (z VolInfo) MarshalMsg(b []byte) (o []byte, err error) { |
|
|
|
func (z VolInfo) MarshalMsg(b []byte) (o []byte, err error) { |
|
|
|
o = msgp.Require(b, z.Msgsize()) |
|
|
|
o = msgp.Require(b, z.Msgsize()) |
|
|
|
// map header, size 2
|
|
|
|
// array header, size 2
|
|
|
|
// string "Name"
|
|
|
|
o = append(o, 0x92) |
|
|
|
o = append(o, 0x82, 0xa4, 0x4e, 0x61, 0x6d, 0x65) |
|
|
|
|
|
|
|
o = msgp.AppendString(o, z.Name) |
|
|
|
o = msgp.AppendString(o, z.Name) |
|
|
|
// string "Created"
|
|
|
|
|
|
|
|
o = append(o, 0xa7, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64) |
|
|
|
|
|
|
|
o = msgp.AppendTime(o, z.Created) |
|
|
|
o = msgp.AppendTime(o, z.Created) |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
|
|
|
func (z *VolInfo) UnmarshalMsg(bts []byte) (o []byte, err error) { |
|
|
|
func (z *VolInfo) UnmarshalMsg(bts []byte) (o []byte, err error) { |
|
|
|
var field []byte |
|
|
|
|
|
|
|
_ = field |
|
|
|
|
|
|
|
var zb0001 uint32 |
|
|
|
var zb0001 uint32 |
|
|
|
zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) |
|
|
|
zb0001, bts, err = msgp.ReadArrayHeaderBytes(bts) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
err = msgp.WrapError(err) |
|
|
|
err = msgp.WrapError(err) |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
for zb0001 > 0 { |
|
|
|
if zb0001 != 2 { |
|
|
|
zb0001-- |
|
|
|
err = msgp.ArrayError{Wanted: 2, Got: zb0001} |
|
|
|
field, bts, err = msgp.ReadMapKeyZC(bts) |
|
|
|
return |
|
|
|
if err != nil { |
|
|
|
} |
|
|
|
err = msgp.WrapError(err) |
|
|
|
z.Name, bts, err = msgp.ReadStringBytes(bts) |
|
|
|
return |
|
|
|
if err != nil { |
|
|
|
} |
|
|
|
err = msgp.WrapError(err, "Name") |
|
|
|
switch msgp.UnsafeString(field) { |
|
|
|
return |
|
|
|
case "Name": |
|
|
|
} |
|
|
|
z.Name, bts, err = msgp.ReadStringBytes(bts) |
|
|
|
z.Created, bts, err = msgp.ReadTimeBytes(bts) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
err = msgp.WrapError(err, "Name") |
|
|
|
err = msgp.WrapError(err, "Created") |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
case "Created": |
|
|
|
|
|
|
|
z.Created, bts, err = msgp.ReadTimeBytes(bts) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err, "Created") |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
default: |
|
|
|
|
|
|
|
bts, err = msgp.Skip(bts) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err) |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
o = bts |
|
|
|
o = bts |
|
|
|
return |
|
|
|
return |
|
|
@ -1554,7 +1407,7 @@ func (z *VolInfo) UnmarshalMsg(bts []byte) (o []byte, err error) { |
|
|
|
|
|
|
|
|
|
|
|
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
|
|
|
|
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
|
|
|
|
func (z VolInfo) Msgsize() (s int) { |
|
|
|
func (z VolInfo) Msgsize() (s int) { |
|
|
|
s = 1 + 5 + msgp.StringPrefixSize + len(z.Name) + 8 + msgp.TimeSize |
|
|
|
s = 1 + msgp.StringPrefixSize + len(z.Name) + msgp.TimeSize |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -1572,41 +1425,25 @@ func (z *VolsInfo) DecodeMsg(dc *msgp.Reader) (err error) { |
|
|
|
(*z) = make(VolsInfo, zb0002) |
|
|
|
(*z) = make(VolsInfo, zb0002) |
|
|
|
} |
|
|
|
} |
|
|
|
for zb0001 := range *z { |
|
|
|
for zb0001 := range *z { |
|
|
|
var field []byte |
|
|
|
|
|
|
|
_ = field |
|
|
|
|
|
|
|
var zb0003 uint32 |
|
|
|
var zb0003 uint32 |
|
|
|
zb0003, err = dc.ReadMapHeader() |
|
|
|
zb0003, err = dc.ReadArrayHeader() |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
err = msgp.WrapError(err, zb0001) |
|
|
|
err = msgp.WrapError(err, zb0001) |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
for zb0003 > 0 { |
|
|
|
if zb0003 != 2 { |
|
|
|
zb0003-- |
|
|
|
err = msgp.ArrayError{Wanted: 2, Got: zb0003} |
|
|
|
field, err = dc.ReadMapKeyPtr() |
|
|
|
return |
|
|
|
if err != nil { |
|
|
|
} |
|
|
|
err = msgp.WrapError(err, zb0001) |
|
|
|
(*z)[zb0001].Name, err = dc.ReadString() |
|
|
|
return |
|
|
|
if err != nil { |
|
|
|
} |
|
|
|
err = msgp.WrapError(err, zb0001, "Name") |
|
|
|
switch msgp.UnsafeString(field) { |
|
|
|
return |
|
|
|
case "Name": |
|
|
|
} |
|
|
|
(*z)[zb0001].Name, err = dc.ReadString() |
|
|
|
(*z)[zb0001].Created, err = dc.ReadTime() |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
err = msgp.WrapError(err, zb0001, "Name") |
|
|
|
err = msgp.WrapError(err, zb0001, "Created") |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
case "Created": |
|
|
|
|
|
|
|
(*z)[zb0001].Created, err = dc.ReadTime() |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err, zb0001, "Created") |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
default: |
|
|
|
|
|
|
|
err = dc.Skip() |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err, zb0001) |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return |
|
|
|
return |
|
|
@ -1620,9 +1457,8 @@ func (z VolsInfo) EncodeMsg(en *msgp.Writer) (err error) { |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
for zb0004 := range z { |
|
|
|
for zb0004 := range z { |
|
|
|
// map header, size 2
|
|
|
|
// array header, size 2
|
|
|
|
// write "Name"
|
|
|
|
err = en.Append(0x92) |
|
|
|
err = en.Append(0x82, 0xa4, 0x4e, 0x61, 0x6d, 0x65) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
@ -1631,11 +1467,6 @@ func (z VolsInfo) EncodeMsg(en *msgp.Writer) (err error) { |
|
|
|
err = msgp.WrapError(err, zb0004, "Name") |
|
|
|
err = msgp.WrapError(err, zb0004, "Name") |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
// write "Created"
|
|
|
|
|
|
|
|
err = en.Append(0xa7, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
err = en.WriteTime(z[zb0004].Created) |
|
|
|
err = en.WriteTime(z[zb0004].Created) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
err = msgp.WrapError(err, zb0004, "Created") |
|
|
|
err = msgp.WrapError(err, zb0004, "Created") |
|
|
@ -1650,12 +1481,9 @@ func (z VolsInfo) MarshalMsg(b []byte) (o []byte, err error) { |
|
|
|
o = msgp.Require(b, z.Msgsize()) |
|
|
|
o = msgp.Require(b, z.Msgsize()) |
|
|
|
o = msgp.AppendArrayHeader(o, uint32(len(z))) |
|
|
|
o = msgp.AppendArrayHeader(o, uint32(len(z))) |
|
|
|
for zb0004 := range z { |
|
|
|
for zb0004 := range z { |
|
|
|
// map header, size 2
|
|
|
|
// array header, size 2
|
|
|
|
// string "Name"
|
|
|
|
o = append(o, 0x92) |
|
|
|
o = append(o, 0x82, 0xa4, 0x4e, 0x61, 0x6d, 0x65) |
|
|
|
|
|
|
|
o = msgp.AppendString(o, z[zb0004].Name) |
|
|
|
o = msgp.AppendString(o, z[zb0004].Name) |
|
|
|
// string "Created"
|
|
|
|
|
|
|
|
o = append(o, 0xa7, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64) |
|
|
|
|
|
|
|
o = msgp.AppendTime(o, z[zb0004].Created) |
|
|
|
o = msgp.AppendTime(o, z[zb0004].Created) |
|
|
|
} |
|
|
|
} |
|
|
|
return |
|
|
|
return |
|
|
@ -1675,41 +1503,25 @@ func (z *VolsInfo) UnmarshalMsg(bts []byte) (o []byte, err error) { |
|
|
|
(*z) = make(VolsInfo, zb0002) |
|
|
|
(*z) = make(VolsInfo, zb0002) |
|
|
|
} |
|
|
|
} |
|
|
|
for zb0001 := range *z { |
|
|
|
for zb0001 := range *z { |
|
|
|
var field []byte |
|
|
|
|
|
|
|
_ = field |
|
|
|
|
|
|
|
var zb0003 uint32 |
|
|
|
var zb0003 uint32 |
|
|
|
zb0003, bts, err = msgp.ReadMapHeaderBytes(bts) |
|
|
|
zb0003, bts, err = msgp.ReadArrayHeaderBytes(bts) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
err = msgp.WrapError(err, zb0001) |
|
|
|
err = msgp.WrapError(err, zb0001) |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
for zb0003 > 0 { |
|
|
|
if zb0003 != 2 { |
|
|
|
zb0003-- |
|
|
|
err = msgp.ArrayError{Wanted: 2, Got: zb0003} |
|
|
|
field, bts, err = msgp.ReadMapKeyZC(bts) |
|
|
|
return |
|
|
|
if err != nil { |
|
|
|
} |
|
|
|
err = msgp.WrapError(err, zb0001) |
|
|
|
(*z)[zb0001].Name, bts, err = msgp.ReadStringBytes(bts) |
|
|
|
return |
|
|
|
if err != nil { |
|
|
|
} |
|
|
|
err = msgp.WrapError(err, zb0001, "Name") |
|
|
|
switch msgp.UnsafeString(field) { |
|
|
|
return |
|
|
|
case "Name": |
|
|
|
} |
|
|
|
(*z)[zb0001].Name, bts, err = msgp.ReadStringBytes(bts) |
|
|
|
(*z)[zb0001].Created, bts, err = msgp.ReadTimeBytes(bts) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
err = msgp.WrapError(err, zb0001, "Name") |
|
|
|
err = msgp.WrapError(err, zb0001, "Created") |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
case "Created": |
|
|
|
|
|
|
|
(*z)[zb0001].Created, bts, err = msgp.ReadTimeBytes(bts) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err, zb0001, "Created") |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
default: |
|
|
|
|
|
|
|
bts, err = msgp.Skip(bts) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err, zb0001) |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
o = bts |
|
|
|
o = bts |
|
|
@ -1720,7 +1532,7 @@ func (z *VolsInfo) UnmarshalMsg(bts []byte) (o []byte, err error) { |
|
|
|
func (z VolsInfo) Msgsize() (s int) { |
|
|
|
func (z VolsInfo) Msgsize() (s int) { |
|
|
|
s = msgp.ArrayHeaderSize |
|
|
|
s = msgp.ArrayHeaderSize |
|
|
|
for zb0004 := range z { |
|
|
|
for zb0004 := range z { |
|
|
|
s += 1 + 5 + msgp.StringPrefixSize + len(z[zb0004].Name) + 8 + msgp.TimeSize |
|
|
|
s += 1 + msgp.StringPrefixSize + len(z[zb0004].Name) + msgp.TimeSize |
|
|
|
} |
|
|
|
} |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|