Versions in this module Expand all Collapse all v0 v0.1.0 Aug 31, 2022 Changes in this version + const NoMatchingAppsWhenRemoveErrorFormat + const NoMatchingTagsWhenRemoveErrorFormat + const NoMatchingUsersWhenRemoveErrorFormat + const NoTagsWhenSendErrorFormat + const NoUserWhenBroadcastErrorMessage + const NoUsersInTagsWhenSendErrorFormat + type App struct + CommandChan chan Command + ID string + IconURI string + Name string + func NewApp(id, name, iconURI string, commandHandler CommandHandler) *App + func (a *App) AddTag(tag *Tag) + func (a *App) GetTags() []*Tag + func (a *App) RemoveTag(name string) error + func (a *App) Send(notification Notification) error + type Command struct + type CommandHandler interface + HandleCommand func(command Command) + type Notification struct + App *App + ArchiveURI string + Body string + ExtURI string + ID string + ReadURI string + Subtitle string + Timestamp time.Time + Title string + Urgency Urgency + type NotificationBroadcaster interface + Broadcast func(notification Notification) + RegisterClient func(connection interface{}) + type NotificationRepository interface + GetLastNotifications func(n int) []Notification + GetNotificationCount func() int + GetNotifications func(from, to int) []Notification + SaveNotification func(notification Notification) + type SendError struct + Tags []*Tag + func (e *SendError) Error() string + type Tag struct + Apps []*App + Name string + NotificationChan chan Notification + Users []*User + func NewTag(name string) *Tag + type Urgency int + const Fatal + const High + const Info + const Low + const Medium + func (u Urgency) ShortString() string + func (u Urgency) String() string + type User struct + ID string + NotificationChan chan Notification + Tags []*Tag + Username string + func NewUser(id, username string, repo NotificationRepository, ...) *User + func (u *User) GetLastNotifications(n int) []Notification + func (u *User) GetNotificationCount() int + func (u *User) GetNotifications(from int, to int) []Notification + func (u *User) Receive(notification Notification) + func (u *User) Respond(notification Notification, command Command) + func (u *User) SubscribeToTag(tag *Tag) + func (u *User) UnsubscribeFromTag(name string) error