hnotify

package module
v0.0.0-...-2d6522d Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: MIT Imports: 10 Imported by: 0

README

hnotify

An abstraction for notifications.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Discord

type Discord struct {
	Name       string `yaml:"name"`
	Enabled    bool   `yaml:"enabled"`
	Username   string `yaml:"username"`
	WebhookURL string `yaml:"webhook_url"`
}

Discord struct

func GetDiscord

func GetDiscord(name string, path string) (*Discord, error)

func (*Discord) SendMessage

func (d *Discord) SendMessage(message string) error

func (*Discord) SendMessageEmbed

func (d *Discord) SendMessageEmbed(embed *discordgo.MessageEmbed) error

type Pushover

type Pushover struct {
	Name       string `yaml:"name"`
	Enabled    bool   `yaml:"enabled"`
	AppToken   string `yaml:"app_token"`
	UserToken  string `yaml:"user_token"`
	DeviceName string `yaml:"device_name"`
}

Pushover struct

func GetPushover

func GetPushover(name string, path string) (*Pushover, error)

func (*Pushover) SendGlance

func (p *Pushover) SendGlance(title string, text string, subText string, count int, percent int) (*pushover.Response, error)

func (*Pushover) SendMessage

func (p *Pushover) SendMessage(message string) error

Jump to

Keyboard shortcuts

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