Documentation
¶
Overview ¶
Package cbor provides Juno's CBOR API. Encoding and decoding currently use the fxamacker adapter.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterType ¶
RegisterType gives a unique CBOR tag to a type. Only call this from utils/cbor/registry's init, before concurrent use.
func UnmarshalFirst ¶
UnmarshalFirst decodes the first CBOR item and returns the remaining bytes.
func UnmarshalStrict ¶
UnmarshalStrict decodes without type tags and rejects unknown fields. It is used to check that projections match their stored records.
Types ¶
type Encoder ¶
Encoder writes CBOR values to a stream.
func NewEncoder ¶
NewEncoder returns an encoder that writes to w.
type RawMessage ¶
type RawMessage = fxamacker.RawMessage
RawMessage is an item that is already CBOR encoded.
type SelfDecoder ¶
type SelfDecoder = fxamacker.SelfDecoder
SelfDecoder is the hook a type implements to read its own encoding.
type SelfEncoder ¶
type SelfEncoder = fxamacker.SelfEncoder
SelfEncoder is the hook a type implements to write its own encoding.