Gotify
Gotify
Section titled “Gotify”Send notifications to a Gotify server via the push message API.
URL format: gotify://<host>[:<port>]/<token>
Query parameters
Section titled “Query parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
title | string | (empty) | Message title shown in the Gotify client. |
priority | integer | 0 | Message priority sent to Gotify. |
disable_tls | bool | false | Use plain HTTP instead of HTTPS. |
Examples
Section titled “Examples”Minimal — message only
Section titled “Minimal — message only”use buzzrs::buzz;
#[tokio::main]async fn main() { buzz!("gotify://push.example.com/AszT3Hxyz", "Deployment finished.");}title — set a message title
Section titled “title — set a message title”buzz!( "gotify://push.example.com/AszT3Hxyz?title=Deployment", "Service restarted successfully.");priority — set message priority
Section titled “priority — set message priority”buzz!( "gotify://push.example.com/AszT3Hxyz?priority=7", "Disk usage above 90%.");disable_tls — use HTTP instead of HTTPS
Section titled “disable_tls — use HTTP instead of HTTPS”buzz!( "gotify://internal.lan:8080/AszT3Hxyz?disable_tls=true", "Internal alert.");All parameters combined
Section titled “All parameters combined”buzz!( "gotify://push.example.com/AszT3Hxyz?title=Ops+Alert&priority=8&disable_tls=false", "Database backup completed.");Lower-level API
Section titled “Lower-level API”use buzzrs::Buzz;
#[tokio::main]async fn main() -> anyhow::Result<()> { let buzz = Buzz::new(); let service = buzz.build_service( "gotify://push.example.com/AszT3Hxyz?title=Ops+Alert&priority=8", )?; service.send("Database backup completed.").await?; Ok(())}Sync (requires no_async feature)
Section titled “Sync (requires no_async feature)”use buzzrs::buzz_sync;
fn main() { buzz_sync!( "gotify://push.example.com/AszT3Hxyz?title=Ops+Alert&priority=5", "Cron job finished." );}