notify

package
v0.0.0-...-eaf417d Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NotificationWorker

func NotificationWorker(conf config.NotificationConfig, notifications <-chan Notification)

Types

type ContractNotification

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

func NewContractNotification

func NewContractNotification(c *api.ContractProperties) (*ContractNotification, error)

func (ContractNotification) Message

func (n ContractNotification) Message() string

func (ContractNotification) NotifierParams

func (n ContractNotification) NotifierParams(notifierId string) map[string]interface{}

func (ContractNotification) Timestamp

func (n ContractNotification) Timestamp() time.Time

func (ContractNotification) Title

func (n ContractNotification) Title() string

func (ContractNotification) URL

func (n ContractNotification) URL() string

type Notification

type Notification interface {
	Title() string
	Message() string
	URL() string
	Timestamp() time.Time
	// Returns notifier-specific parameters.
	NotifierParams(notifierId string) map[string]interface{}
}

type Notifier

type Notifier interface {
	Notify(m Notification) error
}

func NewPushoverNotifier

func NewPushoverNotifier(c config.NotificationConfig) Notifier

type PushoverSound

type PushoverSound string
const (
	PushoverSoundUserDefault  PushoverSound = ""
	PushoverSoundPushover     PushoverSound = "pushover"
	PushoverSoundBike         PushoverSound = "bike"
	PushoverSoundBugle        PushoverSound = "bugle"
	PushoverSoundCashRegister PushoverSound = "cashregister"
	PushoverSoundClassical    PushoverSound = "classical"
	PushoverSoundCosmic       PushoverSound = "cosmic"
	PushoverSoundFalling      PushoverSound = "falling"
	PushoverSoundGamelan      PushoverSound = "gamelan"
	PushoverSoundIncoming     PushoverSound = "incoming"
	PushoverSoundIntermission PushoverSound = "intermission"
	PushoverSoundMagic        PushoverSound = "magic"
	PushoverSoundMechanical   PushoverSound = "mechanical"
	PushoverSoundPianobar     PushoverSound = "pianobar"
	PushoverSoundSiren        PushoverSound = "siren"
	PushoverSoundSpaceAlarm   PushoverSound = "spacealarm"
	PushoverSoundTugBoat      PushoverSound = "tugboat"
	PushoverSoundAlien        PushoverSound = "alien"
	PushoverSoundClimb        PushoverSound = "climb"
	PushoverSoundPersistent   PushoverSound = "persistent"
	PushoverSoundEcho         PushoverSound = "echo"
	PushoverSoundUpDown       PushoverSound = "updown"
	PushoverSoundVibrate      PushoverSound = "vibrate"
	PushoverSoundNone         PushoverSound = "none"
)

Jump to

Keyboard shortcuts

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