Versions in this module Expand all Collapse all v1 v1.0.5 Dec 21, 2023 Changes in this version + var ErrBadChar = errors.New("invalid char") + var ErrEmptyName = errors.New("empty name") + var ErrNoValues = errors.New("no value or sum field found") + var ErrTooManyValues = errors.New("more than one value in the record") + var ErrUnsupportedFormat = errors.New("unsupported format") + var ErrVersionChange = errors.New("version change") + func Encode(p Pack, format Format) ([]byte, error) + func Validate(p Pack) error + type Format int + const CBOR + const JSON + const XML + type Pack struct + Records []Record + XMLName *bool + Xmlns string + func Decode(msg []byte, format Format) (Pack, error) + func Normalize(p Pack) (Pack, error) + func (p *Pack) Len() int + func (p *Pack) Less(i, j int) bool + func (p *Pack) Swap(i, j int) + type Record struct + BaseName string + BaseSum float64 + BaseTime float64 + BaseUnit string + BaseValue float64 + BaseVersion uint + BoolValue *bool + DataValue *string + Link string + Name string + StringValue *string + Sum *float64 + Time float64 + Unit string + UpdateTime float64 + Value *float64 + XMLName *bool