2023-05-29 00:39:03 +00:00
|
|
|
package skylab
|
2023-05-20 19:53:49 +00:00
|
|
|
|
|
|
|
// Code generated by github.com/tinylib/msgp DO NOT EDIT.
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/tinylib/msgp/msgp"
|
|
|
|
)
|
|
|
|
|
|
|
|
// DecodeMsg implements msgp.Decodable
|
2023-05-29 00:39:03 +00:00
|
|
|
func (z *msgpRawEvent) DecodeMsg(dc *msgp.Reader) (err error) {
|
2023-05-20 19:53:49 +00:00
|
|
|
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) {
|
2023-05-29 00:39:03 +00:00
|
|
|
case "ts":
|
2023-06-30 01:57:09 +00:00
|
|
|
z.Timestamp, err = dc.ReadUint32()
|
2023-05-20 19:53:49 +00:00
|
|
|
if err != nil {
|
2023-05-29 00:39:03 +00:00
|
|
|
err = msgp.WrapError(err, "Timestamp")
|
2023-05-20 19:53:49 +00:00
|
|
|
return
|
|
|
|
}
|
2023-05-29 00:39:03 +00:00
|
|
|
case "id":
|
|
|
|
z.Id, err = dc.ReadUint32()
|
2023-05-20 19:53:49 +00:00
|
|
|
if err != nil {
|
2023-05-29 00:39:03 +00:00
|
|
|
err = msgp.WrapError(err, "Id")
|
2023-05-20 19:53:49 +00:00
|
|
|
return
|
|
|
|
}
|
2023-05-29 00:39:03 +00:00
|
|
|
case "data":
|
|
|
|
z.Data, err = dc.ReadBytes(z.Data)
|
2023-05-20 19:53:49 +00:00
|
|
|
if err != nil {
|
2023-05-29 00:39:03 +00:00
|
|
|
err = msgp.WrapError(err, "Data")
|
2023-05-20 19:53:49 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
err = dc.Skip()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// EncodeMsg implements msgp.Encodable
|
2023-05-29 00:39:03 +00:00
|
|
|
func (z *msgpRawEvent) EncodeMsg(en *msgp.Writer) (err error) {
|
2023-05-20 19:53:49 +00:00
|
|
|
// map header, size 3
|
2023-05-29 00:39:03 +00:00
|
|
|
// write "ts"
|
|
|
|
err = en.Append(0x83, 0xa2, 0x74, 0x73)
|
2023-05-20 19:53:49 +00:00
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2023-06-30 01:57:09 +00:00
|
|
|
err = en.WriteUint32(z.Timestamp)
|
2023-05-20 19:53:49 +00:00
|
|
|
if err != nil {
|
2023-05-29 00:39:03 +00:00
|
|
|
err = msgp.WrapError(err, "Timestamp")
|
2023-05-20 19:53:49 +00:00
|
|
|
return
|
|
|
|
}
|
2023-05-29 00:39:03 +00:00
|
|
|
// write "id"
|
|
|
|
err = en.Append(0xa2, 0x69, 0x64)
|
2023-05-20 19:53:49 +00:00
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2023-05-29 00:39:03 +00:00
|
|
|
err = en.WriteUint32(z.Id)
|
2023-05-20 19:53:49 +00:00
|
|
|
if err != nil {
|
2023-05-29 00:39:03 +00:00
|
|
|
err = msgp.WrapError(err, "Id")
|
2023-05-20 19:53:49 +00:00
|
|
|
return
|
|
|
|
}
|
2023-05-29 00:39:03 +00:00
|
|
|
// write "data"
|
|
|
|
err = en.Append(0xa4, 0x64, 0x61, 0x74, 0x61)
|
2023-05-20 19:53:49 +00:00
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2023-05-29 00:39:03 +00:00
|
|
|
err = en.WriteBytes(z.Data)
|
2023-05-20 19:53:49 +00:00
|
|
|
if err != nil {
|
2023-05-29 00:39:03 +00:00
|
|
|
err = msgp.WrapError(err, "Data")
|
2023-05-20 19:53:49 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// MarshalMsg implements msgp.Marshaler
|
2023-05-29 00:39:03 +00:00
|
|
|
func (z *msgpRawEvent) MarshalMsg(b []byte) (o []byte, err error) {
|
2023-05-20 19:53:49 +00:00
|
|
|
o = msgp.Require(b, z.Msgsize())
|
|
|
|
// map header, size 3
|
2023-05-29 00:39:03 +00:00
|
|
|
// string "ts"
|
|
|
|
o = append(o, 0x83, 0xa2, 0x74, 0x73)
|
2023-06-30 01:57:09 +00:00
|
|
|
o = msgp.AppendUint32(o, z.Timestamp)
|
2023-05-29 00:39:03 +00:00
|
|
|
// string "id"
|
|
|
|
o = append(o, 0xa2, 0x69, 0x64)
|
2023-05-20 19:53:49 +00:00
|
|
|
o = msgp.AppendUint32(o, z.Id)
|
2023-05-29 00:39:03 +00:00
|
|
|
// string "data"
|
|
|
|
o = append(o, 0xa4, 0x64, 0x61, 0x74, 0x61)
|
|
|
|
o = msgp.AppendBytes(o, z.Data)
|
2023-05-20 19:53:49 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
2023-05-29 00:39:03 +00:00
|
|
|
func (z *msgpRawEvent) UnmarshalMsg(bts []byte) (o []byte, err error) {
|
2023-05-20 19:53:49 +00:00
|
|
|
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) {
|
2023-05-29 00:39:03 +00:00
|
|
|
case "ts":
|
2023-06-30 01:57:09 +00:00
|
|
|
z.Timestamp, bts, err = msgp.ReadUint32Bytes(bts)
|
2023-05-20 19:53:49 +00:00
|
|
|
if err != nil {
|
2023-05-29 00:39:03 +00:00
|
|
|
err = msgp.WrapError(err, "Timestamp")
|
2023-05-20 19:53:49 +00:00
|
|
|
return
|
|
|
|
}
|
2023-05-29 00:39:03 +00:00
|
|
|
case "id":
|
|
|
|
z.Id, bts, err = msgp.ReadUint32Bytes(bts)
|
2023-05-20 19:53:49 +00:00
|
|
|
if err != nil {
|
2023-05-29 00:39:03 +00:00
|
|
|
err = msgp.WrapError(err, "Id")
|
2023-05-20 19:53:49 +00:00
|
|
|
return
|
|
|
|
}
|
2023-05-29 00:39:03 +00:00
|
|
|
case "data":
|
|
|
|
z.Data, bts, err = msgp.ReadBytesBytes(bts, z.Data)
|
2023-05-20 19:53:49 +00:00
|
|
|
if err != nil {
|
2023-05-29 00:39:03 +00:00
|
|
|
err = msgp.WrapError(err, "Data")
|
2023-05-20 19:53:49 +00:00
|
|
|
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
|
2023-05-29 00:39:03 +00:00
|
|
|
func (z *msgpRawEvent) Msgsize() (s int) {
|
2023-06-30 01:57:09 +00:00
|
|
|
s = 1 + 3 + msgp.Uint32Size + 3 + msgp.Uint32Size + 5 + msgp.BytesPrefixSize + len(z.Data)
|
2023-05-20 19:53:49 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// DecodeMsg implements msgp.Decodable
|
2023-05-29 00:39:03 +00:00
|
|
|
func (z *msgpRawPacket) DecodeMsg(dc *msgp.Reader) (err error) {
|
2023-05-20 19:53:49 +00:00
|
|
|
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) {
|
2023-05-29 00:39:03 +00:00
|
|
|
case "id":
|
2023-05-20 19:53:49 +00:00
|
|
|
z.Id, err = dc.ReadUint32()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Id")
|
|
|
|
return
|
|
|
|
}
|
2023-05-29 00:39:03 +00:00
|
|
|
case "data":
|
2023-05-20 19:53:49 +00:00
|
|
|
z.Data, err = dc.ReadBytes(z.Data)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Data")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
err = dc.Skip()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// EncodeMsg implements msgp.Encodable
|
2023-05-29 00:39:03 +00:00
|
|
|
func (z *msgpRawPacket) EncodeMsg(en *msgp.Writer) (err error) {
|
|
|
|
// map header, size 2
|
|
|
|
// write "id"
|
|
|
|
err = en.Append(0x82, 0xa2, 0x69, 0x64)
|
2023-05-20 19:53:49 +00:00
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteUint32(z.Id)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Id")
|
|
|
|
return
|
|
|
|
}
|
2023-05-29 00:39:03 +00:00
|
|
|
// write "data"
|
|
|
|
err = en.Append(0xa4, 0x64, 0x61, 0x74, 0x61)
|
2023-05-20 19:53:49 +00:00
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteBytes(z.Data)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Data")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// MarshalMsg implements msgp.Marshaler
|
2023-05-29 00:39:03 +00:00
|
|
|
func (z *msgpRawPacket) MarshalMsg(b []byte) (o []byte, err error) {
|
2023-05-20 19:53:49 +00:00
|
|
|
o = msgp.Require(b, z.Msgsize())
|
2023-05-29 00:39:03 +00:00
|
|
|
// map header, size 2
|
|
|
|
// string "id"
|
|
|
|
o = append(o, 0x82, 0xa2, 0x69, 0x64)
|
2023-05-20 19:53:49 +00:00
|
|
|
o = msgp.AppendUint32(o, z.Id)
|
2023-05-29 00:39:03 +00:00
|
|
|
// string "data"
|
|
|
|
o = append(o, 0xa4, 0x64, 0x61, 0x74, 0x61)
|
2023-05-20 19:53:49 +00:00
|
|
|
o = msgp.AppendBytes(o, z.Data)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
2023-05-29 00:39:03 +00:00
|
|
|
func (z *msgpRawPacket) UnmarshalMsg(bts []byte) (o []byte, err error) {
|
2023-05-20 19:53:49 +00:00
|
|
|
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) {
|
2023-05-29 00:39:03 +00:00
|
|
|
case "id":
|
2023-05-20 19:53:49 +00:00
|
|
|
z.Id, bts, err = msgp.ReadUint32Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Id")
|
|
|
|
return
|
|
|
|
}
|
2023-05-29 00:39:03 +00:00
|
|
|
case "data":
|
2023-05-20 19:53:49 +00:00
|
|
|
z.Data, bts, err = msgp.ReadBytesBytes(bts, z.Data)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Data")
|
|
|
|
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
|
2023-05-29 00:39:03 +00:00
|
|
|
func (z *msgpRawPacket) Msgsize() (s int) {
|
|
|
|
s = 1 + 3 + msgp.Uint32Size + 5 + msgp.BytesPrefixSize + len(z.Data)
|
2023-05-20 19:53:49 +00:00
|
|
|
return
|
|
|
|
}
|