Documentation
¶
Index ¶
- Constants
- func DecodeCBOR(b []byte) (senml.Pack, error)
- func DecodeCSV(b []byte, options ...Option) (senml.Pack, error)
- func DecodeJSON(b []byte) (senml.Pack, error)
- func DecodeXML(b []byte) (senml.Pack, error)
- func EncodeCBOR(p senml.Pack) ([]byte, error)
- func EncodeCSV(p senml.Pack, options ...Option) ([]byte, error)
- func EncodeJSON(p senml.Pack, options ...Option) ([]byte, error)
- func EncodeXML(p senml.Pack, options ...Option) ([]byte, error)
- func PrettyPrint(o *codecOptions)
- func ReadCSV(r io.Reader, options ...Option) (senml.Pack, error)
- func WithHeader(o *codecOptions)
- func WriteCSV(p senml.Pack, w io.Writer, options ...Option) error
- type Option
Constants ¶
View Source
const CSVHeader = "Time,Update Time,Name,Unit,Value,String Value,Boolean Value,Data Value,Sum"
CSVHeader is the fixed CSV header
Variables ¶
This section is empty.
Functions ¶
func DecodeCBOR ¶
DecodeCBOR takes a SenML pack in CBOR bytes and decodes it into a Pack
func DecodeJSON ¶
DecodeJSON takes a SenML pack in JSON bytes and decodes it into a Pack
func EncodeCBOR ¶
EncodeCBOR serializes the SenML pack into CBOR bytes
func EncodeJSON ¶
EncodeJSON serializes the SenML pack into JSON bytes
func PrettyPrint ¶
func PrettyPrint(o *codecOptions)
PrettyPrint enables indentation of JSON and XML outputs
Types ¶
Click to show internal directories.
Click to hide internal directories.