netviper-talos 0.2.4

A Rust-based secure licensing system.
Documentation
//! Talos - A secure licensing system for Rust applications
//!
//! # Features
//!
//! Talos uses feature flags to allow you to include only what you need:
//!
//! - `server` - Server components (handlers, database). Enabled by default.
//! - `sqlite` - SQLite database backend. Enabled by default.
//! - `postgres` - PostgreSQL database backend.
//!
//! # Example
//!
//! ```toml
//! # Use defaults (server + sqlite)
//! talos = { git = "https://github.com/dmriding/talos" }
//!
//! # Client-only (no server components)
//! talos = { git = "https://github.com/dmriding/talos", default-features = false }
//!
//! # Server with PostgreSQL
//! talos = { git = "https://github.com/dmriding/talos", features = ["server", "postgres"] }
//! ```

// Core modules (always available)
pub mod config;
pub mod encryption;
pub mod errors;
pub mod hardware;
pub mod license_key;
pub mod tiers;

// Client-related modules (always available)
pub mod client {
    pub mod cache;
    pub mod encrypted_storage;
    pub mod errors;
    pub mod heartbeat;
    pub mod key_generation;
    pub mod license;
    pub mod responses;
    pub mod storage;

    // Re-export main types at client module level
    pub use cache::CachedValidation;
    pub use errors::{ClientApiError, ClientErrorCode};
    pub use license::License;
    pub use responses::{BindResult, FeatureResult, HeartbeatResult, ValidationResult};
    pub use storage::StorageKey;

    // Re-export for backwards compatibility
    pub use license as client;
}

// Server-related modules (requires "server" feature)
#[cfg(feature = "server")]
#[path = "server/mod.rs"]
pub mod server;

// Background jobs (requires "background-jobs" feature)
#[cfg(feature = "background-jobs")]
pub mod jobs;