notify

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Factory = &NotifierFactory{
	notifiers: make(map[string]Notifier),
}

Functions

This section is empty.

Types

type ConsoleNotifier

type ConsoleNotifier struct {
}

func (*ConsoleNotifier) BeforeNotify

func (n *ConsoleNotifier) BeforeNotify()

func (*ConsoleNotifier) Info

func (n *ConsoleNotifier) Info() NotifierInfo

func (*ConsoleNotifier) Notify

func (n *ConsoleNotifier) Notify(title string, message string)

func (*ConsoleNotifier) NotifyItem

func (n *ConsoleNotifier) NotifyItem(item todo.Item)

type DesktopNotifier

type DesktopNotifier struct {
}

func (*DesktopNotifier) BeforeNotify

func (n *DesktopNotifier) BeforeNotify()

func (*DesktopNotifier) Info

func (n *DesktopNotifier) Info() NotifierInfo

func (*DesktopNotifier) Notify

func (n *DesktopNotifier) Notify(title string, message string)

func (*DesktopNotifier) NotifyItem

func (n *DesktopNotifier) NotifyItem(item todo.Item)

type Notifier

type Notifier interface {
	Notify(title string, message string)
	NotifyItem(item todo.Item)
	Info() NotifierInfo
	BeforeNotify()
}

type NotifierFactory

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

func (*NotifierFactory) Notifiers

func (n *NotifierFactory) Notifiers() []Notifier

func (*NotifierFactory) Register

func (n *NotifierFactory) Register(name string, notifier Notifier)

type NotifierInfo

type NotifierInfo struct {
	Name        string
	Description string
	Alias       string
	Enabled     bool
	Default     bool
}

Jump to

Keyboard shortcuts

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