Crate zero_trust_sdk

Crate zero_trust_sdk 

Source
Expand description

§Zero Trust SDK

A powerful Rust SDK for interacting with Zero Trust Blockchain Databases.

§Features

  • 🔐 Authentication - Secure JWT-based authentication
  • 📊 Database Operations - Full CRUD operations with typed queries
  • 🔄 Data Migration - Import/export with multiple format support
  • ⚡ Real-time Sync - Live data synchronization from external sources
  • 🛡️ Type Safety - Full Rust type safety with error handling

§Quick Start

use zero_trust_sdk::{ZeroTrustClient, Config};
 
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Initialize client
    let config = Config::new("https://api.zerotrust.com")?;
    let client = ZeroTrustClient::new(config).await?;
     
    // Authenticate
    client.auth().login("user@example.com", "password").await?;
     
    // Create database
    let db = client.databases().create("my-app-db").await?;
     
    // Execute query
    let results = client.databases()
        .query("my-app-db")
        .execute("SELECT * FROM users")
        .await?;
     
    Ok(())
}

Re-exports§

pub use client::ZeroTrustClient;
pub use config::Config;
pub use error::Result;
pub use error::ZeroTrustError;

Modules§

auth
Authentication management for the Zero Trust SDK
client
Main client for the Zero Trust SDK
config
Configuration management for the Zero Trust SDK
database
Database management for the Zero Trust SDK
error
Error types for the Zero Trust SDK
migration
Migration management for the Zero Trust SDK
prelude
Prelude module for common imports
sync
Synchronization management for the Zero Trust SDK
types
Common types used throughout the Zero Trust SDK