Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterType ¶
RegisterType gives a unique CBOR tag to a type. Used by the CBOR entry point during utils/cbor/registry initialization.
func UnmarshalFirst ¶
UnmarshalFirst decodes the first CBOR data item into param v and returns the remaining bytes
func UnmarshalStrict ¶
UnmarshalStrict decodes without type tags and fails on a wire key with no matching field. Only projection drift tests need it.
Types ¶
type Encoder ¶
func NewEncoder ¶
NewEncoder returns a new encoder that writes to w
type RawMessage ¶
type RawMessage []byte
RawMessage is an item that is already CBOR encoded.
func (RawMessage) MarshalCBOR ¶
func (m RawMessage) MarshalCBOR() ([]byte, error)
Returns the same bytes
func (*RawMessage) UnmarshalCBOR ¶
func (m *RawMessage) UnmarshalCBOR(data []byte) error
Creates a copy of the bytes
type SelfDecoder ¶
SelfDecoder is the hook a type implements to read its own encoding.
type SelfEncoder ¶
SelfEncoder is the hook a type implements to write its own encoding.
Click to show internal directories.
Click to hide internal directories.