ironflow_sdk/lib.rs
1//! # ironflow-sdk
2//!
3//! Type-safe Rust SDK for the [Ironflow](https://gitlab.com/ThomasTartrau/ironflow)
4//! workflow engine API. Generated from the OpenAPI specification via
5//! [progenitor](https://github.com/oxidecomputer/progenitor), with ergonomic
6//! wrappers for authentication and SSE event streaming.
7//!
8//! # Quick start
9//!
10//! ```no_run
11//! use ironflow_sdk::IronflowClient;
12//!
13//! # async fn example() -> Result<(), ironflow_sdk::Error> {
14//! let client = IronflowClient::new("https://ironflow.example.com", "my-api-key");
15//!
16//! let runs = client.list_runs().await?;
17//! for run in &runs.data {
18//! # let _ = run;
19//! }
20//! # Ok(())
21//! # }
22//! ```
23//!
24//! # Authentication
25//!
26//! The SDK uses Bearer token authentication. Pass your API key when creating
27//! the client -- it is attached to every request automatically.
28//!
29//! # SSE Event Streaming
30//!
31//! ```no_run
32//! use ironflow_sdk::IronflowClient;
33//! use futures_util::StreamExt;
34//!
35//! # async fn example() -> Result<(), ironflow_sdk::Error> {
36//! let client = IronflowClient::new("https://ironflow.example.com", "my-api-key");
37//! let mut stream = client.events(None, None).await?;
38//!
39//! while let Some(event) = stream.next().await {
40//! match event {
41//! Ok(ev) => { /* handle event */ }
42//! Err(e) => { /* handle error */ }
43//! }
44//! }
45//! # Ok(())
46//! # }
47//! ```
48
49mod artifact_methods;
50mod auth_methods;
51pub mod builder;
52pub mod client;
53mod delegation_methods;
54pub mod error;
55mod provider_account_methods;
56pub mod rate_limit;
57pub mod retry;
58mod schedule_methods;
59mod sender;
60mod signal_methods;
61#[doc(hidden)]
62#[allow(unused_imports, clippy::all)]
63mod generated {
64 include!(concat!(env!("OUT_DIR"), "/codegen.rs"));
65}
66pub mod sse;
67
68pub use builder::ClientBuilder;
69pub use client::IronflowClient;
70pub use error::Error;
71pub use generated::types;