notif

package
v0.2.10 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DiscordNotifierOpts

type DiscordNotifierOpts struct {
	OAuth2Token string
	BotToken    string
	ChanelIDs   []string
}

type Notif

type Notif struct {
	Timeout time.Duration
	// contains filtered or unexported fields
}

func NewNotif

func NewNotif(timeout time.Duration, services map[string][]Notifier, disabled bool) *Notif

func (*Notif) Send

func (n *Notif) Send(service, subject, text string) error
generalized function to send a message

it probably should not be used directly but only internally in `UseService`

func (*Notif) UseService

func (n *Notif) UseService(service string) func(subject, text string) error

type Notifier

type Notifier = notify.Notifier

func NewDiscordNotifier

func NewDiscordNotifier(o *DiscordNotifierOpts) (Notifier, error)

func NewTelegramNotifier

func NewTelegramNotifier(token string, receivers ...int64) (Notifier, error)

Jump to

Keyboard shortcuts

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