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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
⌂ 换网址