Versions in this module Expand all Collapse all v0 v0.0.2 Dec 15, 2025 Changes in this version + type OIDPath = []OID type URL + Base OID + Extra string + IPPort *netip.AddrPort + Node PeerID + Path OIDPath + func ParseURL(x string) (*URL, error) + func (u URL) String() string v0.0.1 Nov 25, 2025 Changes in this version + const Action_ACK + const Action_ALL + const Action_QUEUE_CREATE + const Action_QUEUE_INSERT + const Action_QUEUE_INSPECT + const Action_QUEUE_NEXT + const Action_QUEUE_SUB_VOLUME + const Action_SHARE_ACK + const Action_SHARE_TX_ADD_FROM + const Action_SHARE_TX_DELETE + const Action_SHARE_TX_EXISTS + const Action_SHARE_TX_GET + const Action_SHARE_TX_INSPECT + const Action_SHARE_TX_LINK_FROM + const Action_SHARE_TX_LOAD + const Action_SHARE_TX_POST + const Action_TX_COPY_FROM + const Action_TX_COPY_TO + const Action_TX_DELETE + const Action_TX_EXISTS + const Action_TX_GET + const Action_TX_INSPECT + const Action_TX_LINK_FROM + const Action_TX_LOAD + const Action_TX_POST + const Action_TX_SAVE + const Action_TX_UNLINK_FROM + const Action_VOLUME_BEGIN_TX + const Action_VOLUME_CLONE + const Action_VOLUME_CREATE + const Action_VOLUME_INSPECT + const Action_VOLUME_LINK_TO + const Action_VOLUME_SUB_TO + const CIDSize + const EndpointSize + const HandleSize + const OIDSize + const PeerIDSize + func CheckBlob(hf HashFunc, salt, cid *CID, data []byte) error + func IsErrInvalidHandle(err error) bool + func IsErrNotFound(err error) bool + func IsErrTooLarge(err error) bool + func IsErrTxDone(err error) bool + type AEADAlgo string + const AEAD_CHACHA20POLY1305 + func (a AEADAlgo) Validate() error + type ActionSet uint64 + func (a *ActionSet) Unmarshal(data []byte) error + func (a ActionSet) Marshal(out []byte) []byte + func (a ActionSet) Share() ActionSet + func (r *ActionSet) Scan(x any) error + func (r ActionSet) String() string + type CID = cadata.ID + func ParseCID(s string) (CID, error) + type DEK [32]byte + func (d *DEK) UnmarshalText(data []byte) error + func (d DEK) MarshalText() ([]byte, error) + func (d DEK) String() string + type Endpoint struct + IPPort netip.AddrPort + Peer PeerID + func ParseEndpoint(s string) (Endpoint, error) + func (e *Endpoint) Unmarshal(data []byte) error + func (e Endpoint) Marshal(out []byte) []byte + func (e Endpoint) String() string + type ErrBadData struct + Actual CID + Expected CID + Len int + Salt *CID + func (e ErrBadData) Error() string + type ErrCannotSalt struct + func (e ErrCannotSalt) Error() string + type ErrInvalidHandle struct + Handle Handle + func (e ErrInvalidHandle) Error() string + type ErrNoLink struct + Base OID + Target OID + func (e ErrNoLink) Error() string + type ErrNotFound = cadata.ErrNotFound + type ErrPermission struct + Handle Handle + Requires ActionSet + Rights ActionSet + func (e ErrPermission) Error() string + type ErrTooLarge struct + BlobSize int + MaxSize int + func (e ErrTooLarge) Error() string + type ErrTxDone struct + ID OID + func (e ErrTxDone) Error() string + type ErrTxNotGC struct + Op string + func (e ErrTxNotGC) Error() string + type ErrTxReadOnly struct + Op string + Tx OID + func (e ErrTxReadOnly) Error() string + type FQOID struct + OID OID + Peer PeerID + type GetOpts struct + Salt *CID + SkipVerify bool + type Handle struct + OID OID + Secret [16]byte + func ParseHandle(s string) (Handle, error) + func (h *Handle) Unmarshal(data []byte) error + func (h *Handle) UnmarshalJSON(data []byte) error + func (h Handle) Marshal(out []byte) []byte + func (h Handle) MarshalJSON() ([]byte, error) + func (h Handle) String() string + type HandleAPI interface + Drop func(ctx context.Context, h Handle) error + InspectHandle func(ctx context.Context, h Handle) (*HandleInfo, error) + KeepAlive func(ctx context.Context, hs []Handle) error + Share func(ctx context.Context, h Handle, to PeerID, mask ActionSet) (*Handle, error) + type HandleInfo struct + CreatedAt tai64.TAI64 + ExpiresAt tai64.TAI64 + OID OID + Rights ActionSet + func (hi *HandleInfo) Unmarshal(data []byte) error + func (hi HandleInfo) Marshal(out []byte) []byte + type HashAlgo string + const HashAlgo_BLAKE2b_256 + const HashAlgo_BLAKE3_256 + const HashAlgo_CSHAKE256 + const HashAlgo_SHA2_256 + const HashAlgo_SHA3_256 + func (h HashAlgo) HashFunc() HashFunc + func (h HashAlgo) IsKeyed() bool + func (h HashAlgo) Validate() error + type HashFunc func(salt *CID, data []byte) CID + type InsertResp struct + Success uint32 + type Message struct + Endpoint Endpoint + Payload []byte + Topic TID + func (m *Message) Unmarshal(data []byte) error + func (m Message) Marshal(out []byte) []byte + type NextOpts struct + LeaveIn bool + MaxWait *time.Duration + Min uint32 + Skip uint32 + func (no *NextOpts) Unmarshal(data []byte) error + func (no NextOpts) Marshal(out []byte) []byte + type OID [OIDSize]byte + func ParseOID(s string) (OID, error) + func RandomOID() (ret OID) + func (o *OID) Scan(src any) error + func (o *OID) Unmarshal(data []byte) error + func (o *OID) UnmarshalText(data []byte) error + func (o OID) Compare(other OID) int + func (o OID) Marshal(out []byte) []byte + func (o OID) MarshalText() ([]byte, error) + func (o OID) String() string + func (o OID) Value() (driver.Value, error) + type PeerID = inet256.ID + type PostOpts struct + Salt *CID + type QueueAPI interface + CreateQueue func(ctx context.Context, host *Endpoint, qspec QueueSpec) (*Handle, error) + Insert func(ctx context.Context, from *Endpoint, q Handle, msgs []Message) (*InsertResp, error) + Next func(ctx context.Context, q Handle, buf []Message, opts NextOpts) (int, error) + SubToVolume func(ctx context.Context, q Handle, vol Handle) error + type QueueBackend struct + Memory *QueueBackend_Memory + Remote *QueueBackend_Remote + func (qb *QueueBackend[T]) Unmarshal(data []byte) error + func (qb QueueBackend[T]) Marshal(out []byte) []byte + type QueueBackend_Memory struct + EvictOldest bool + MaxDepth uint32 + type QueueBackend_Remote struct + Endpoint Endpoint + OID OID + type QueueInfo struct + ID OID + Spec QueueBackend[OID] + func (qi *QueueInfo) Unmarshal(data []byte) error + func (qi QueueInfo) Marshal(out []byte) []byte + type QueueSpec = QueueBackend[Handle] + type SchemaName string + const Schema_NONE + type SchemaSpec struct + Name SchemaName + Params json.RawMessage + func (s *SchemaSpec) Unmarshal(data []byte) error + func (s SchemaSpec) Marshal(out []byte) []byte + type Secret [32]byte + func (s *Secret) UnmarshalJSON(data []byte) error + func (s *Secret) UnmarshalText(data []byte) error + func (s Secret) MarshalJSON() ([]byte, error) + type Service interface + Endpoint func(ctx context.Context) (Endpoint, error) + type TID [32]byte + func (tid *TID) Unmarshal(data []byte) error + func (tid TID) IsZero() bool + func (tid TID) Key() [32]byte + func (tid TID) String() string + type TxAPI interface + Abort func(ctx context.Context, tx Handle) error + Commit func(ctx context.Context, tx Handle) error + Copy func(ctx context.Context, tx Handle, srcTxns []Handle, cids []CID, success []bool) error + Delete func(ctx context.Context, tx Handle, cids []CID) error + Exists func(ctx context.Context, tx Handle, cids []CID, dst []bool) error + Get func(ctx context.Context, tx Handle, cid CID, buf []byte, opts GetOpts) (int, error) + InspectTx func(ctx context.Context, tx Handle) (*TxInfo, error) + IsVisited func(ctx context.Context, tx Handle, cids []CID, yesVisited []bool) error + Link func(ctx context.Context, tx Handle, target Handle, mask ActionSet) error + Load func(ctx context.Context, tx Handle, dst *[]byte) error + Post func(ctx context.Context, tx Handle, data []byte, opts PostOpts) (CID, error) + Save func(ctx context.Context, tx Handle, src []byte) error + Unlink func(ctx context.Context, tx Handle, targets []OID) error + Visit func(ctx context.Context, tx Handle, cids []CID) error + VisitLinks func(ctx context.Context, tx Handle, targets []OID) error + type TxInfo struct + HashAlgo HashAlgo + ID OID + MaxSize int64 + Params TxParams + Volume OID + func (ti *TxInfo) Unmarshal(data []byte) error + func (ti TxInfo) Marshal(out []byte) []byte + type TxParams struct + GC bool + Modify bool + func (tp *TxParams) Unmarshal(data []byte) error + func (tp TxParams) Marshal(out []byte) []byte + func (tp TxParams) Validate() error + type URL struct + Endpoint Endpoint + OID OID + func (u *URL) UnmarshalText(x []byte) error + func (u URL) MarshalText() ([]byte, error) + type VolumeAPI interface + BeginTx func(ctx context.Context, volh Handle, txp TxParams) (*Handle, error) + CloneVolume func(ctx context.Context, caller *PeerID, volh Handle) (*Handle, error) + CreateVolume func(ctx context.Context, host *Endpoint, vspec VolumeSpec) (*Handle, error) + InspectVolume func(ctx context.Context, h Handle) (*VolumeInfo, error) + OpenFiat func(ctx context.Context, x OID, mask ActionSet) (*Handle, error) + OpenFrom func(ctx context.Context, base Handle, x OID, mask ActionSet) (*Handle, error) + type VolumeBackend struct + Consensus *VolumeBackend_Consensus + Git *VolumeBackend_Git + Local *VolumeBackend_Local + Remote *VolumeBackend_Remote + Vault *VolumeBackend_Vault[T] + func VolumeBackendToOID(x VolumeBackend[Handle]) (ret VolumeBackend[OID]) + func (v *VolumeBackend[T]) Deps() iter.Seq[T] + func (v *VolumeBackend[T]) Marshal(out []byte) []byte + func (v *VolumeBackend[T]) Unmarshal(data []byte) error + func (v *VolumeBackend[T]) Validate() (err error) + func (v VolumeBackend[T]) Config() VolumeConfig + func (v VolumeBackend[T]) String() string + type VolumeBackend_Consensus struct + HashAlgo HashAlgo + MaxSize int64 + Schema SchemaSpec + type VolumeBackend_Git struct + URL string + type VolumeBackend_Local struct + HashAlgo HashAlgo + MaxSize int64 + Salted bool + Schema SchemaSpec + func VolumeBackend_LocalFromConfig(x VolumeConfig) *VolumeBackend_Local + func (v *VolumeBackend_Local) Validate() error + type VolumeBackend_Remote struct + Endpoint Endpoint + HashAlgo HashAlgo + Volume OID + type VolumeBackend_Vault struct + HashAlgo HashAlgo + Secret Secret + X T + func (v *VolumeBackend_Vault[T]) Validate() error + type VolumeConfig struct + HashAlgo HashAlgo + MaxSize int64 + Salted bool + Schema SchemaSpec + func DefaultVolumeParams() VolumeConfig + func (v *VolumeConfig) Validate() error + type VolumeInfo struct + Backend VolumeBackend[OID] + ID OID + func (vi *VolumeInfo) GetRemoteFQOID() FQOID + func (vi *VolumeInfo) Unmarshal(data []byte) error + func (vi VolumeInfo) Marshal(out []byte) []byte + type VolumeSpec = VolumeBackend[Handle] + func DefaultLocalSpec() VolumeSpec