Documentation
¶
Overview ¶
Package db exposes the SQLite schema migrations as an embedded filesystem so the chassis binary can boot anywhere without needing the repo checkout on disk. The on-disk files under schema/sqlite/ are still the source of truth — they're embedded at compile time.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var FS embed.FS
FS contains the per-DB migration sets, embedded into the binary at build time. main.go reads from this when no explicit --db-schema-dir is provided (or when the provided dir doesn't exist).
auth/ holds the identity tables (actors, keys, memberships, invitations, browser_*). runtime/ holds the content tables (ops, tenants, stacks/versions/files). Each subdirectory is swept against its own *sql.DB with its own changeset row in varvals.
schema/postgres/auth mirrors schema/sqlite/auth for an HA control plane whose auth DSN is a postgres:// URL (the in-tree default stays SQLite — the runtime DB is always SQLite). See chassis/auth/registry dialect seam.
var SystemOpstacksFS embed.FS
SystemOpstacksFS is the default, chassis-shipped system opstack bundle, embedded at build time so a fresh chassis routes correctly with zero files on disk. Layout mirrors the CLI bundle convention:
opstacks/<_slug>/OPS/<stack>/<scope>/<name>.txcl
Only `_`-prefixed slugs are system (chassis-local, trusted) tenants. `_sys` owns the ingress-fallback `boot` stack. An operator can override/extend this from a local directory (see chassis/sysops); the embedded copy is the open-core baseline, exactly as schema/sqlite is the embedded baseline overridable by --db-schema-dir.
`all:` is required because go:embed otherwise skips `_`-prefixed entries — and every system tenant dir is literally `_`-prefixed (`_sys`, future `_playground`, …).
Functions ¶
This section is empty.
Types ¶
This section is empty.