Expand description
HiveHub.Cloud Internal SDK
This SDK provides internal communication between Hive services and the HiveHub.Cloud API. It handles authentication, quota management, user information retrieval, and usage updates.
§Example
use hivehub_internal_sdk::{HiveHubCloudClient, models::{ServiceType, AccessKeyPermission}};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Initialize the client
let client = HiveHubCloudClient::new(
"svc_api_key".to_string(),
"http://localhost:12000".to_string()
)?;
// Generate an access key for Vectorizer
let key = client.access_keys()
.generate_vectorizer_key("my-key", vec![AccessKeyPermission::Read, AccessKeyPermission::Write])
.await?;
println!("Generated key: {}", key.access_key);
Ok(())
}Re-exports§
pub use access_keys::AccessKeysClient;pub use client::HiveHubCloudClient;pub use config::ClientConfig;pub use error::HiveHubCloudError;
Modules§
Type Aliases§
- Result
- SDK Result type