zero_trust_sdk/lib.rs
1//! # Zero Trust SDK
2//!
3//! A powerful Rust SDK for interacting with Zero Trust Blockchain Databases.
4//!
5//! ## Features
6//!
7//! - **🔐 Authentication** - Secure JWT-based authentication
8//! - **📊 Database Operations** - Full CRUD operations with typed queries
9//! - **🔄 Data Migration** - Import/export with multiple format support
10//! - **⚡ Real-time Sync** - Live data synchronization from external sources
11//! - **🛡️ Type Safety** - Full Rust type safety with error handling
12//!
13//! ## Quick Start
14//!
15//! ```rust,no_run
16//! use zero_trust_sdk::{ZeroTrustClient, Config};
17//!
18//! #[tokio::main]
19//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
20//! // Initialize client
21//! let config = Config::new("https://api.zerotrust.com")?;
22//! let client = ZeroTrustClient::new(config).await?;
23//!
24//! // Authenticate
25//! client.auth().login("user@example.com", "password").await?;
26//!
27//! // Create database
28//! let db = client.databases().create("my-app-db").await?;
29//!
30//! // Execute query
31//! let results = client.databases()
32//! .query("my-app-db")
33//! .execute("SELECT * FROM users")
34//! .await?;
35//!
36//! Ok(())
37//! }
38//! ```
39
40#![deny(missing_docs)]
41#![warn(rust_2018_idioms)]
42
43pub mod auth;
44pub mod client;
45pub mod config;
46pub mod database;
47pub mod error;
48pub mod types;
49
50#[cfg(feature = "migration")]
51pub mod migration;
52
53#[cfg(feature = "sync")]
54pub mod sync;
55
56// Re-exports for convenience
57pub use client::ZeroTrustClient;
58pub use config::Config;
59pub use error::{Result, ZeroTrustError};
60
61/// Prelude module for common imports
62pub mod prelude {
63 pub use crate::{
64 ZeroTrustClient,
65 Config,
66 ZeroTrustError,
67 Result,
68 auth::AuthManager,
69 database::DatabaseManager,
70 };
71
72 #[cfg(feature = "migration")]
73 pub use crate::migration::MigrationManager;
74
75 #[cfg(feature = "sync")]
76 pub use crate::sync::SyncManager;
77}