Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultDuration = -1 * time.Millisecond
DefaultDuration is the OS's default notification duration.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Notification ¶
type Notification struct { Title string Body string AppName string IconPath string Duration time.Duration // 0 means notification must be dismissed manually ReplacesID NotificationID }
A Notification represents a notification to be shown to the user. Only the Title field is required.
type NotificationID ¶
type NotificationID uint32
NotificationID uniquely identifies a notification.
func Push ¶
func Push(n Notification) (NotificationID, error)
Push displays a notification. It returns a NotificationID that can be used to replace the notification later.
Click to show internal directories.
Click to hide internal directories.