Documentation
¶
Overview ¶
Package notifier drives the expiry surfaces from the pure expiry engine: States (per-key expiry), Banner (the debounced inline reminder), and Notify (the cadence-gated desktop alert). Scheduler install lives with the platform layer (the notify verb).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DesktopEnabled ¶ added in v0.1.1
func DesktopEnabled() bool
DesktopEnabled reports whether desktop notifications may be shown: $AUTHAMA_NOTIFICATIONS (or authama.json's notifications.desktop) set to a false value turns them off; the reminder job then runs and records nothing to show.
Types ¶
type Notifier ¶
type Notifier struct {
// contains filtered or unexported fields
}
Notifier computes and fires the reminders.
func New ¶
New builds a Notifier over a manifest. It takes the whole manifest rather than just its defaults because the daily alert covers dangling keys as well as expiry, and deciding a key is dangling needs the profiles and hosts. m may be nil, in which case only expiry is reported.
func (*Notifier) Banner ¶
Banner returns the cheap, debounced inline reminder (empty when nothing is due or the debounce window hasn't elapsed). Mirrors Notifier.banner.
func (*Notifier) Dangling ¶
Dangling returns the blocking dangling-key findings, or none when there is no manifest to audit against. Only the blocking ones: a daily desktop alert is for a key that has stopped working, not for one that has yet to be minted.
func (*Notifier) Notify ¶
Notify fires the cadence-gated desktop alert. Returns true if one was sent.
It covers dangling keys as well as expiry. An expiring key eventually stops working; a dangling one already has, and it was the only class of problem the daily reminder could not tell you about - so the one surface that reaches a user who is not running authama now reports both.