notifier

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDiscordMissingConfig            = errors.New("missing discord config")
	ErrDiscordFormatMissingPlaceholder = errors.New("{{message}} placeholder is missing from messageFormat")
)
View Source
var (
	ErrSlackMissingConfig = errors.New("missing slack config")
)

Functions

func Notify

func Notify(msg string) error

Types

type DiscordNotifier

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

func (*DiscordNotifier) Notify

func (n *DiscordNotifier) Notify(ctx context.Context, msg string) error

type Notifier

type Notifier interface {
	Notify(ctx context.Context, message string) error
}

func NewDiscordNotifier

func NewDiscordNotifier() Notifier

func NewSlackNotifier added in v1.3.0

func NewSlackNotifier() Notifier

func NewSystemNotifier

func NewSystemNotifier() Notifier

type SlackNotifier added in v1.3.0

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

func (*SlackNotifier) Notify added in v1.3.0

func (n *SlackNotifier) Notify(ctx context.Context, msg string) error

type SystemNotifier

type SystemNotifier struct{}

func (*SystemNotifier) Notify

func (n *SystemNotifier) Notify(ctx context.Context, msg string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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