Documentation
¶
Overview ¶
Package paths centralizes filesystem locations the daemon and clients agree on. Single source of truth so a change to (e.g.) the socket path only needs to be made here.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BackupsRoot ¶
func BackupsRoot() string
BackupsRoot is the per-stack volume-backups root (Data()/backups/).
func Data ¶
func Data() string
Data is $XDG_DATA_HOME/a-novel/ (default ~/.local/share/a-novel/). Volume backups live here.
func ReinstallCheckpoint ¶
func ReinstallCheckpoint() string
ReinstallCheckpoint is the path of the one-shot reinstall handoff file. Single fixed location; presence == "new daemon should replay".
func SecretsRoot ¶ added in v1.0.4
func SecretsRoot() string
SecretsRoot is the local secrets store root (Data()/secrets/). It holds the AES-256-GCM local key and the encrypted store; both are created mode 0600 inside a 0700 directory by the secrets package. Honors $XDG_DATA_HOME (through Data()), which the secrets tests override to a temp dir.
func Socket ¶
func Socket() string
Socket returns the absolute path of the daemon's unix domain socket.
Resolution priority (highest first):
- $XDG_RUNTIME_DIR/a-novel.sock — the canonical XDG location.
- /run/user/<uid>/a-novel.sock — the standard systemd-user runtime dir.
- /tmp/a-novel-<uid>.sock — the universal fallback.
The fallback chain is deterministic so the daemon and clients always agree without coordination through env vars or config files.
Types ¶
This section is empty.