Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateTopic ¶
func GenerateTopic() string
GenerateTopic returns a random ntfy topic like "wing-apple-brave-coral-drift" using 4 random words from the BIP39 wordlist joined by hyphens with a "wing-" prefix.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client sends push notifications via ntfy.sh (or a self-hosted ntfy server).
func New ¶
New creates a new ntfy client. Topic can be a bare topic name (expanded to https://ntfy.sh/{topic}) or a full URL (https://ntfy.example.com/mytopic). Events is a comma-separated list of event types to send (e.g. "attention,exit").
func (*Client) SendAttention ¶
SendAttention sends a "needs input" notification synchronously. Caller is responsible for running in a goroutine if fire-and-forget is desired.
Click to show internal directories.
Click to hide internal directories.