Versions in this module Expand all Collapse all v0 v0.1.0 May 12, 2024 Changes in this version + type Action struct + Action string + Label string + URL string + type HealthMonitor struct + Host string + ID string + Method string + Path string + type HealthMonitors int8 + const BetterUptime + const HealthChecksIO + func (hm HealthMonitors) Ping(endpoint string, body *bytes.Buffer) (string, error) + type Message struct + Actions []Action + ClickUrl *url.URL + Delay time.Duration + Email string + IconUrl *url.URL + Message string + Priority Priority + Tags []string + Title string + Topic string + func (message *Message) Marshal() ([]byte, error) + type MsgOptFunc func(*Message) + func WithActions(actions ...Action) MsgOptFunc + func WithClickUrl(clickUrl *url.URL) MsgOptFunc + func WithDelay(seconds int) MsgOptFunc + func WithEmail(email string) MsgOptFunc + func WithIcon(iconUrl *url.URL) MsgOptFunc + func WithPriority(priority Priority) MsgOptFunc + type Notifier struct + HealthMonitors []HealthMonitors + Host string + Token string + Topic string + func NewNotifier(host string, topic string, token string, healthMonitors ...HealthMonitors) (*Notifier, error) + func NewNotifierFromEnv() (*Notifier, error) + func (notifier *Notifier) Send(title string, body string, tags []string, opts ...MsgOptFunc) (string, error) + func (notifier *Notifier) SendHeartbeats(endpoint string, withLog bool) (string, error) + func (notifier *Notifier) SendMessage(message *Message) (string, error) + type Priority int8 + const Default + const High + const Low + const Max + const Min + const Unspecified