Skip to main content

configvault_sdk/
lib.rs

1//! # ConfigVault Rust SDK
2//!
3//! Async Rust client for the [ConfigVault](https://github.com/sitien173/config-vault) API.
4//!
5//! ## Quick Start
6//!
7//! ```rust,no_run
8//! use configvault_sdk::ConfigVaultClient;
9//!
10//! #[tokio::main]
11//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
12//!     let client = ConfigVaultClient::new("http://localhost:5000", "your-api-key");
13//!
14//!     let value = client.get("production/database/url").await?;
15//!     println!("Got: {value}");
16//!
17//!     let exists = client.exists("production/database/url").await?;
18//!     println!("Exists: {exists}");
19//!
20//!     let configs = client.list("production").await?;
21//!     println!("Configs: {configs:?}");
22//!
23//!     let health = client.health().await?;
24//!     println!("Health: {}", health.status);
25//!
26//!     Ok(())
27//! }
28//! ```
29
30pub mod client;
31pub mod errors;
32pub mod models;
33pub mod watcher;
34
35// Convenient re-exports of the most commonly used types
36pub use client::ConfigVaultClient;
37pub use errors::ConfigVaultError;
38pub use models::{ConfigChangedEvent, ConfigListResponse, ConfigResponse, HealthResponse, SyncResponse};
39pub use watcher::ConfigWatcher;