notification

package
v0.0.0-...-4be01c1 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const SettingsKey = "notifications"

Variables

View Source
var ErrInvalidNotifier = errors.New(`Invalid Notifier`)
View Source
var PassPolicy = core.PassPolicy

Functions

func SetSettings

func SetSettings(ctx context.Context, writer *metadata.AsyncWriter, settings Settings) error

Types

type Center

type Center struct {
	// contains filtered or unexported fields
}

func New

func New(reader metadata.Reader, translators translator.Translators, policy Policy, notifiers map[string]Notifier) *Center

func NewWithCustomLanguageFetcher

func NewWithCustomLanguageFetcher(translators translator.Translators, policy Policy, languageFetcher func() (language.Tag, error), notifiers map[string]Notifier) *Center

func (*Center) Notifier

func (c *Center) Notifier(typ string) (Notifier, error)

func (*Center) Notify

func (c *Center) Notify(notification core.Notification) error

type Notification

type Notification = core.Notification

type Notifier

type Notifier = core.Notifier

type Policies

type Policies = core.Policies

type Policy

type Policy = core.Policy

type Settings

type Settings struct {
	Language string `json:"language"`
}

func GetSettings

func GetSettings(ctx context.Context, reader metadata.Reader) (*Settings, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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