Expand description
Official Rust SDK for confish.
§Quick start
use confish::Client;
use serde::Deserialize;
#[derive(Deserialize, Debug)]
struct MyConfig {
site_name: String,
max_upload_mb: u32,
maintenance_mode: bool,
}
let client = Client::builder("env_id", "confish_sk_...").build()?;
let config: MyConfig = client.fetch().await?;
println!("{config:?}");Modules§
- webhook
- Webhook signature verification.
Structs§
- Action
- An action returned by the actions API.
- Action
Context - Passed to handlers so they can append timeline updates.
- Action
Update - A single timeline entry on an
Action. - Actions
- Wraps the
/c/{env}/actionsendpoints. - Client
- Asynchronous client for the confish API.
- Client
Builder - Builder for
Client. - Consume
Options - Configuration for
Actions::consume. - Logger
- Convenience wrapper around
Client::logwith one method per level.
Enums§
- Action
Status - An action’s lifecycle status.
- Error
- All errors the SDK can return.
- LogLevel
- Log severity levels accepted by the logging API.
Constants§
- DEFAULT_
BASE_ URL - The default API base URL (
https://confi.sh).
Type Aliases§
- Error
Callback - Callback invoked when listing fails, when ack fails (other than 409), or when a
handler returns an error. The second parameter is
Noneif the failure happened before an action was picked up (e.g. listing failed). - Result