Skip to main content

Crate shipper_webhook

Crate shipper_webhook 

Source
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§

WebhookConfig
Webhook configuration
WebhookPayload
Webhook payload

Enums§

WebhookType
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