notify

package
v0.31.1 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Level

type Level string

Level represents the severity of a notification.

const (
	LevelInfo    Level = "info"
	LevelWarning Level = "warning"
	LevelError   Level = "error"
)

type Notification

type Notification struct {
	ID        int64
	Level     Level
	Message   string
	CreatedAt time.Time
}

Notification represents a single notification event.

type Store

type Store interface {
	Save(ctx context.Context, n Notification) (int64, error)
	List(ctx context.Context) ([]Notification, error)
	Clear(ctx context.Context) error
	Count(ctx context.Context) (int64, error)
}

Store persists notifications to durable storage.

Jump to

Keyboard shortcuts

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