modulepackage
0.0.0-20190209221809-c404b1f22435
Repository: https://github.com/dhaavi/go-notify.git
Documentation: pkg.go.dev
# README
go-notify
Package notify provides an implementation of the Gnome DBus Notifications Specification.
Examples
Display a simple notification.
ntf := notify.NewNotification("Test Notification", "Just a test")
if _, err := ntf.Show(); err != nil {
return
}
Display a notification with an icon. Consult the Icon Naming Specification.
ntf := notify.NewNotification("Test Notification", "Just a test")
ntf.AppIcon = "network-wireless"
if _, err := ntf.Show(); err != nil {
return
}
Display a notification that never expires.
ntf := notify.NewNotification("Test Notification", "Just a test")
ntf.Timeout = notify.ExpiresNever
if _, err := ntf.Show(); err != nil {
return
}
Play a sound with the notification.
ntf := notify.NewNotification("Test Notification", "Just a test")
ntf.Hints = make(map[string]interface{})
ntf.Hints[notify.HintSoundFile] = "/home/my-username/sound.oga"
if _, err := ntf.Show(); err != nil {
return
}
# Functions
CloseNotification closes the notification if it exists using its id.
GetCapabilities returns the capabilities of the notification server.
GetServerInformation returns information about the notification server such as its name and version.
NewNotification creates a new notification object with some basic information.
SignalNotify sends notification signals to the channel, such as close or action.
# Constants
Notification object paths and interfaces.
Notification object paths and interfaces.
Notification object paths and interfaces.
Notification object paths and interfaces.
Notification Categories.
Notification Categories.
Notification Categories.
Notification Categories.
Notification Categories.
Notification Categories.
Notification Categories.
Notification Categories.
Notification Categories.
Notification Categories.
Notification Categories.
Notification Categories.
Notification Categories.
Notification Categories.
Notification Categories.
Notification Categories.
Notification Categories.
Notification Categories.
Notification Categories.
Notification Categories.
https://developer.gnome.org/notification-spec/#signals.
https://developer.gnome.org/notification-spec/#signals.
https://developer.gnome.org/notification-spec/#signals.
https://developer.gnome.org/notification-spec/#signals.
Notification object paths and interfaces.
Notification object paths and interfaces.
Notification object paths and interfaces.
Notification object paths and interfaces.
Notification expire timeout.
Notification expire timeout.
Hints.
Hints.
Hints.
Hints.
Hints.
Hints.
Hints.
Hints.
Hints.
Hints.
Hints.
Hints.
Hints.
https://developer.gnome.org/notification-spec/#signals.
Notification object paths and interfaces.
Notification object paths and interfaces.
Urgency Levels.
Urgency Levels.
Urgency Levels.
# Structs
Capabilities is a struct containing the capabilities of the notification server.
Notification is a struct which describes the notification to be displayed by the notification server.
ServerInformation is a struct containing information about the server such as its name and version.
No description provided by the author
# Type aliases
CloseReason is the reason why the notification was closed.