Help us shape the future of Go! Take the 2026 Go Developer Survey

notifications

package
v1.4.483 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NoopProvider

type NoopProvider struct{}

NoopProvider for unsupported platforms

func (*NoopProvider) IsAvailable

func (n *NoopProvider) IsAvailable() bool

func (*NoopProvider) Send

func (n *NoopProvider) Send(title, message string) error

type NotificationManager

type NotificationManager struct {
	// contains filtered or unexported fields
}

NotificationManager handles cross-platform notifications

func NewNotificationManager

func NewNotificationManager() *NotificationManager

NewNotificationManager creates a new notification manager with the best available provider

func (*NotificationManager) IsAvailable

func (nm *NotificationManager) IsAvailable() bool

IsAvailable checks if notifications are available

func (*NotificationManager) Send

func (nm *NotificationManager) Send(title, message string) error

Send sends a notification using the configured provider

type NotificationProvider

type NotificationProvider interface {
	Send(title, message string) error
	IsAvailable() bool
}

NotificationProvider interface for different notification backends

type NotifySendProvider

type NotifySendProvider struct{}

Linux notify-send implementation

func (*NotifySendProvider) IsAvailable

func (n *NotifySendProvider) IsAvailable() bool

func (*NotifySendProvider) Send

func (n *NotifySendProvider) Send(title, message string) error

type OSAScriptProvider

type OSAScriptProvider struct{}

macOS osascript implementation

func (*OSAScriptProvider) IsAvailable

func (o *OSAScriptProvider) IsAvailable() bool

func (*OSAScriptProvider) Send

func (o *OSAScriptProvider) Send(title, message string) error

type PowerShellProvider

type PowerShellProvider struct{}

Windows PowerShell implementation

func (*PowerShellProvider) IsAvailable

func (p *PowerShellProvider) IsAvailable() bool

func (*PowerShellProvider) Send

func (p *PowerShellProvider) Send(title, message string) error

type TerminalNotifierProvider

type TerminalNotifierProvider struct{}

macOS terminal-notifier implementation

func (*TerminalNotifierProvider) IsAvailable

func (t *TerminalNotifierProvider) IsAvailable() bool

func (*TerminalNotifierProvider) Send

func (t *TerminalNotifierProvider) Send(title, message string) error

Jump to

Keyboard shortcuts

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