pub struct InfisicalClient { /* private fields */ }
Expand description
Infisical client implementation
Implementations§
Source§impl InfisicalClient
impl InfisicalClient
Sourcepub async fn new(config: VaultConfig) -> Result<Self, VaultError>
pub async fn new(config: VaultConfig) -> Result<Self, VaultError>
Create a new Infisical client
Source§impl InfisicalClient
impl InfisicalClient
Sourcepub async fn set_secret_with_comment(
&self,
name: &str,
value: &str,
comment: Option<&str>,
) -> Result<(), VaultError>
pub async fn set_secret_with_comment( &self, name: &str, value: &str, comment: Option<&str>, ) -> Result<(), VaultError>
Set a secret with an optional comment
Sourcepub async fn get_secret_version(
&self,
name: &str,
version: u32,
) -> Result<(String, SecretMetadata), VaultError>
pub async fn get_secret_version( &self, name: &str, version: u32, ) -> Result<(String, SecretMetadata), VaultError>
Get a specific version of a secret
Sourcepub async fn list_secret_versions(
&self,
name: &str,
) -> Result<Vec<u32>, VaultError>
pub async fn list_secret_versions( &self, name: &str, ) -> Result<Vec<u32>, VaultError>
List all versions of a secret
Sourcepub async fn get_secret_comment(
&self,
name: &str,
) -> Result<Option<String>, VaultError>
pub async fn get_secret_comment( &self, name: &str, ) -> Result<Option<String>, VaultError>
Get the comment for a secret
Trait Implementations§
Source§impl VaultClient for InfisicalClient
impl VaultClient for InfisicalClient
Source§fn authenticate<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), VaultError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn authenticate<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), VaultError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Authenticate with the vault service
Source§fn get_secret<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String, VaultError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_secret<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String, VaultError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Retrieve a secret by name
Source§fn get_secret_with_metadata<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(String, SecretMetadata), VaultError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_secret_with_metadata<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(String, SecretMetadata), VaultError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Retrieve a secret with metadata
Source§fn list_secrets<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, VaultError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_secrets<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, VaultError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List available secrets
Source§fn set_secret<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), VaultError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn set_secret<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), VaultError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Store a secret (if supported)
Source§fn delete_secret<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), VaultError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_secret<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), VaultError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete a secret (if supported)
Source§fn is_authenticated<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn is_authenticated<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Check if the client is authenticated
Source§fn client_info(&self) -> VaultClientInfo
fn client_info(&self) -> VaultClientInfo
Get vault client information
Auto Trait Implementations§
impl Freeze for InfisicalClient
impl !RefUnwindSafe for InfisicalClient
impl Send for InfisicalClient
impl Sync for InfisicalClient
impl Unpin for InfisicalClient
impl !UnwindSafe for InfisicalClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more