notify

package
v0.0.0-...-b234b5e Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	Notify(ctx context.Context, ev *orgo.HeadingNode) error
}

Backend defines the interface for the Notification Backends.

func NewBackend

func NewBackend(c Config) Backend

type Config

type Config struct {
	Type       string      `toml:"type"`
	Keywords   []string    `toml:"keywords"`
	Tags       []string    `toml:"tags"`
	NtfyConfig *NtfyConfig `toml:"ntfy"`
}

type Filter

type Filter func(n *orgo.HeadingNode) bool

func TagFilter

func TagFilter(tags []string) Filter

func TodoKeywordFilter

func TodoKeywordFilter(kw []string) Filter

type NtfyConfig

type NtfyConfig struct {
	Address string `toml:"address"`
	Token   string `toml:"token"`
	Topic   string `toml:"topic"`
}

Jump to

Keyboard shortcuts

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