Expand description
§Gaia Client Library
A Rust client library for interacting with the Gaia secret management daemon.
§Features
- Secure mTLS communication with the Gaia daemon
- Read secrets from your application’s namespaces
- Access common secrets shared across clients
- Asynchronous API using Tokio
§Example
use gaia_client::{GaiaClient, GaiaClientConfig};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let config = GaiaClientConfig::new(
"localhost:50051",
"/etc/gaia/certs/ca.crt",
"/etc/gaia/certs/client.crt",
"/etc/gaia/certs/client.key",
);
let mut client = GaiaClient::connect(config).await?;
let secret = client.get_secret("production", "database_url").await?;
println!("Secret value: {}", secret.value);
Ok(())
}Re-exports§
pub use proto::gaia_client_client::GaiaClientClient;pub use proto::GetSecretRequest;pub use proto::Namespace;pub use proto::Secret;
Modules§
Structs§
- Gaia
Client - A client for interacting with the Gaia secret management daemon.
- Gaia
Client Config - Configuration for the Gaia client.
- Load
EnvOptions - Options for loading secrets into the environment.
Enums§
- Gaia
Error - Errors that can occur when using the Gaia client.
Type Aliases§
- Result
- Result type alias for Gaia client operations.