Documentation ¶
Overview ¶
Package cbor implements just enough of the CBOR (Concise Binary Object Representation, RFC 8948) to deterministically encode simple data.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Array ¶
type Array struct {
// contains filtered or unexported fields
}
Array is the CBOR array type.
func NewArray ¶
NewArray reutnrs a CBOR array data item, containing the specified elements.
func (Array) Append ¶
Append appends CBOR data items to an existing Array.
type Cbor ¶
type Cbor interface { // Encode deterministically writes the CBOR-encoded data to the stream. Encode(w io.Writer) error }
Cbor is a CBOR (RFC8949) data item that can be encoded to a stream.
type Entry ¶
type Entry struct {
// contains filtered or unexported fields
}
Entry is a key/value pair in a CBOR map.
type Map ¶
type Map struct {
// contains filtered or unexported fields
}
Map is the CBOR map type.
func NewMap ¶
NewMap returns a CBOR map data item containing the specified entries. Duplicate keys in the Map will cause an error when Encode is called.
func (Map) Add ¶
Add adds a key/value entry to an existimg Map. Duplicate keys in the Map will cause an error when Encode is called.