Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CustomNotifier ¶
type CustomNotifier struct { URL string `json:"url" validate:"url"` Method string `json:"http_method" validate:"oneof=GET HEAD POST PUT PATCH DELETE CONNECT OPTIONS TRACE"` Headers map[string]string `json:"http_headers"` Body string `json:"body"` ExpectHTTPCode int `json:"expect_http_code" validate:"min=100,max=599"` }
func (*CustomNotifier) Name ¶
func (c *CustomNotifier) Name() string
type DiscordNotifier ¶
type DiscordNotifier struct {
URL string `json:"url" validate:"url"`
}
func (*DiscordNotifier) Name ¶
func (d *DiscordNotifier) Name() string
type DiscordWebhook ¶
type Embed ¶
type Embed struct { Author Author `json:"author"` Title string `json:"title"` URL string `json:"url"` Description string `json:"description"` Color int64 `json:"color"` Fields []Field `json:"fields"` Thumbnail Image `json:"thumbnail"` Image Image `json:"image"` }
func AsDiscordEmbed ¶
type HealthCheck ¶
type HealthCheck struct {
URL string `json:"url" validate:"url"`
}
func (*HealthCheck) Name ¶
func (h *HealthCheck) Name() string
type Notifier ¶
func InitNotifier ¶
func InitNotifiers ¶
func NewCustomNotifier ¶
func NewCustomNotifier(msg json.RawMessage) (Notifier, error)
func NewDiscordNotifier ¶
func NewDiscordNotifier(msg json.RawMessage) (Notifier, error)
func NewHealthChecker ¶
func NewHealthChecker(msg json.RawMessage) (Notifier, error)
type NotifierFactory ¶
type NotifierFactory func(msg json.RawMessage) (Notifier, error)
Click to show internal directories.
Click to hide internal directories.