Skip to content

Gotify

Send notifications to a Gotify server via the push message API.

URL format: gotify://<host>[:<port>]/<token>

ParameterTypeDefaultDescription
titlestring(empty)Message title shown in the Gotify client.
priorityinteger0Message priority sent to Gotify.
disable_tlsboolfalseUse plain HTTP instead of HTTPS.
use buzzrs::buzz;
#[tokio::main]
async fn main() {
buzz!("gotify://push.example.com/AszT3Hxyz", "Deployment finished.");
}
buzz!(
"gotify://push.example.com/AszT3Hxyz?title=Deployment",
"Service restarted successfully."
);
buzz!(
"gotify://push.example.com/AszT3Hxyz?priority=7",
"Disk usage above 90%."
);
buzz!(
"gotify://internal.lan:8080/AszT3Hxyz?disable_tls=true",
"Internal alert."
);
buzz!(
"gotify://push.example.com/AszT3Hxyz?title=Ops+Alert&priority=8&disable_tls=false",
"Database backup completed."
);
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(())
}
use buzzrs::buzz_sync;
fn main() {
buzz_sync!(
"gotify://push.example.com/AszT3Hxyz?title=Ops+Alert&priority=5",
"Cron job finished."
);
}