Documentation
¶
Overview ¶
Package notify models transient notifications and TTL queues for viewkit applications.
Index ¶
- type Notification
- type Queue
- func (q *Queue) Active() bool
- func (q *Queue) Beat()
- func (q *Queue) Current() (Notification, bool)
- func (q *Queue) Len() int
- func (q *Queue) Prune(now time.Time)
- func (q *Queue) Push(n Notification, ttl int)
- func (q *Queue) PushFor(n Notification, now time.Time, d time.Duration)
- func (q *Queue) PushUntil(n Notification, expiry time.Time)
- func (q *Queue) Snapshot() []Notification
- type Tone
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Notification ¶
func Negative ¶
func Negative(title, message string) Notification
func Neutral ¶
func Neutral(title, message string) Notification
func Note ¶
func Note(tone Tone, title, message string) Notification
func Positive ¶
func Positive(title, message string) Notification
func Warning ¶
func Warning(title, message string) Notification
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
func (*Queue) Current ¶
func (q *Queue) Current() (Notification, bool)
func (*Queue) Push ¶
func (q *Queue) Push(n Notification, ttl int)
func (*Queue) PushUntil ¶ added in v0.0.2
func (q *Queue) PushUntil(n Notification, expiry time.Time)
func (*Queue) Snapshot ¶ added in v0.0.2
func (q *Queue) Snapshot() []Notification
Click to show internal directories.
Click to hide internal directories.