manifest

package
v0.97.8 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Overview

Package manifest holds shared notification template and rule type definitions. It is a leaf package so rules and template engines can import it without cycles.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Override

type Override struct {
	Channel  string `json:"channel"`
	Format   string `json:"format"`
	Template string `json:"template"`
}

Override defines a channel-specific template override.

type Rule

type Rule struct {
	ID        string     `json:"id"`
	Action    RuleAction `json:"action"`
	Match     RuleMatch  `json:"match"`
	Condition string     `json:"condition"`
	Priority  int        `json:"priority"`
	Params    RuleParams `json:"params"`
}

Rule defines a notification filtering or aggregation rule.

type RuleAction

type RuleAction string

RuleAction defines the action to take when a rule matches.

const (
	RuleActionThrottle  RuleAction = "throttle"
	RuleActionAggregate RuleAction = "aggregate"
	RuleActionMute      RuleAction = "mute"
	RuleActionDrop      RuleAction = "drop"
)

Rule action constants.

type RuleMatch

type RuleMatch struct {
	Event   string `json:"event"`
	Channel string `json:"channel"`
}

RuleMatch defines the event and channel matching criteria.

type RuleParams

type RuleParams struct {
	Window      string `json:"window"`
	Limit       int    `json:"limit"`
	DigestTplID string `json:"digest_template_id"`
	DelayedSend bool   `json:"delayed_send"`
}

RuleParams holds action-specific parameters.

type Template

type Template struct {
	ID              string     `json:"id"`
	Name            string     `json:"name"`
	Description     string     `json:"description"`
	DefaultFormat   string     `json:"default_format"`
	DefaultTemplate string     `json:"default_template"`
	Overrides       []Override `json:"overrides"`
}

Template defines a notification message template with optional per-channel overrides.

Jump to

Keyboard shortcuts

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