pub trait Store:
RunStore
+ UserStore
+ ApiKeyStore
+ SecretStore { }Expand description
Unified storage abstraction combining all store capabilities.
Implementors provide runs, steps, users, API keys, and secrets through a single type. Pick one backend (in-memory or PostgreSQL) and it handles everything.
Both InMemoryStore and
PostgresStore implement this trait.
§Examples
use std::sync::Arc;
use ironflow_store::prelude::*;
let store: Arc<dyn Store> = Arc::new(InMemoryStore::new());
// All capabilities through one reference
let _run = store.create_run(NewRun {
workflow_name: "deploy".to_string(),
trigger: TriggerKind::Manual,
payload: serde_json::json!({}),
max_retries: 3,
}).await?;
let _users = store.count_users().await?;