Documentation
¶
Overview ¶
Package store persists nerdui's own data in SQLite (ADR-0004).
Runtime objects (containers, images, ...) are never stored here: containerd and nerdctl stay the source of truth. Queries are written in SQL (queries/*.sql) and compiled into typed Go code by sqlc (package db); handlers never write SQL directly.
Index ¶
Constants ¶
const FileMode fs.FileMode = 0o600
FileMode is the permission of the database file; SQLite creates -wal/-shm with the same mode.
const FileName = "nerdui.db"
FileName is the database file inside the data directory.
Variables ¶
var ErrNewerSchema = fmt.Errorf("database schema is newer than this nerdui build")
ErrNewerSchema is returned when the database was migrated by a newer nerdui.
Functions ¶
func IsUniqueViolation ¶
IsUniqueViolation reports whether err is a UNIQUE or PRIMARY KEY constraint violation.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store holds a single-connection writer pool and a read-only reader pool.
func (*Store) SchemaVersion ¶
SchemaVersion returns the applied migration version.