notifications

package
v0.1.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LocalLog = log.WithField("notify", "no")

LocalLog is used for logs that should never trigger notifications.

Functions

func GetTitle

func GetTitle(hostname string, tag string) string

GetTitle formats the title based on the passed hostname and tag

func NewNotifier

func NewNotifier() ty.Notifier

NewNotifier creates and returns a new Notifier, using global configuration.

Types

type Data

type Data struct {
	StaticData
	Entries []*log.Entry
	Report  t.Report
}

Data is the notification template data model

func (Data) MarshalJSON

func (d Data) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

type StaticData

type StaticData struct {
	Title string
	Host  string
}

StaticData is the part of the notification template data model set upon initialization

func GetTemplateData

func GetTemplateData() StaticData

GetTemplateData populates static data used by preview templates.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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