alarm

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: May 31, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Alarm

func Alarm(message string)

Types

type Config

type Config struct {
	Type    string   `mapstructure:"type"`
	Targets []string `mapstructure:"targets"`
}

func ExampleConfig

func ExampleConfig() []*Config

type SMTPConfig

type SMTPConfig struct {
	Username string `mapstructure:"username"`
	Password string `mapstructure:"password"`
	From     string `mapstructure:"from"`
	Server   string `mapstructure:"Server"`
}

func SMTPExampleConfig

func SMTPExampleConfig() *SMTPConfig

func (*SMTPConfig) Send

func (cfg *SMTPConfig) Send(targets []string, message string)

type TelegramConfig

type TelegramConfig struct {
	Api   string `mapstructure:"api"`
	Token string `mapstructure:"token"`
}

func TelegramConfigExample

func TelegramConfigExample() *TelegramConfig

func (*TelegramConfig) Send

func (cfg *TelegramConfig) Send(targets []string, message string)

type WebHookConfig

type WebHookConfig struct {
	Method  string        `mapstructure:"method"`
	Timeout time.Duration `mapstructure:"timeout"`
}

func WebHookExampleConfig

func WebHookExampleConfig() *WebHookConfig

func (*WebHookConfig) Send

func (cfg *WebHookConfig) Send(targets []string, message string)

Jump to

Keyboard shortcuts

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