Documentation
¶
Overview ¶
Package notify posts desktop notifications. It is a leaf package — below internal/cli, internal/tui, and internal/policy — so a backup run notifies identically from every surface, including the launchd and systemd timers that invoke `sentra policy run` with no terminal attached.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Desktop ¶
Desktop posts one notification for goos via run. Unsupported platforms make no call and return nil; a nil run is a silent no-op. The runner's error is returned wrapped so the caller can log it — by contract the caller never lets it mask the outcome being reported.
On darwin the title, subtitle, and body travel as argv into an `on run argv` handler rather than being spliced into the AppleScript source: a policy name or error text containing quotes or backslashes would otherwise terminate the string literal and run as script.
Types ¶
type Runner ¶
Runner executes one notifier command and returns its combined output. Production passes ExecRunner. A nil Runner means notifications are OFF: this deliberately differs from scheduler.Runner, whose nil selects the real thing. A missing timer activation is a broken feature the operator notices at once; a missing notification is not, and the failure mode of the other default is every test that runs a backup popping a real notification on the developer's desktop. So a zero-value Deps is silent and production wires ExecRunner explicitly (guarded by a test).