2024-08-15 15:52:21 +00:00
|
|
|
package proto
|
|
|
|
|
|
|
|
// Code generated by github.com/tinylib/msgp DO NOT EDIT.
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/tinylib/msgp/msgp"
|
|
|
|
)
|
|
|
|
|
|
|
|
// DecodeMsg implements msgp.Decodable
|
|
|
|
func (z *Response) 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 "i":
|
|
|
|
z.Id, err = dc.ReadUint32()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Id")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "ra":
|
|
|
|
z.RowsAffected, err = dc.ReadInt64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "RowsAffected")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "li":
|
|
|
|
z.LastInsertId, err = dc.ReadInt64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "LastInsertId")
|
|
|
|
return
|
|
|
|
}
|
2024-08-20 23:03:28 +00:00
|
|
|
case "m":
|
|
|
|
z.Msg, err = dc.ReadString()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Msg")
|
|
|
|
return
|
|
|
|
}
|
2024-08-15 15:52:21 +00:00
|
|
|
default:
|
|
|
|
err = dc.Skip()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// EncodeMsg implements msgp.Encodable
|
2024-08-20 23:03:28 +00:00
|
|
|
func (z *Response) EncodeMsg(en *msgp.Writer) (err error) {
|
|
|
|
// map header, size 4
|
2024-08-15 15:52:21 +00:00
|
|
|
// write "i"
|
2024-08-20 23:03:28 +00:00
|
|
|
err = en.Append(0x84, 0xa1, 0x69)
|
2024-08-15 15:52:21 +00:00
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteUint32(z.Id)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Id")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// write "ra"
|
|
|
|
err = en.Append(0xa2, 0x72, 0x61)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteInt64(z.RowsAffected)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "RowsAffected")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// write "li"
|
|
|
|
err = en.Append(0xa2, 0x6c, 0x69)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteInt64(z.LastInsertId)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "LastInsertId")
|
|
|
|
return
|
|
|
|
}
|
2024-08-20 23:03:28 +00:00
|
|
|
// write "m"
|
|
|
|
err = en.Append(0xa1, 0x6d)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteString(z.Msg)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Msg")
|
|
|
|
return
|
|
|
|
}
|
2024-08-15 15:52:21 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// MarshalMsg implements msgp.Marshaler
|
2024-08-20 23:03:28 +00:00
|
|
|
func (z *Response) MarshalMsg(b []byte) (o []byte, err error) {
|
2024-08-15 15:52:21 +00:00
|
|
|
o = msgp.Require(b, z.Msgsize())
|
2024-08-20 23:03:28 +00:00
|
|
|
// map header, size 4
|
2024-08-15 15:52:21 +00:00
|
|
|
// string "i"
|
2024-08-20 23:03:28 +00:00
|
|
|
o = append(o, 0x84, 0xa1, 0x69)
|
2024-08-15 15:52:21 +00:00
|
|
|
o = msgp.AppendUint32(o, z.Id)
|
|
|
|
// string "ra"
|
|
|
|
o = append(o, 0xa2, 0x72, 0x61)
|
|
|
|
o = msgp.AppendInt64(o, z.RowsAffected)
|
|
|
|
// string "li"
|
|
|
|
o = append(o, 0xa2, 0x6c, 0x69)
|
|
|
|
o = msgp.AppendInt64(o, z.LastInsertId)
|
2024-08-20 23:03:28 +00:00
|
|
|
// string "m"
|
|
|
|
o = append(o, 0xa1, 0x6d)
|
|
|
|
o = msgp.AppendString(o, z.Msg)
|
2024-08-15 15:52:21 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
|
|
|
func (z *Response) 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 "i":
|
|
|
|
z.Id, bts, err = msgp.ReadUint32Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Id")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "ra":
|
|
|
|
z.RowsAffected, bts, err = msgp.ReadInt64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "RowsAffected")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "li":
|
|
|
|
z.LastInsertId, bts, err = msgp.ReadInt64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "LastInsertId")
|
|
|
|
return
|
|
|
|
}
|
2024-08-20 23:03:28 +00:00
|
|
|
case "m":
|
|
|
|
z.Msg, bts, err = msgp.ReadStringBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Msg")
|
|
|
|
return
|
|
|
|
}
|
2024-08-15 15:52:21 +00:00
|
|
|
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
|
2024-08-20 23:03:28 +00:00
|
|
|
func (z *Response) Msgsize() (s int) {
|
|
|
|
s = 1 + 2 + msgp.Uint32Size + 3 + msgp.Int64Size + 3 + msgp.Int64Size + 2 + msgp.StringPrefixSize + len(z.Msg)
|
2024-08-15 15:52:21 +00:00
|
|
|
return
|
|
|
|
}
|