notifyapi

package
v1.118.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package notifyapi serves the /api/v1/admin/notifications surface: the delivery history the notification queue leaves behind, and the per-status counts that give an admin an at-a-glance read on whether email is working.

It is a decomposition seam of pkg/admin (which sits at its package size budget); the parent registers it on the admin mux, so every route here is already behind the admin persona gate. Admin is unrestricted by design: the rows carry the recipient address, the SMTP error text, and the attempt count, because an admin diagnosing a failed delivery needs all three.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(mux *http.ServeMux, cfg Config)

Register mounts the notification routes on mux. Every route is read-only.

Types

type Config

type Config struct {
	// History reads the queue's delivery history.
	History HistoryStore
	// Retention is how long resolved rows survive the worker's purge. It is
	// reported to the UI so the tab can say plainly that it shows recent
	// history rather than an archive. Zero omits the claim rather than
	// stating a window nothing enforces.
	Retention time.Duration
}

Config carries what the routes need. A nil History leaves them unregistered, which is the parent's cue to mount its feature-unavailable fallback.

type HistoryStore

type HistoryStore = notification.HistoryStore

HistoryStore reads the notification delivery history. Declared here as the seam's dependency (the auditapi pattern) and satisfied by notification.HistoryStore.

Jump to

Keyboard shortcuts

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