Expand description
§astraguard
Official AstraGuard SDK for Rust.
§Quick start
use astraguard::AstraGuardClient;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = AstraGuardClient::new("https://api.astraguard.io", "your-product-id")?;
let details = client.verify_license("XXXX-XXXX-XXXX-XXXX").await?;
if details.raw.valid {
println!("License valid!");
}
Ok(())
}Re-exports§
pub use client::AstraGuardClient;pub use types::AstraGuardError;pub use types::LicenseDetails;pub use types::LicenseResponse;pub use types::Result;pub use types::UpdateCheckResponse;
Modules§
- client
- The main
AstraGuardClientand its license-validation methods. - types
- Public types used throughout the AstraGuard SDK.