notify

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package notify delivers events to the terminal, a webhook, and/or an arbitrary command, selected by configuration. It is intentionally simple.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Level   string         `json:"level"` // info | warn | error | success
	Title   string         `json:"title"`
	Message string         `json:"message,omitempty"`
	PRURL   string         `json:"pr_url,omitempty"`
	Checks  []domain.Check `json:"checks,omitempty"`
}

Event is one notification.

type Notifier

type Notifier interface {
	Notify(ctx context.Context, e Event) error
}

Notifier delivers events.

func Multi

func Multi(ns ...Notifier) Notifier

Multi fans out to several notifiers, returning the first error (best-effort).

func New

New builds a Notifier from config. The terminal channel is always available; when notifications are disabled, only the terminal is used.

Jump to

Keyboard shortcuts

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