Documentation ¶
Index ¶
Constants ¶
View Source
const ( UnknownLevel = iota InfoLevel WarnLevel ErrorLevel CriticalLevel )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Nma ¶
type Nma struct { ApiKey string // contains filtered or unexported fields }
NMA - NotifyMyAndroid
func (*Nma) Dispatch ¶
func (self *Nma) Dispatch(note Notification)
type Notification ¶
type Notification struct { Source string `json:",omitempty"` SourceUuid string `json:",omitempty"` Level NotificationLevel Message string }
func NewNotification ¶
func NewNotification(level NotificationLevel, message string) *Notification
type NotificationLevel ¶
type NotificationLevel uint8
func NewNotificationLevel ¶
func NewNotificationLevel(level string) NotificationLevel
func (NotificationLevel) MarshalJSON ¶
func (l NotificationLevel) MarshalJSON() ([]byte, error)
func (NotificationLevel) String ¶
func (level NotificationLevel) String() string
func (*NotificationLevel) UnmarshalJSON ¶
func (l *NotificationLevel) UnmarshalJSON(data []byte) error
type Router ¶
type Router interface { Dispatch(msg Notification) Send(data interface{}) }
type Smtp ¶
type Smtp struct { Server string `default:localhost` Username string Password string Port int `default:25` Sender string `default:stampzilla` To string `default:stampzilla` InsecureSkipVerify bool }
func (*Smtp) Dispatch ¶
func (self *Smtp) Dispatch(note Notification)
type Transport ¶
type Transport interface { Start() Dispatch(note Notification) Stop() }
Click to show internal directories.
Click to hide internal directories.