Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func DumpHeader ¶
DumpHeader dumps the basic COAP message details to a string.
Types ¶
type RawCodec ¶
RawCodec performs no encoding/decoding but it propagates/validates the CoAP content format/media type.
func MakeRawVNDOCFCBORCodec ¶
func MakeRawVNDOCFCBORCodec() RawCodec
MakeRawVNDOCFCBORCodec creates a RawVNDOCFCBORCodec codec, which performs no encoding/decoding, but propagates/validates the CoAP content format/media type.
func (RawCodec) ContentFormat ¶
ContentFormat propagates the CoAP media type
func (RawCodec) Decode ¶
Decode validates the content format and propagates the payload to v as *[]byte without any conversions.
func (RawCodec) DecodeContentFormat ¶
DecodeContentFormat propagates the CoAP media type
type VNDOCFCBORCodec ¶
type VNDOCFCBORCodec struct{}
VNDOCFCBORCodec encodes/decodes according to the CoAP content format/media type.
func (VNDOCFCBORCodec) ContentFormat ¶
func (VNDOCFCBORCodec) ContentFormat() message.MediaType
ContentFormat used for encoding.
func (VNDOCFCBORCodec) Decode ¶
func (VNDOCFCBORCodec) Decode(m *pool.Message, v interface{}) error
Decode the CBOR payload of a COAP message.
func (VNDOCFCBORCodec) Encode ¶
func (VNDOCFCBORCodec) Encode(v interface{}) ([]byte, error)
Encode encodes v and returns bytes.