config

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: MIT Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package config resolves where notesd keeps its files (docs/design/overview.md#operational-notes).

Index

Constants

View Source
const AppID = "org.frostyard.Frostnotes"

AppID is the reverse-DNS application ID (frostyard/core ADR-0016).

View Source
const LockFile = "notesd.lock"

LockFile is the file in DataDir that the one notesd of the directory holds a lock on (flock), from before it opens the database until it exits.

Variables

This section is empty.

Functions

func DefaultSocket

func DefaultSocket(getenv func(string) string) (string, error)

DefaultSocket is notesd's socket when FROSTNOTES_SOCKET is not set: $XDG_RUNTIME_DIR/frostnotes/notesd.sock. In the Flatpak (FLATPAK_ID is AppID) it is $XDG_RUNTIME_DIR/app/org.frostyard.Frostnotes/frostnotes/notesd.sock: Flatpak shares $XDG_RUNTIME_DIR/app/<id> between every sandbox of the app, and the rest of $XDG_RUNTIME_DIR is private to each sandbox, so the app and notesd (and notesctl) meet only there (docs/adr/0031-the-desktop-app-ships-as-a-flatpak-with-its-own-notesd.md). app/src-tauri/src/paths.rs must stay in step with this function.

func InFlatpak added in v0.3.0

func InFlatpak(getenv func(string) string) bool

InFlatpak reports whether the environment is this application's Flatpak sandbox (FLATPAK_ID is AppID): the app's own, not another Flatpak's.

Types

type Paths

type Paths struct {
	DataDir string // database and blob store; must be on a local filesystem
	Socket  string // the RPC socket
	DB      string // DataDir/notesd.db
	Blobs   string // DataDir/blobs
}

Paths are notesd's file locations. Vaults live wherever the user keeps them; nothing here is inside a vault (ADR-0003).

func Resolve

func Resolve(getenv func(string) string) (Paths, error)

Resolve computes Paths from the environment: the XDG base directories. FROSTNOTES_DATA_DIR and FROSTNOTES_SOCKET override the defaults, for tests and for running a second notesd.

Jump to

Keyboard shortcuts

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