hivehub_internal_sdk/
lib.rs

1//! HiveHub.Cloud Internal SDK
2//!
3//! This SDK provides internal communication between Hive services and the HiveHub.Cloud API.
4//! It handles authentication, quota management, user information retrieval, and usage updates.
5//!
6//! # Example
7//! ```no_run
8//! use hivehub_internal_sdk::{HiveHubCloudClient, models::{ServiceType, AccessKeyPermission}};
9//!
10//! #[tokio::main]
11//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
12//!     // Initialize the client
13//!     let client = HiveHubCloudClient::new(
14//!         "svc_api_key".to_string(),
15//!         "http://localhost:12000".to_string()
16//!     )?;
17//!
18//!     // Generate an access key for Vectorizer
19//!     let key = client.access_keys()
20//!         .generate_vectorizer_key("my-key", vec![AccessKeyPermission::Read, AccessKeyPermission::Write])
21//!         .await?;
22//!
23//!     println!("Generated key: {}", key.access_key);
24//!     Ok(())
25//! }
26//! ```
27
28pub mod access_keys;
29pub mod client;
30pub mod config;
31pub mod error;
32pub mod models;
33
34// Service modules
35pub mod lesstokens;
36pub mod nexus;
37pub mod synap;
38pub mod vectorizer;
39
40// Re-exports
41pub use access_keys::AccessKeysClient;
42pub use client::HiveHubCloudClient;
43pub use config::ClientConfig;
44pub use error::HiveHubCloudError;
45
46/// SDK Result type
47pub type Result<T> = std::result::Result<T, HiveHubCloudError>;