Documentation ¶
Index ¶
- Constants
- func OverrideConfigs(cfg *map[string]interface{}, cmd *cobra.Command)
- func RegisterFlags(cmd ...*cobra.Command)
- func Send(cfg map[string]interface{}, title string, msg string, status *bool) error
- type BackendInterface
- type Line
- type LineConfig
- type Pushbullet
- type PushbulletConfig
- type Pushover
- type PushoverConfig
- type Slack
- type SlackConfig
- type Syslog
- type SyslogConfig
Constants ¶
View Source
const LINE_API_URL = "https://notify-api.line.me/api/notify"
View Source
const PUSHBULET_API_URL = "https://api.pushbullet.com/v2/pushes"
View Source
const PUSHOVER_API_TOKEN = "abughxjjtuofgt89bz21mibut67j5t"
View Source
const PUSHOVER_API_URL = "https://api.pushover.net/1/messages.json"
Variables ¶
This section is empty.
Functions ¶
func OverrideConfigs ¶
func RegisterFlags ¶
Types ¶
type BackendInterface ¶
type BackendInterface interface { GetConfig() interface{} Send(config interface{}, title string, message string, status *bool) error }
func NewLine ¶ added in v1.0.1
func NewLine() BackendInterface
func NewPushbullet ¶ added in v1.0.1
func NewPushbullet() BackendInterface
func NewPushover ¶ added in v1.0.1
func NewPushover() BackendInterface
func NewSlack ¶ added in v1.0.1
func NewSlack() BackendInterface
func NewSyslog ¶ added in v1.0.1
func NewSyslog() BackendInterface
type LineConfig ¶ added in v1.0.1
type LineConfig struct {
Token string `mapstructure:"token" validate:"required"`
}
type Pushbullet ¶ added in v1.0.1
type Pushbullet struct { }
func (*Pushbullet) GetConfig ¶ added in v1.0.1
func (*Pushbullet) GetConfig() interface{}
type PushbulletConfig ¶ added in v1.0.1
type PushbulletConfig struct {
Token string `mapstructure:"token" validate:"required"`
}
type PushoverConfig ¶ added in v1.0.1
type PushoverConfig struct { UserKey string `mapstructure:"user_key" validate:"required"` Device *string `mapstructure:"device" validate:"omitempty"` Priority *string `mapstructure:"priority" validate:"omitempty,oneof=emergency high normal low lowest"` Retry *int `mapstructure:"retry" validate:"omitempty,min=30"` Expire *int `mapstructure:"expire" validate:"omitempty,min=0,max=10800"` }
type SlackConfig ¶ added in v1.0.1
type SyslogConfig ¶ added in v1.0.1
Click to show internal directories.
Click to hide internal directories.