Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DumpHeader ¶
DumpHeader dumps the basic COAP message details to a string.
Types ¶
type NoCodec ¶
type NoCodec struct{ MediaType uint16 }
NoCodec performes no encoding/decoding but it propagates/validates the CoAP content format/media type.
func (NoCodec) ContentFormat ¶
ContentFormat propagates the CoAP media type.
type RawVNDOCFCBORCodec ¶
type RawVNDOCFCBORCodec struct{}
RawVNDOCFCBORCodec performes no encoding/decoding but it propagates/validates the CoAP content format/media type.
func (RawVNDOCFCBORCodec) ContentFormat ¶
func (RawVNDOCFCBORCodec) ContentFormat() message.MediaType
ContentFormat used for encoding.
func (RawVNDOCFCBORCodec) Decode ¶
func (c RawVNDOCFCBORCodec) Decode(m *message.Message, v interface{}) error
Decode validates the content format and propagates the payload to v as *[]byte without any conversions.
func (RawVNDOCFCBORCodec) Encode ¶
func (c RawVNDOCFCBORCodec) Encode(v interface{}) ([]byte, error)
Encode propagates the payload without any conversions.
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 *message.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.