Skip to main content

Crate hookburn_slack

Crate hookburn_slack 

Source
Expand description

Slack webhook client for Hookburn.

This crate provides a client for sending messages to Slack via incoming webhooks. It implements the WebhookSender trait and can be used directly or through the unified hookburn crate.

§Example

use hookburn_slack::{SlackClient, SlackMessage};

#[tokio::main]
async fn main() -> Result<(), hookburn_slack::SlackError> {
    let client = SlackClient::new("https://hooks.slack.com/services/T/B/X")?;

    let message = SlackMessage::builder()
        .text("Hello from Hookburn!")
        .build()?;

    client.send(&message).await
}

Re-exports§

pub use client::SlackClient;
pub use client::SlackClientBuilder;
pub use error::SlackError;
pub use message::SlackActionsBlock;
pub use message::SlackAttachment;
pub use message::SlackAttachmentField;
pub use message::SlackBlock;
pub use message::SlackButton;
pub use message::SlackContextBlock;
pub use message::SlackElement;
pub use message::SlackHeaderBlock;
pub use message::SlackMessage;
pub use message::SlackMessageBuilder;
pub use message::SlackSectionBlock;
pub use message::SlackText;
pub use message::SlackTextType;
pub use service::SlackMessageConverter;
pub use service::SlackSenderWrapper;
pub use service::SlackService;

Modules§

client
HTTP client with retry support and timeout handling.
error
Common error types for the hookburn ecosystem.
message
Service-agnostic message types and conversion traits.
service
Service metadata and builder traits for service creation.

Functions§

register_service
Register the Slack service with the global registry.