Skip to main content

Module store

Module store 

Source
Expand description

Embedded SurrealDB store: durable config only, behind a thin per-table repository.

The store is SurrealDB embedded — the official SDK with a local KV backend, so conclave serve stays a single self-contained binary with a data directory and no external DB process (DESIGN.md §15). Store::open uses the pure-Rust SurrealKV backend for persistence; Store::open_in_memory backs hermetic tests.

There is no ORM: storage records are the SDK’s own typed layer (SurrealValue), and this module maps between them and the domain types. Only durable config lives here (user, machine, channel, invite, with the uniqueness constraints from DESIGN.md §15); presence, subscriptions, permission levels, and the admin allowlist are deliberately not persisted.

Structs§

ChannelRecord
A channel (name unique, DESIGN.md §6, §15).
InviteRecord
An invite token for a channel (token unique, DESIGN.md §6, §15).
MachineRecord
An enrolled machine keypair under a user (pubkey globally unique; name unique within the user, DESIGN.md §5, §15).
Store
The embedded store: a thin typed repository over an embedded SurrealDB instance.
UserRecord
A registered account (username unique per server, DESIGN.md §15).