Expand description
The source registry (spec/sync/README.md §2): adapters, sources,
attachments (sync_state is reserved — only delete_source touches
it), ensure_repo with the <slug>-fs source, and the config → argv
rendering an adapter is spawned with.
Structs§
- Adapter
Row - An
adaptersrow. - NewSource
- What
create_sourcetakes. - Source
Row - A
sourcesrow with its JSON columns parsed.
Constants§
- FS_
ADAPTER - The
fsadapter asensure_reporegisters it. - FS_
ADAPTER_ COMMAND - Its command.
Functions§
- attach
- Attach a source to a repo (
INSERT OR IGNORE). - create_
source - Create a named source over an adapter: mints
src; a taken name or an unknown adapter fails (UNIQUE / FK). Returns the id. - delete_
source - Delete a source: its attachments, its
sync_staterows, the row. - detach
- Detach a source from a repo.
- ensure_
adapter - Insert or update an adapter by name.
- ensure_
repo - §2
ensure_repo: an existing slug returns its id; else mintrp, insert with default settings, and with a root register the filesystem source —INSERT OR IGNOREthefsadapter, find or create (mintsrc)<slug>-fswithconfig {"root": <root>}, attach it. - js_
string - JavaScript
String(value)for a JSON value: strings as is, numbers as JS prints them, booleans,null→"null", arrays comma-joined (withnullelements empty, asArray.prototype.toString), objects[object Object]. - list_
adapters - Every adapter, by name.
- list_
sources - Every source, by name.
- register_
fs_ source - The
<slug>-fssource atroot, registered idempotently and attached. - render_
config_ flags - §2
render_config_flags: for each entry in the object’s order, skipnull;true→--key;false→ nothing; else--key,String(value). - source_
by_ id - The source with
source_id, if any. - source_
by_ name - The source named
name, if any. - sources_
for_ repo - The sources attached to a repo, ordered by
name.