beyond-fs/vfs/inode_gen.go

336 lines
7.4 KiB
Go

package vfs
// Code generated by github.com/tinylib/msgp DO NOT EDIT.
import (
"github.com/tinylib/msgp/msgp"
)
// DecodeMsg implements msgp.Decodable
func (z *Inode) 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.ReadUint64()
if err != nil {
err = msgp.WrapError(err, "ID")
return
}
case "ParentID":
z.ParentID, err = dc.ReadUint64()
if err != nil {
err = msgp.WrapError(err, "ParentID")
return
}
case "Path":
z.Path, err = dc.ReadString()
if err != nil {
err = msgp.WrapError(err, "Path")
return
}
case "Name":
z.Name, err = dc.ReadString()
if err != nil {
err = msgp.WrapError(err, "Name")
return
}
case "Generation":
z.Generation, err = dc.ReadUint64()
if err != nil {
err = msgp.WrapError(err, "Generation")
return
}
case "Size":
z.Size, err = dc.ReadUint64()
if err != nil {
err = msgp.WrapError(err, "Size")
return
}
case "Mode":
z.Mode, err = dc.ReadUint32()
if err != nil {
err = msgp.WrapError(err, "Mode")
return
}
case "Atime":
z.Atime, err = dc.ReadTime()
if err != nil {
err = msgp.WrapError(err, "Atime")
return
}
case "Mtime":
z.Mtime, err = dc.ReadTime()
if err != nil {
err = msgp.WrapError(err, "Mtime")
return
}
case "Ctime":
z.Ctime, err = dc.ReadTime()
if err != nil {
err = msgp.WrapError(err, "Ctime")
return
}
default:
err = dc.Skip()
if err != nil {
err = msgp.WrapError(err)
return
}
}
}
return
}
// EncodeMsg implements msgp.Encodable
func (z *Inode) EncodeMsg(en *msgp.Writer) (err error) {
// map header, size 10
// write "ID"
err = en.Append(0x8a, 0xa2, 0x49, 0x44)
if err != nil {
return
}
err = en.WriteUint64(z.ID)
if err != nil {
err = msgp.WrapError(err, "ID")
return
}
// write "ParentID"
err = en.Append(0xa8, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x44)
if err != nil {
return
}
err = en.WriteUint64(z.ParentID)
if err != nil {
err = msgp.WrapError(err, "ParentID")
return
}
// write "Path"
err = en.Append(0xa4, 0x50, 0x61, 0x74, 0x68)
if err != nil {
return
}
err = en.WriteString(z.Path)
if err != nil {
err = msgp.WrapError(err, "Path")
return
}
// write "Name"
err = en.Append(0xa4, 0x4e, 0x61, 0x6d, 0x65)
if err != nil {
return
}
err = en.WriteString(z.Name)
if err != nil {
err = msgp.WrapError(err, "Name")
return
}
// write "Generation"
err = en.Append(0xaa, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e)
if err != nil {
return
}
err = en.WriteUint64(z.Generation)
if err != nil {
err = msgp.WrapError(err, "Generation")
return
}
// write "Size"
err = en.Append(0xa4, 0x53, 0x69, 0x7a, 0x65)
if err != nil {
return
}
err = en.WriteUint64(z.Size)
if err != nil {
err = msgp.WrapError(err, "Size")
return
}
// write "Mode"
err = en.Append(0xa4, 0x4d, 0x6f, 0x64, 0x65)
if err != nil {
return
}
err = en.WriteUint32(z.Mode)
if err != nil {
err = msgp.WrapError(err, "Mode")
return
}
// write "Atime"
err = en.Append(0xa5, 0x41, 0x74, 0x69, 0x6d, 0x65)
if err != nil {
return
}
err = en.WriteTime(z.Atime)
if err != nil {
err = msgp.WrapError(err, "Atime")
return
}
// write "Mtime"
err = en.Append(0xa5, 0x4d, 0x74, 0x69, 0x6d, 0x65)
if err != nil {
return
}
err = en.WriteTime(z.Mtime)
if err != nil {
err = msgp.WrapError(err, "Mtime")
return
}
// write "Ctime"
err = en.Append(0xa5, 0x43, 0x74, 0x69, 0x6d, 0x65)
if err != nil {
return
}
err = en.WriteTime(z.Ctime)
if err != nil {
err = msgp.WrapError(err, "Ctime")
return
}
return
}
// MarshalMsg implements msgp.Marshaler
func (z *Inode) MarshalMsg(b []byte) (o []byte, err error) {
o = msgp.Require(b, z.Msgsize())
// map header, size 10
// string "ID"
o = append(o, 0x8a, 0xa2, 0x49, 0x44)
o = msgp.AppendUint64(o, z.ID)
// string "ParentID"
o = append(o, 0xa8, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x44)
o = msgp.AppendUint64(o, z.ParentID)
// string "Path"
o = append(o, 0xa4, 0x50, 0x61, 0x74, 0x68)
o = msgp.AppendString(o, z.Path)
// string "Name"
o = append(o, 0xa4, 0x4e, 0x61, 0x6d, 0x65)
o = msgp.AppendString(o, z.Name)
// string "Generation"
o = append(o, 0xaa, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e)
o = msgp.AppendUint64(o, z.Generation)
// string "Size"
o = append(o, 0xa4, 0x53, 0x69, 0x7a, 0x65)
o = msgp.AppendUint64(o, z.Size)
// string "Mode"
o = append(o, 0xa4, 0x4d, 0x6f, 0x64, 0x65)
o = msgp.AppendUint32(o, z.Mode)
// string "Atime"
o = append(o, 0xa5, 0x41, 0x74, 0x69, 0x6d, 0x65)
o = msgp.AppendTime(o, z.Atime)
// string "Mtime"
o = append(o, 0xa5, 0x4d, 0x74, 0x69, 0x6d, 0x65)
o = msgp.AppendTime(o, z.Mtime)
// string "Ctime"
o = append(o, 0xa5, 0x43, 0x74, 0x69, 0x6d, 0x65)
o = msgp.AppendTime(o, z.Ctime)
return
}
// UnmarshalMsg implements msgp.Unmarshaler
func (z *Inode) 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.ReadUint64Bytes(bts)
if err != nil {
err = msgp.WrapError(err, "ID")
return
}
case "ParentID":
z.ParentID, bts, err = msgp.ReadUint64Bytes(bts)
if err != nil {
err = msgp.WrapError(err, "ParentID")
return
}
case "Path":
z.Path, bts, err = msgp.ReadStringBytes(bts)
if err != nil {
err = msgp.WrapError(err, "Path")
return
}
case "Name":
z.Name, bts, err = msgp.ReadStringBytes(bts)
if err != nil {
err = msgp.WrapError(err, "Name")
return
}
case "Generation":
z.Generation, bts, err = msgp.ReadUint64Bytes(bts)
if err != nil {
err = msgp.WrapError(err, "Generation")
return
}
case "Size":
z.Size, bts, err = msgp.ReadUint64Bytes(bts)
if err != nil {
err = msgp.WrapError(err, "Size")
return
}
case "Mode":
z.Mode, bts, err = msgp.ReadUint32Bytes(bts)
if err != nil {
err = msgp.WrapError(err, "Mode")
return
}
case "Atime":
z.Atime, bts, err = msgp.ReadTimeBytes(bts)
if err != nil {
err = msgp.WrapError(err, "Atime")
return
}
case "Mtime":
z.Mtime, bts, err = msgp.ReadTimeBytes(bts)
if err != nil {
err = msgp.WrapError(err, "Mtime")
return
}
case "Ctime":
z.Ctime, bts, err = msgp.ReadTimeBytes(bts)
if err != nil {
err = msgp.WrapError(err, "Ctime")
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 *Inode) Msgsize() (s int) {
s = 1 + 3 + msgp.Uint64Size + 9 + msgp.Uint64Size + 5 + msgp.StringPrefixSize + len(z.Path) + 5 + msgp.StringPrefixSize + len(z.Name) + 11 + msgp.Uint64Size + 5 + msgp.Uint64Size + 5 + msgp.Uint32Size + 6 + msgp.TimeSize + 6 + msgp.TimeSize + 6 + msgp.TimeSize
return
}