Versions in this module Expand all Collapse all v0 v0.5.0 Nov 24, 2026 Changes in this version + const Masked + const ModeAuto + const ModeLocal + const SendTimeout + const TypeAdded + const TypeDownloadProblem + const TypeDownloaded + const TypeGrabbed + const TypeHealthIssue + const TypeHealthOK + const TypeImportFailed + const TypeImported + const TypeTest + var ErrNotFound = errors.New("notify: channel not found") + var ErrUnknownKind = errors.New("notify: unknown channel type") + var Types = []TypeInfo + func DefaultTypes() []string + func KnownType(t string) bool + func Mask(kind string, settings json.RawMessage) json.RawMessage + func Merge(kind string, stored, incoming json.RawMessage) json.RawMessage + func SendOne(ctx context.Context, ch Channel, e Event) error + func Sign(secret string, body []byte) string + type Channel struct + Apps []string + Enabled bool + Events []string + ID string + Kind string + Name string + Settings json.RawMessage + func (c Channel) Wants(e Event) bool + type Event struct + App string + Fields map[string]string + ImageURL string + Level Level + Message string + Time time.Time + Title string + Type string + URL string + func TestEvent(app string) Event + func (e Event) Validate() error + type Field struct + Help string + Key string + Label string + Placeholder string + Required bool + Type FieldType + func (f Field) Secret() bool + type FieldType string + const FieldCheckbox + const FieldList + const FieldNumber + const FieldPassword + const FieldText + const FieldURL + type HealthWatcher struct + Check func(ctx context.Context) []Problem + Confirm int + Every time.Duration + Outbox *Outbox + func (w *HealthWatcher) Run(ctx context.Context) + type Hub interface + Channels func(ctx context.Context) (int, error) + Notify func(ctx context.Context, e Event) error + type Kind struct + Fields []Field + Help string + ID string + Name string + func Kinds() []Kind + type LegacyChannel struct + Enabled bool + Events []string + Kind string + Name string + Settings json.RawMessage + type Level string + const LevelError + const LevelInfo + const LevelSuccess + const LevelWarning + type Outbox struct + App string + HoldFor time.Duration + Hub func() Hub + Log *slog.Logger + RetryEvery time.Duration + Store *Store + func (o *Outbox) Deliver(ctx context.Context, e Event) Sent + func (o *Outbox) Held() int + func (o *Outbox) Publish(e Event) + func (o *Outbox) Recent() []Sent + func (o *Outbox) Route(ctx context.Context) Route + func (o *Outbox) Run(ctx context.Context) + type Problem struct + Key string + Level Level + Message string + type Result struct + ChannelID string + ChannelName string + Error string + func Send(ctx context.Context, channels []Channel, e Event) []Result + func (r Result) OK() bool + type Route struct + Mode string + PulseChannels int + PulseConnected bool + ViaPulse bool + type Sender interface + Send func(ctx context.Context, e Event) error + func New(kind string, settings json.RawMessage) (Sender, error) + type Sent struct + App string + Error string + Level Level + Pending bool + Results []Result + Time time.Time + Title string + Type string + Via string + type Store struct + func NewStore(ctx context.Context, db *sql.DB) (*Store, error) + func (s *Store) Count(ctx context.Context) (total, enabled int) + func (s *Store) Create(ctx context.Context, c Channel) (Channel, error) + func (s *Store) Delete(ctx context.Context, id string) error + func (s *Store) Get(ctx context.Context, id string) (Channel, error) + func (s *Store) HasEnabled(ctx context.Context) bool + func (s *Store) ImportLegacy(ctx context.Context, old []LegacyChannel) (imported int, skipped []string, err error) + func (s *Store) List(ctx context.Context) ([]Channel, error) + func (s *Store) Mode(ctx context.Context) string + func (s *Store) SetMode(ctx context.Context, mode string) error + func (s *Store) Update(ctx context.Context, id string, c Channel) (Channel, error) + type TypeInfo struct + Apps []string + Default bool + Description string + ID string + Label string