paths

package
v1.5.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2026 License: MIT Imports: 3 Imported by: 0

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 LogsRoot

func LogsRoot() string

LogsRoot is the per-stack logs root (State()/logs/).

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/, so it follows $XDG_DATA_HOME). It holds the AES-256-GCM local key and the encrypted store, which the secrets package writes as owner-only files (0600) inside a 0700 directory.

func Socket

func Socket() string

Socket returns the absolute path of the daemon's Unix domain socket. It prefers $XDG_RUNTIME_DIR, then the systemd user runtime directory /run/user/<uid>, and falls back to /tmp. The chain is deterministic so the daemon and clients agree on the location without coordinating through env vars or config files.

func State

func State() string

State is $XDG_STATE_HOME/a-novel/ (default ~/.local/state/a-novel/). Logs and the reinstall checkpoint live here.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL