Beispiel #1
0
// MarshalMsg implements msgp.Marshaler
func (z *Node) MarshalMsg(b []byte) (o []byte, err error) {
	o = msgp.Require(b, z.Msgsize())
	// map header, size 4
	// string "id"
	o = append(o, 0x84, 0xa2, 0x69, 0x64)
	o = msgp.AppendBytes(o, []byte(z.ID))
	// string "il"
	o = append(o, 0xa2, 0x69, 0x6c)
	o = msgp.AppendBool(o, z.IsLeaf)
	// string "cv"
	o = append(o, 0xa2, 0x63, 0x76)
	o = msgp.AppendArrayHeader(o, uint32(len(z.ChildValues)))
	for cmr := range z.ChildValues {
		o, err = msgp.AppendIntf(o, z.ChildValues[cmr])
		if err != nil {
			return
		}
	}
	// string "ck"
	o = append(o, 0xa2, 0x63, 0x6b)
	o = msgp.AppendArrayHeader(o, uint32(len(z.ChildKeys)))
	for ajw := range z.ChildKeys {
		if z.ChildKeys[ajw] == nil {
			o = msgp.AppendNil(o)
		} else {
			o, err = z.ChildKeys[ajw].MarshalMsg(o)
			if err != nil {
				return
			}
		}
	}
	return
}
Beispiel #2
0
// MarshalMsg implements msgp.Marshaler
func (z *Incident) MarshalMsg(b []byte) (o []byte, err error) {
	o = msgp.Require(b, z.Msgsize())
	o = msgp.AppendMapHeader(o, 9)
	o = msgp.AppendString(o, "event_name")
	o = msgp.AppendBytes(o, z.EventName)
	o = msgp.AppendString(o, "time")
	o = msgp.AppendInt64(o, z.Time)
	o = msgp.AppendString(o, "id")
	o = msgp.AppendInt64(o, z.Id)
	o = msgp.AppendString(o, "active")
	o = msgp.AppendBool(o, z.Active)
	o = msgp.AppendString(o, "escalation")
	o = msgp.AppendString(o, z.Escalation)
	o = msgp.AppendString(o, "description")
	o = msgp.AppendString(o, z.Description)
	o = msgp.AppendString(o, "policy")
	o = msgp.AppendString(o, z.Policy)
	o = msgp.AppendString(o, "Status")
	o = msgp.AppendInt(o, z.Status)
	o = msgp.AppendString(o, "Event")
	o, err = z.Event.MarshalMsg(o)
	if err != nil {
		return
	}
	return
}
Beispiel #3
0
// MarshalMsg implements msgp.Marshaler
func (z Ks) MarshalMsg(b []byte) (o []byte, err error) {
	o = msgp.Require(b, z.Msgsize())
	o = msgp.AppendArrayHeader(o, uint32(len(z)))
	for cxo := range z {
		o = msgp.AppendBytes(o, []byte(z[cxo]))
	}
	return
}
Beispiel #4
0
// MarshalMsg implements msgp.Marshaler
func (z *KV) MarshalMsg(b []byte) (o []byte, err error) {
	o = msgp.Require(b, z.Msgsize())
	o = msgp.AppendArrayHeader(o, 2)
	for xvk := range z {
		o = msgp.AppendBytes(o, []byte(z[xvk]))
	}
	return
}
Beispiel #5
0
// MarshalMsg implements msgp.Marshaler
func (z *Key) MarshalMsg(b []byte) (o []byte, err error) {
	o = msgp.Require(b, z.Msgsize())
	// map header, size 3
	// string "u"
	o = append(o, 0x83, 0xa1, 0x75)
	o = msgp.AppendBytes(o, []byte(z.UUID))
	// string "v"
	o = append(o, 0xa1, 0x76)
	o, err = msgp.AppendIntf(o, z.Value)
	if err != nil {
		return
	}
	// string "p"
	o = append(o, 0xa1, 0x70)
	o = msgp.AppendBytes(o, z.Payload)
	return
}
Beispiel #6
0
// MarshalMsg implements msgp.Marshaler
func (z KVs) MarshalMsg(b []byte) (o []byte, err error) {
	o = msgp.Require(b, z.Msgsize())
	o = msgp.AppendArrayHeader(o, uint32(len(z)))
	for wht := range z {
		o = msgp.AppendArrayHeader(o, 2)
		for hct := range z[wht] {
			o = msgp.AppendBytes(o, []byte(z[wht][hct]))
		}
	}
	return
}
Beispiel #7
0
// MarshalMsg implements msgp.Marshaler
func (z *Packet) MarshalMsg(b []byte) (o []byte, err error) {
	o = msgp.Require(b, z.Msgsize())
	// map header, size 4
	// string "type"
	o = append(o, 0x84, 0xa4, 0x74, 0x79, 0x70, 0x65)
	o = msgp.AppendByte(o, z.pType)
	// string "id"
	o = append(o, 0xa2, 0x69, 0x64)
	o = msgp.AppendInt(o, z.id)
	// string "event"
	o = append(o, 0xa5, 0x65, 0x76, 0x65, 0x6e, 0x74)
	o = msgp.AppendString(o, z.eventName)
	// string "payload"
	o = append(o, 0xa7, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64)
	o = msgp.AppendBytes(o, z.payload)
	return
}
// MarshalMsg implements msgp.Marshaler
func (z *Weather) MarshalMsg(b []byte) (o []byte, err error) {
	o = msgp.Require(b, z.Msgsize())
	// map header, size 4
	// string "time"
	o = append(o, 0x84, 0xa4, 0x74, 0x69, 0x6d, 0x65)
	o = msgp.AppendTime(o, z.Time)
	// string "size"
	o = append(o, 0xa4, 0x73, 0x69, 0x7a, 0x65)
	o = msgp.AppendInt64(o, z.Size)
	// string "type"
	o = append(o, 0xa4, 0x74, 0x79, 0x70, 0x65)
	o = msgp.AppendString(o, z.Type)
	// string "details"
	o = append(o, 0xa7, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73)
	o = msgp.AppendBytes(o, z.Details)
	return
}
Beispiel #9
0
// MarshalMsg implements msgp.Marshaler
func (z *Message) MarshalMsg(b []byte) (o []byte, err error) {
	o = msgp.Require(b, z.Msgsize())
	// map header, size 3
	// string "body"
	o = append(o, 0x83, 0xa4, 0x62, 0x6f, 0x64, 0x79)
	o = msgp.AppendBytes(o, z.Body)
	// string "meta"
	o = append(o, 0xa4, 0x6d, 0x65, 0x74, 0x61)
	o = msgp.AppendMapHeader(o, uint32(len(z.Meta)))
	for xvk, bzg := range z.Meta {
		o = msgp.AppendString(o, xvk)
		o, err = msgp.AppendIntf(o, bzg)
		if err != nil {
			return
		}
	}
	// string "ct"
	o = append(o, 0xa2, 0x63, 0x74)
	o = msgp.AppendString(o, z.ContentType)
	return
}
Beispiel #10
0
// MarshalMsg implements msgp.Marshaler
func (z Binary) MarshalMsg(b []byte) (o []byte, err error) {
	o = msgp.Require(b, z.Msgsize())
	o = msgp.AppendBytes(o, []byte(z))
	return
}
Beispiel #11
0
func (r rawBytes) MarshalMsg(b []byte) ([]byte, error) {
	return msgp.AppendBytes(b, []byte(r)), nil
}