Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Any ¶
type Any struct {
Value any
}
Any is a CBOR backed implementation of the IPLD data model. Any supports serializing/deserializing the following kinds/types:
- Null (nil)
- Boolean (bool)
- Integer (int64, int)
- String (string)
- Bytes ([]byte)
- List ([]Any)
- Map (Map)
- Link (cid.Cid)
Map values and list items may be any of the above types.
type Map ¶
Map is a CBOR backed implementation of ipld.Map. Keys are strings and values may be any of the types supported by ipld.Any.
type Raw ¶
type Raw struct {
// contains filtered or unexported fields
}
Raw is a CBOR-canonical opaque value backed by raw CBOR bytes.
On the CBOR side it is a pure byte-passthrough (delegates to cbg.Deferred semantics) — decoded bytes are stored verbatim and re-emitted verbatim. This makes Raw suitable for envelope fields whose schema is determined at runtime by another field (e.g. UCAN args/meta determined by cmd) and removes the need to re-encode-then-re-decode in order to bind to a typed Go struct.
On the dag-json side, Raw decodes the underlying CBOR via the Any machinery and emits dag-json (and inversely on Unmarshal). The dag-json path is for debug/inspection only — UCAN signing happens on CBOR bytes.
func NewRaw ¶
NewRaw constructs a Raw from already-encoded CBOR bytes. The caller is responsible for ensuring the bytes are valid CBOR.