pub struct InMemorySecretStore { /* private fields */ }Expand description
In-memory secret store (NOT for production - secrets should be encrypted at rest)
Implementations§
Trait Implementations§
Source§impl Default for InMemorySecretStore
impl Default for InMemorySecretStore
Source§impl SecretStore for InMemorySecretStore
impl SecretStore for InMemorySecretStore
Source§fn set<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
tenant_id: &'life2 TenantId,
factor_id: &'life3 str,
secret_data: &'life4 [u8],
metadata: Value,
) -> Pin<Box<dyn Future<Output = Result<String, SecretError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn set<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
tenant_id: &'life2 TenantId,
factor_id: &'life3 str,
secret_data: &'life4 [u8],
metadata: Value,
) -> Pin<Box<dyn Future<Output = Result<String, SecretError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Store a secret (implementation handles encryption)
Source§fn get<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
tenant_id: &'life2 TenantId,
factor_id: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<Option<SecretRecord>, SecretError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn get<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
tenant_id: &'life2 TenantId,
factor_id: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<Option<SecretRecord>, SecretError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Retrieve a secret (implementation handles decryption)
Source§fn get_by_id<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<SecretRecord>, SecretError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_by_id<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<SecretRecord>, SecretError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get a specific secret by ID
Source§fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), SecretError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), SecretError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete a secret
Source§fn list<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
tenant_id: &'life2 TenantId,
factor_id: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<Vec<SecretRecord>, SecretError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn list<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
tenant_id: &'life2 TenantId,
factor_id: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<Vec<SecretRecord>, SecretError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
List all secrets for a user/tenant/factor combination
Source§fn rotate_encryption<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<usize, SecretError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn rotate_encryption<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<usize, SecretError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Rotate encryption keys (for implementations that support it)
Auto Trait Implementations§
impl !RefUnwindSafe for InMemorySecretStore
impl !UnwindSafe for InMemorySecretStore
impl Freeze for InMemorySecretStore
impl Send for InMemorySecretStore
impl Sync for InMemorySecretStore
impl Unpin for InMemorySecretStore
impl UnsafeUnpin for InMemorySecretStore
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