Documentation
¶
Overview ¶
Package ntfy implements Ntfy as a shoutrrr service
Index ¶
Constants ¶
View Source
const (
Scheme = "ntfy"
)
Scheme is the identifying part of this service's configuration URL
Variables ¶
View Source
var Priority = &priorityVals{ Min: 1, Low: 2, Default: 3, High: 4, Max: 5, Enum: format.CreateEnumFormatter( []string{ "", "Min", "Low", "Default", "High", "Max", }, map[string]int{ "1": 1, "2": 2, "3": 3, "4": 4, "5": 5, "urgent": 5, }), }
Priority ...
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Title string `key:"title" default:"" desc:"Message title"`
Host string `url:"host" default:"ntfy.sh" desc:"Server hostname and port"`
Topic string `url:"path" required:"" desc:"Target topic name"`
Password string `url:"password" optional:"" desc:"Auth password"`
Username string `url:"user" optional:"" desc:"Auth username"`
Scheme string `key:"scheme" default:"https" desc:"Server protocol, http or https"`
Tags []string `key:"tags" optional:"" desc:"List of tags that may or not map to emojis"`
Priority priority `key:"priority" default:"default" desc:"Message priority with 1=min, 3=default and 5=max"`
Actions []string `` /* 139-byte string literal not displayed */
Click string `key:"click" optional:"" desc:"Website opened when notification is clicked"`
Attach string `key:"attach" optional:"" desc:"URL of an attachment, see attach via URL"`
Filename string `key:"filename" optional:"" desc:"File name of the attachment"`
Delay string `` /* 141-byte string literal not displayed */
Email string `key:"email" optional:"" desc:"E-mail address for e-mail notifications"`
Icon string `key:"icon" optional:"" desc:"URL to use as notification icon"`
Cache bool `key:"cache" default:"yes" desc:"Cache messages"`
Firebase bool `key:"firebase" default:"yes" desc:"Send to firebase"`
}
Config for use within the ntfy service
func (*Config) Enums ¶
func (*Config) Enums() map[string]types.EnumFormatter
Enums implements types.ServiceConfig
func (*Config) GetAPIURL ¶
GetAPIURL returns the API URL corresponding to the passed endpoint based on the configuration
type Service ¶
Service sends notifications Ntfy
func (*Service) Initialize ¶
Initialize loads ServiceConfig from configURL and sets logger for this Service
Click to show internal directories.
Click to hide internal directories.