Esempio n. 1
0
func (r *responseStream) Error(ctx context.Context, num uint64, code [2]int, msg string) error {
	r.Lock()
	defer r.Unlock()
	if r.closed {
		apexctx.GetLogger(r.ctx).WithError(errStreamIsClosed).Error("responseStream.Error")
		return errStreamIsClosed
	}
	defer r.close(ctx)

	p := msgpackBytePool.Get().([]byte)[:0]
	defer msgpackBytePool.Put(p)

	// NOTE: `3` without headers!
	p = msgp.AppendArrayHeader(p, 3)
	p = msgp.AppendUint64(p, r.channel)
	p = msgp.AppendUint64(p, num)

	// code_category + error message
	p = msgp.AppendArrayHeader(p, 2)

	// code & category
	p = msgp.AppendArrayHeader(p, 2)
	p = msgp.AppendInt(p, code[0])
	p = msgp.AppendInt(p, code[1])

	// error message
	p = msgp.AppendString(p, msg)

	if _, err := r.wr.Write(p); err != nil {
		apexctx.GetLogger(r.ctx).WithError(err).Errorf("responseStream.Error")
		return err
	}
	return nil
}
Esempio n. 2
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
}
Esempio n. 3
0
// MarshalMsg implements msgp.Marshaler
func (z *roaringArray) MarshalMsg(b []byte) (o []byte, err error) {
	o = msgp.Require(b, z.Msgsize())
	// map header, size 4
	// string "keys"
	o = append(o, 0x84, 0xa4, 0x6b, 0x65, 0x79, 0x73)
	o = msgp.AppendArrayHeader(o, uint32(len(z.keys)))
	for zhct := range z.keys {
		o = msgp.AppendUint16(o, z.keys[zhct])
	}
	// string "needCopyOnWrite"
	o = append(o, 0xaf, 0x6e, 0x65, 0x65, 0x64, 0x43, 0x6f, 0x70, 0x79, 0x4f, 0x6e, 0x57, 0x72, 0x69, 0x74, 0x65)
	o = msgp.AppendArrayHeader(o, uint32(len(z.needCopyOnWrite)))
	for zcua := range z.needCopyOnWrite {
		o = msgp.AppendBool(o, z.needCopyOnWrite[zcua])
	}
	// string "copyOnWrite"
	o = append(o, 0xab, 0x63, 0x6f, 0x70, 0x79, 0x4f, 0x6e, 0x57, 0x72, 0x69, 0x74, 0x65)
	o = msgp.AppendBool(o, z.copyOnWrite)
	// string "conserz"
	o = append(o, 0xa7, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x72, 0x7a)
	o = msgp.AppendArrayHeader(o, uint32(len(z.conserz)))
	for zxhx := range z.conserz {
		// map header, size 2
		// string "t"
		o = append(o, 0x82, 0xa1, 0x74)
		o = msgp.AppendUint8(o, uint8(z.conserz[zxhx].t))
		// string "r"
		o = append(o, 0xa1, 0x72)
		o, err = z.conserz[zxhx].r.MarshalMsg(o)
		if err != nil {
			return
		}
	}
	return
}
Esempio n. 4
0
func (r *responseStream) Write(ctx context.Context, num uint64, data []byte) error {
	r.Lock()
	defer r.Unlock()

	if r.closed {
		apexctx.GetLogger(r.ctx).WithError(errStreamIsClosed).Error("responseStream.Write")
		return errStreamIsClosed
	}

	p := msgpackBytePool.Get().([]byte)[:0]
	defer msgpackBytePool.Put(p)

	// NOTE: `3` without headers!
	p = msgp.AppendArrayHeader(p, 3)
	p = msgp.AppendUint64(p, r.channel)
	p = msgp.AppendUint64(p, num)

	p = msgp.AppendArrayHeader(p, 1)
	p = msgp.AppendStringFromBytes(p, data)

	if _, err := r.wr.Write(p); err != nil {
		apexctx.GetLogger(r.ctx).WithError(err).Error("responseStream.Write")
		return err
	}
	return nil
}
Esempio n. 5
0
// MarshalMsg implements msgp.Marshaler
func (z *SchemaT) MarshalMsg(b []byte) (o []byte, err error) {
	o = msgp.Require(b, z.Msgsize())
	// map header, size 5
	// string "PkgPath"
	o = append(o, 0x85, 0xa7, 0x50, 0x6b, 0x67, 0x50, 0x61, 0x74, 0x68)
	o = msgp.AppendString(o, z.PkgPath)
	// string "Structs"
	o = append(o, 0xa7, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x73)
	o = msgp.AppendArrayHeader(o, uint32(len(z.Structs)))
	for zrsw := range z.Structs {
		o, err = z.Structs[zrsw].MarshalMsg(o)
		if err != nil {
			return
		}
	}
	// string "Interfaces"
	o = append(o, 0xaa, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73)
	o = msgp.AppendArrayHeader(o, uint32(len(z.Interfaces)))
	for zxpk := range z.Interfaces {
		o, err = z.Interfaces[zxpk].MarshalMsg(o)
		if err != nil {
			return
		}
	}
	// string "Deprecated"
	o = append(o, 0xaa, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64)
	o = msgp.AppendBool(o, z.Deprecated)
	// string "Comment"
	o = append(o, 0xa7, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74)
	o = msgp.AppendString(o, z.Comment)
	return
}
Esempio n. 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
}
Esempio n. 7
0
func (ps __red__pairs) pack() []byte {
	sort.Sort(ps)
	data := msgp.AppendArrayHeader([]byte{}, uint32(len(ps)))
	for _, p := range ps {
		data = msgp.AppendArrayHeader(data, 2)
		data = msgp.AppendString(data, p[0])
		data = msgp.AppendString(data, p[1])
	}

	return data
}
Esempio n. 8
0
// MarshalMsg implements msgp.Marshaler
func (z *addHelper32) MarshalMsg(b []byte) (o []byte, err error) {
	o = msgp.Require(b, z.Msgsize())
	// map header, size 5
	// string "runstart"
	o = append(o, 0x85, 0xa8, 0x72, 0x75, 0x6e, 0x73, 0x74, 0x61, 0x72, 0x74)
	o = msgp.AppendUint32(o, z.runstart)
	// string "runlen"
	o = append(o, 0xa6, 0x72, 0x75, 0x6e, 0x6c, 0x65, 0x6e)
	o = msgp.AppendUint32(o, z.runlen)
	// string "actuallyAdded"
	o = append(o, 0xad, 0x61, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x6c, 0x79, 0x41, 0x64, 0x64, 0x65, 0x64)
	o = msgp.AppendUint32(o, z.actuallyAdded)
	// string "m"
	o = append(o, 0xa1, 0x6d)
	o = msgp.AppendArrayHeader(o, uint32(len(z.m)))
	for zxvk := range z.m {
		// map header, size 2
		// string "start"
		o = append(o, 0x82, 0xa5, 0x73, 0x74, 0x61, 0x72, 0x74)
		o = msgp.AppendUint32(o, z.m[zxvk].start)
		// string "last"
		o = append(o, 0xa4, 0x6c, 0x61, 0x73, 0x74)
		o = msgp.AppendUint32(o, z.m[zxvk].last)
	}
	// string "rc"
	o = append(o, 0xa2, 0x72, 0x63)
	if z.rc == nil {
		o = msgp.AppendNil(o)
	} else {
		// map header, size 2
		// string "iv"
		o = append(o, 0x82, 0xa2, 0x69, 0x76)
		o = msgp.AppendArrayHeader(o, uint32(len(z.rc.iv)))
		for zbzg := range z.rc.iv {
			// map header, size 2
			// string "start"
			o = append(o, 0x82, 0xa5, 0x73, 0x74, 0x61, 0x72, 0x74)
			o = msgp.AppendUint32(o, z.rc.iv[zbzg].start)
			// string "last"
			o = append(o, 0xa4, 0x6c, 0x61, 0x73, 0x74)
			o = msgp.AppendUint32(o, z.rc.iv[zbzg].last)
		}
		// string "card"
		o = append(o, 0xa4, 0x63, 0x61, 0x72, 0x64)
		o = msgp.AppendInt64(o, z.rc.card)
	}
	return
}
Esempio n. 9
0
// MarshalMsg implements msgp.Marshaler
func (z *MetricDefinition) MarshalMsg(b []byte) (o []byte, err error) {
	o = msgp.Require(b, z.Msgsize())
	// map header, size 9
	// string "Id"
	o = append(o, 0x89, 0xa2, 0x49, 0x64)
	o = msgp.AppendString(o, z.Id)
	// string "OrgId"
	o = append(o, 0xa5, 0x4f, 0x72, 0x67, 0x49, 0x64)
	o = msgp.AppendInt(o, z.OrgId)
	// string "Name"
	o = append(o, 0xa4, 0x4e, 0x61, 0x6d, 0x65)
	o = msgp.AppendString(o, z.Name)
	// string "Metric"
	o = append(o, 0xa6, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63)
	o = msgp.AppendString(o, z.Metric)
	// string "Interval"
	o = append(o, 0xa8, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c)
	o = msgp.AppendInt(o, z.Interval)
	// string "Unit"
	o = append(o, 0xa4, 0x55, 0x6e, 0x69, 0x74)
	o = msgp.AppendString(o, z.Unit)
	// string "TargetType"
	o = append(o, 0xaa, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65)
	o = msgp.AppendString(o, z.TargetType)
	// string "Tags"
	o = append(o, 0xa4, 0x54, 0x61, 0x67, 0x73)
	o = msgp.AppendArrayHeader(o, uint32(len(z.Tags)))
	for hct := range z.Tags {
		o = msgp.AppendString(o, z.Tags[hct])
	}
	// string "LastUpdate"
	o = append(o, 0xaa, 0x4c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65)
	o = msgp.AppendInt64(o, z.LastUpdate)
	return
}
Esempio n. 10
0
// MarshalMsg implements msgp.Marshaler
func (z *ServerResponse) MarshalMsg(b []byte) (o []byte, err error) {
	o = msgp.Require(b, z.Msgsize())
	// array header, size 3
	o = append(o, 0x93)
	if z.Header == nil {
		o = msgp.AppendNil(o)
	} else {
		// map header, size 3
		// string "message_id"
		o = append(o, 0x83, 0xaa, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64)
		o = msgp.AppendString(o, z.Header.Id)
		// string "v"
		o = append(o, 0xa1, 0x76)
		o = msgp.AppendInt(o, z.Header.Version)
		// string "response_to"
		o = append(o, 0xab, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x74, 0x6f)
		o = msgp.AppendString(o, z.Header.ResponseTo)
	}
	o = msgp.AppendString(o, z.Name)
	o = msgp.AppendArrayHeader(o, uint32(len(z.Params)))
	for bzg := range z.Params {
		o, err = msgp.AppendIntf(o, z.Params[bzg])
		if err != nil {
			return
		}
	}
	return
}
Esempio n. 11
0
// MarshalMsg implements msgp.Marshaler
func (z *StructT) MarshalMsg(b []byte) (o []byte, err error) {
	o = msgp.Require(b, z.Msgsize())
	// map header, size 5
	// string "StructId"
	o = append(o, 0x85, 0xa8, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x49, 0x64)
	o = msgp.AppendInt64(o, z.StructId)
	// string "StructName"
	o = append(o, 0xaa, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65)
	o = msgp.AppendString(o, z.StructName)
	// string "Fields"
	o = append(o, 0xa6, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73)
	o = msgp.AppendArrayHeader(o, uint32(len(z.Fields)))
	for zyzr := range z.Fields {
		o, err = z.Fields[zyzr].MarshalMsg(o)
		if err != nil {
			return
		}
	}
	// string "Deprecated"
	o = append(o, 0xaa, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64)
	o = msgp.AppendBool(o, z.Deprecated)
	// string "Comment"
	o = append(o, 0xa7, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74)
	o = msgp.AppendString(o, z.Comment)
	return
}
Esempio n. 12
0
func (s *sizeGen) gStruct(st *Struct) {
	if !s.p.ok() {
		return
	}

	nfields := uint32(len(st.Fields))

	if st.AsTuple {
		data := msgp.AppendArrayHeader(nil, nfields)
		s.addConstant(strconv.Itoa(len(data)))
		for i := range st.Fields {
			if !s.p.ok() {
				return
			}
			next(s, st.Fields[i].FieldElem)
		}
	} else {
		data := msgp.AppendMapHeader(nil, nfields)
		s.addConstant(strconv.Itoa(len(data)))
		for i := range st.Fields {
			data = data[:0]
			data = msgp.AppendString(data, st.Fields[i].FieldTag)
			s.addConstant(strconv.Itoa(len(data)))
			next(s, st.Fields[i].FieldElem)
		}
	}
}
Esempio n. 13
0
// MarshalMsg implements msgp.Marshaler
func (z *Event) 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.AppendInt(o, z.Id)
	// string "user"
	// map header, size 2
	// string "first"
	o = append(o, 0xa4, 0x75, 0x73, 0x65, 0x72, 0x82, 0xa5, 0x66, 0x69, 0x72, 0x73, 0x74)
	o = msgp.AppendString(o, z.User.First)
	// string "last"
	o = append(o, 0xa4, 0x6c, 0x61, 0x73, 0x74)
	o = msgp.AppendString(o, z.User.Last)
	// string "flight"
	o = append(o, 0xa6, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74)
	o = msgp.AppendString(o, z.Flight)
	// string "pilot"
	o = append(o, 0xa5, 0x70, 0x69, 0x6c, 0x6f, 0x74)
	o = msgp.AppendArrayHeader(o, uint32(len(z.Pilot)))
	for xvk := range z.Pilot {
		o = msgp.AppendString(o, z.Pilot[xvk])
	}
	return
}
Esempio n. 14
0
// MarshalMsg implements msgp.Marshaler
func (z *MetricData) MarshalMsg(b []byte) (o []byte, err error) {
	o = msgp.Require(b, z.Msgsize())
	// map header, size 9
	// string "OrgId"
	o = append(o, 0x89, 0xa5, 0x4f, 0x72, 0x67, 0x49, 0x64)
	o = msgp.AppendInt(o, z.OrgId)
	// string "Name"
	o = append(o, 0xa4, 0x4e, 0x61, 0x6d, 0x65)
	o = msgp.AppendString(o, z.Name)
	// string "Metric"
	o = append(o, 0xa6, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63)
	o = msgp.AppendString(o, z.Metric)
	// string "Interval"
	o = append(o, 0xa8, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c)
	o = msgp.AppendInt(o, z.Interval)
	// string "Value"
	o = append(o, 0xa5, 0x56, 0x61, 0x6c, 0x75, 0x65)
	o = msgp.AppendFloat64(o, z.Value)
	// string "Unit"
	o = append(o, 0xa4, 0x55, 0x6e, 0x69, 0x74)
	o = msgp.AppendString(o, z.Unit)
	// string "Time"
	o = append(o, 0xa4, 0x54, 0x69, 0x6d, 0x65)
	o = msgp.AppendInt64(o, z.Time)
	// string "TargetType"
	o = append(o, 0xaa, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65)
	o = msgp.AppendString(o, z.TargetType)
	// string "Tags"
	o = append(o, 0xa4, 0x54, 0x61, 0x67, 0x73)
	o = msgp.AppendArrayHeader(o, uint32(len(z.Tags)))
	for xvk := range z.Tags {
		o = msgp.AppendString(o, z.Tags[xvk])
	}
	return
}
Esempio n. 15
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
}
// MarshalMsg implements msgp.Marshaler
func (z DocumentList) MarshalMsg(b []byte) (o []byte, err error) {
	o = msgp.Require(b, z.Msgsize())
	o = msgp.AppendArrayHeader(o, uint32(len(z)))
	for bai := range z {
		o = msgp.AppendUint(o, uint(z[bai]))
	}
	return
}
Esempio n. 17
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
}
Esempio n. 18
0
// MarshalMsg implements msgp.Marshaler
func (z uint32Slice) MarshalMsg(b []byte) (o []byte, err error) {
	o = msgp.Require(b, z.Msgsize())
	o = msgp.AppendArrayHeader(o, uint32(len(z)))
	for zzpf := range z {
		o = msgp.AppendUint32(o, z[zzpf])
	}
	return
}
Esempio n. 19
0
// MarshalMsg implements msgp.Marshaler
func (z *Forward) MarshalMsg(b []byte) (o []byte, err error) {
	o = msgp.Require(b, z.Msgsize())
	o = msgp.AppendArrayHeader(o, 3)
	o = msgp.AppendString(o, z.Tag)
	o = msgp.AppendArrayHeader(o, uint32(len(z.Entries)))
	for xvk := range z.Entries {
		o = msgp.AppendArrayHeader(o, 2)
		o = msgp.AppendInt64(o, z.Entries[xvk].Time)
		o, err = msgp.AppendIntf(o, z.Entries[xvk].Record)
		if err != nil {
			return
		}
	}
	o, err = msgp.AppendIntf(o, z.Option)
	if err != nil {
		return
	}
	return
}
Esempio n. 20
0
// MarshalMsg implements msgp.Marshaler
func (z Entry) MarshalMsg(b []byte) (o []byte, err error) {
	o = msgp.Require(b, z.Msgsize())
	o = msgp.AppendArrayHeader(o, 2)
	o = msgp.AppendInt64(o, z.Time)
	o, err = msgp.AppendIntf(o, z.Record)
	if err != nil {
		return
	}
	return
}
Esempio n. 21
0
// MarshalMsg implements msgp.Marshaler
func (z *arrayContainer) MarshalMsg(b []byte) (o []byte, err error) {
	o = msgp.Require(b, z.Msgsize())
	// map header, size 1
	// string "content"
	o = append(o, 0x81, 0xa7, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74)
	o = msgp.AppendArrayHeader(o, uint32(len(z.content)))
	for zxvk := range z.content {
		o = msgp.AppendUint16(o, z.content[zxvk])
	}
	return
}
Esempio n. 22
0
func (e *encodeGen) tuple(s *Struct) {
	nfields := len(s.Fields)
	data := msgp.AppendArrayHeader(nil, uint32(nfields))
	e.p.printf("\n// array header, size %d", nfields)
	e.Fuse(data)
	for i := range s.Fields {
		if !e.p.ok() {
			return
		}
		next(e, s.Fields[i].FieldElem)
	}
}
Esempio n. 23
0
func (m *marshalGen) tuple(s *Struct) {
	data := make([]byte, 0, 5)
	data = msgp.AppendArrayHeader(data, uint32(len(s.Fields)))
	m.p.printf("\n// array header, size %d", len(s.Fields))
	m.Fuse(data)
	for i := range s.Fields {
		if !m.p.ok() {
			return
		}
		next(m, s.Fields[i].FieldElem)
	}
}
Esempio n. 24
0
// MarshalMsg implements msgp.Marshaler
func (z *bitmapContainer) MarshalMsg(b []byte) (o []byte, err error) {
	o = msgp.Require(b, z.Msgsize())
	// map header, size 2
	// string "cardinality"
	o = append(o, 0x82, 0xab, 0x63, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x74, 0x79)
	o = msgp.AppendInt(o, z.cardinality)
	// string "bitmap"
	o = append(o, 0xa6, 0x62, 0x69, 0x74, 0x6d, 0x61, 0x70)
	o = msgp.AppendArrayHeader(o, uint32(len(z.bitmap)))
	for zxvk := range z.bitmap {
		o = msgp.AppendUint64(o, z.bitmap[zxvk])
	}
	return
}
Esempio n. 25
0
// MarshalMsg implements msgp.Marshaler
func (z MetricDataArray) MarshalMsg(b []byte) (o []byte, err error) {
	o = msgp.Require(b, z.Msgsize())
	o = msgp.AppendArrayHeader(o, uint32(len(z)))
	for cmr := range z {
		if z[cmr] == nil {
			o = msgp.AppendNil(o)
		} else {
			o, err = z[cmr].MarshalMsg(o)
			if err != nil {
				return
			}
		}
	}
	return
}
Esempio n. 26
0
// MarshalMsg implements msgp.Marshaler
func (z *Message) MarshalMsg(b []byte) (o []byte, err error) {
	o = msgp.Require(b, z.Msgsize())
	o = msgp.AppendArrayHeader(o, 4)
	o = msgp.AppendString(o, z.Tag)
	o = msgp.AppendInt64(o, z.Time)
	o, err = msgp.AppendIntf(o, z.Record)
	if err != nil {
		return
	}
	o, err = msgp.AppendIntf(o, z.Option)
	if err != nil {
		return
	}
	return
}
Esempio n. 27
0
// MarshalMsg implements msgp.Marshaler
func (z *ColorGroup) MarshalMsg(b []byte) (o []byte, err error) {
	o = msgp.Require(b, z.Msgsize())
	// map header, size 3
	// string "id"
	o = append(o, 0x83, 0xa2, 0x69, 0x64)
	o = msgp.AppendInt(o, z.Id)
	// string "name"
	o = append(o, 0xa4, 0x6e, 0x61, 0x6d, 0x65)
	o = msgp.AppendString(o, z.Name)
	// string "colors"
	o = append(o, 0xa6, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x73)
	o = msgp.AppendArrayHeader(o, uint32(len(z.Colors)))
	for xvk := range z.Colors {
		o = msgp.AppendString(o, z.Colors[xvk])
	}
	return
}
Esempio n. 28
0
// MarshalMsg implements msgp.Marshaler
func (z *InterfaceT) MarshalMsg(b []byte) (o []byte, err error) {
	o = msgp.Require(b, z.Msgsize())
	// map header, size 3
	// string "Methods"
	o = append(o, 0x83, 0xa7, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73)
	o = msgp.AppendArrayHeader(o, uint32(len(z.Methods)))
	for zxhx := range z.Methods {
		o, err = z.Methods[zxhx].MarshalMsg(o)
		if err != nil {
			return
		}
	}
	// string "Deprecated"
	o = append(o, 0xaa, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64)
	o = msgp.AppendBool(o, z.Deprecated)
	// string "Comment"
	o = append(o, 0xa7, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74)
	o = msgp.AppendString(o, z.Comment)
	return
}
Esempio n. 29
0
// MarshalMsg implements msgp.Marshaler
func (z *Snap) MarshalMsg(b []byte) (o []byte, err error) {
	o = msgp.Require(b, z.Msgsize())
	// map header, size 4
	// string "LowestTrackableValue"
	o = append(o, 0x84, 0xb4, 0x4c, 0x6f, 0x77, 0x65, 0x73, 0x74, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65)
	o = msgp.AppendInt64(o, z.LowestTrackableValue)
	// string "HighestTrackableValue"
	o = append(o, 0xb5, 0x48, 0x69, 0x67, 0x68, 0x65, 0x73, 0x74, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65)
	o = msgp.AppendInt64(o, z.HighestTrackableValue)
	// string "SignificantFigures"
	o = append(o, 0xb2, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x66, 0x69, 0x63, 0x61, 0x6e, 0x74, 0x46, 0x69, 0x67, 0x75, 0x72, 0x65, 0x73)
	o = msgp.AppendInt64(o, z.SignificantFigures)
	// string "Counts"
	o = append(o, 0xa6, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73)
	o = msgp.AppendArrayHeader(o, uint32(len(z.Counts)))
	for xvk := range z.Counts {
		o = msgp.AppendInt64(o, z.Counts[xvk])
	}
	return
}
Esempio n. 30
0
// MarshalMsg implements msgp.Marshaler
func (z *runContainer32) MarshalMsg(b []byte) (o []byte, err error) {
	o = msgp.Require(b, z.Msgsize())
	// map header, size 2
	// string "iv"
	o = append(o, 0x82, 0xa2, 0x69, 0x76)
	o = msgp.AppendArrayHeader(o, uint32(len(z.iv)))
	for zxpk := range z.iv {
		// map header, size 2
		// string "start"
		o = append(o, 0x82, 0xa5, 0x73, 0x74, 0x61, 0x72, 0x74)
		o = msgp.AppendUint32(o, z.iv[zxpk].start)
		// string "last"
		o = append(o, 0xa4, 0x6c, 0x61, 0x73, 0x74)
		o = msgp.AppendUint32(o, z.iv[zxpk].last)
	}
	// string "card"
	o = append(o, 0xa4, 0x63, 0x61, 0x72, 0x64)
	o = msgp.AppendInt64(o, z.card)
	return
}