Versions in this module Expand all Collapse all v0 v0.1.1 Nov 17, 2026 v0.1.0 Nov 17, 2026 Changes in this version + var ErrDenied = errors.New(...) + var ErrInvalid = errors.New("notifykit: invalid notification") + var ErrUnsupported = errors.New("notifykit: no desktop notifier is available here") + func RunCLI(ctx context.Context, n *Notifier, args []string, stdin io.Reader, ...) int + type Backend interface + Name func() string + Send func(ctx context.Context, nt Notification) error + type Config struct + AppID string + AppName string + Backend Backend + BundleID string + Disabled bool + EnvPrefix string + Getenv func(string) string + Icon []byte + Log io.Writer + MinInterval time.Duration + StateDir string + Timeout time.Duration + type Endpoint struct + Socket string + TokenFile string + type Level int + const Alert + const Info + const Warn + func ParseLevel(s string) (Level, error) + func (l Level) String() string + type Notification struct + Body string + Group string + Icon string + Level Level + Open string + Sound bool + Subtitle string + Title string + type Notifier struct + func New(cfg Config) (*Notifier, error) + func (n *Notifier) Backend() (string, error) + func (n *Notifier) Enabled() (bool, string) + func (n *Notifier) Endpoint() (Endpoint, error) + func (n *Notifier) Listen(ctx context.Context) error + func (n *Notifier) Send(ctx context.Context, nt Notification) (Result, error) + type Recorder struct + func (*Recorder) Name() string + func (r *Recorder) Send(_ context.Context, nt Notification) error + func (r *Recorder) Sent() []Notification + type Result struct + Backend string + Pending bool + Skipped string + Suppressed bool + func Ping(ctx context.Context, ep Endpoint, nt Notification) (Result, error)