notify

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package notify provides functionality for sending notifications

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NotificationPayload

type NotificationPayload struct {
	Title     string `json:"title"`
	Body      string `json:"body"`
	URL       string `json:"url"`
	MonitorID int64  `json:"monitorId"`
}

type Notifier

type Notifier struct {
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, conn *db.Connection) *Notifier

func (*Notifier) SendMonitorDownNotification

func (n *Notifier) SendMonitorDownNotification(
	ctx context.Context,
	monitor *db.Monitor,
	reason string,
) error

SendMonitorDownNotification sends push notifications to all subscribers when a monitor goes down

func (*Notifier) SendMonitorUpNotification

func (n *Notifier) SendMonitorUpNotification(ctx context.Context, monitor *db.Monitor) error

SendMonitorUpNotification sends notifications when a monitor comes back up

Jump to

Keyboard shortcuts

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