notify

package
v0.0.197 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LEVEL_NOTHING = 0
	LEVEL_ERRORS  = 1
	LEVEL_DEFAULT = 2
	LEVEL_VERBOSE = 3
)

Variables

This section is empty.

Functions

func CanSend

func CanSend(level int64, notification Notification) bool

func Level

func Level() (int64, error)

--level=[0..3]

func NewPushover

func NewPushover() model.Notify

func NewTelegram

func NewTelegram() model.Notify

func Tweet

func Tweet(keys *TwitterKeys, status string)

Types

type Notification

type Notification int
const (
	ERROR Notification = iota
	INFO
	FILLED
	OPENED
	CANCELLED
)

type Pushover

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

func (*Pushover) PromptForKeys

func (self *Pushover) PromptForKeys(interactive, verify bool) (ok bool, err error)

func (*Pushover) SendMessage

func (self *Pushover) SendMessage(message interface{}, title string, frequency model.Frequency) error

type Services

type Services []model.Notify

func New

func New() *Services

func (*Services) Init

func (services *Services) Init(interactive, verify bool) (model.Notify, error)

type Telegram

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

func (*Telegram) PromptForKeys

func (self *Telegram) PromptForKeys(interactive, verify bool) (ok bool, err error)

func (*Telegram) SendMessage

func (self *Telegram) SendMessage(message interface{}, title string, frequency model.Frequency) error

type TwitterKeys

type TwitterKeys struct {
	ConsumerKey    string
	ConsumerSecret string
	AccessToken    string
	AccessSecret   string
}

func TwitterPromptForKeys

func TwitterPromptForKeys(interactive bool) (keys *TwitterKeys, err error)

Jump to

Keyboard shortcuts

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