Skip to main content

Crate autumn_plugin_slack

Crate autumn_plugin_slack 

Source
Expand description

Slack plugin for autumn-web.

  • Inbound: signature-checked Events API, slash commands, and interactivity routes. Handlers by event type, command, action_id, or callback_id.
  • Outbound: a Web API client with retry rules, and response_url replies.
  • Operations: health indicator, Prometheus metrics, drain on shutdown.

See the README for setup.

Re-exports§

pub use config::SlackConfig;

Modules§

config
[slack] configuration.
payload
Typed Slack payloads and replies.
policy
Pure policy core. Verified with Verus in verus/policy.rs.
testing
Helpers for app tests.
transport
HTTP transport. Only this module does network I/O.

Structs§

AuthTest
Result of auth.test.
MessageRef
Where a message is: channel and timestamp.
SlackClient
Slack Web API client. A clone shares one connection pool.
SlackContext
What a handler gets besides the payload.
SlackHealth
Checks the bot token with auth.test.
SlackMetrics
Plugin metrics. Also a MetricsSource.
SlackPlugin
Slack plugin.
SlackRuntime
A started plugin.
Verifier
Checks Slack signatures. Holds the current and the previous secrets.

Enums§

SlackError
Plugin and client errors. Messages never hold a token or a secret.
VerifyError
Why a request failed verification.

Constants§

DEFAULT_BASE_PATH
Default base path of the Slack routes.
PLUGIN_NAME
Plugin name for duplicate detection.
SIGNATURE_HEADER
Header with the signature.
TIMESTAMP_HEADER
Header with the request timestamp (Unix seconds).

Type Aliases§

HandlerError
Error from a handler. Any error type converts with ?.
HandlerResult
Result of a handler.