Documentation
¶
Overview ¶
Package ntfy is the notify adapter for ntfy, the push notification service (R-374, issue #50): ntfy.sh or a server of your own.
A topic is a channel, so this is a channel adapter and only subscriptions send to it (R-373). On ntfy.sh anyone who knows a topic's name can read it, which makes the name a credential: it is stored sealed, like a password.
Index ¶
- Constants
- func Info() api.KindInfo
- type Adapter
- func (a *Adapter) Capabilities() api.NotifyCapabilities
- func (a *Adapter) Category() api.Category
- func (a *Adapter) Configure(_ context.Context, raw json.RawMessage) error
- func (a *Adapter) HealthCheck(context.Context) error
- func (a *Adapter) Kind() string
- func (a *Adapter) Notify(ctx context.Context, n api.Notification) error
- type Config
- type Credentials
Constants ¶
View Source
const DefaultServer = "https://ntfy.sh"
DefaultServer is the public ntfy server.
View Source
const Kind = "ntfy"
Kind is the adapter's kind string.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Adapter ¶
type Adapter struct {
notifykit.Unconnected
// contains filtered or unexported fields
}
Adapter publishes to one topic.
func (*Adapter) Capabilities ¶
func (a *Adapter) Capabilities() api.NotifyCapabilities
Capabilities: a channel, not people.
func (*Adapter) HealthCheck ¶
HealthCheck succeeds once configured. Publishing to check would be the thing it checks for.
Click to show internal directories.
Click to hide internal directories.