Expand description
Webhook notifications for shipper.
This crate provides webhook notification support for publish events, supporting Slack, Discord, and generic webhooks.
§Example
ⓘ
use shipper_webhook::{WebhookConfig, send_webhook, WebhookPayload};
let config = WebhookConfig {
url: "https://hooks.slack.com/services/...".to_string(),
webhook_type: WebhookType::Slack,
};
let payload = WebhookPayload {
message: "Published my-crate@1.0.0".to_string(),
..Default::default()
};
send_webhook(&config, &payload).expect("send");Structs§
- Webhook
Config - Webhook configuration
- Webhook
Payload - Webhook payload
Enums§
- Webhook
Type - Webhook type
Functions§
- publish_
failure_ payload - Create a failure payload for a failed publish
- publish_
success_ payload - Create a success payload for a published package
- send_
webhook - Send a webhook notification
- send_
webhook_ async - Send a webhook notification asynchronously