Skip to main content

Crate codoseo_notify

Crate codoseo_notify 

Source
Expand description

Outgoing messages: email, Slack, Discord and signed webhooks, plus the encryption that keeps channel targets (webhook URLs and secrets) safe at rest.

Re-exports§

pub use crypto::ChannelKey;
pub use crypto::CryptoError;
pub use deliver::ChannelKind;
pub use deliver::ChannelTarget;
pub use deliver::DeliveryError;
pub use deliver::GuardedHttp;
pub use deliver::TargetError;
pub use deliver::deliver;
pub use email::Email;
pub use email::MailError;
pub use email::Mailer;
pub use message::AlertItem;
pub use message::AlertKind;
pub use message::AlertMessage;

Modules§

crypto
Encryption for channel targets (webhook URLs and their secrets).
deliver
Delivering an alert to one channel, and checking a channel’s target when it is saved.
digest
The weekly digest: one email per account, one block per monitored site. The caller (the app’s send_digest job) gathers the numbers into a DigestView; this module words them and renders the HTML and plain-text parts.
discord
Discord webhook JSON: a short content line and one embed, inside Discord’s limits (2000-character content, 256-character title, 4096-character description, 25 fields).
email
Sending email. The log mailer prints the message, which is what self-hosters without an email server use (spec section 8: “without an email server, login links are printed to the logs”); the SMTP mailer sends through SMTP_URL; tests capture messages.
message
The channel-neutral alert: what happened on a site, ready for any channel to render.
slack
Slack incoming-webhook JSON: a plain-text fallback plus blocks.
webhook
The generic webhook: stable JSON, signed with the channel’s secret.