pub struct Secrets<'a> { /* private fields */ }Expand description
/v1/secrets — metadata only; secret values never come back over this API.
Implementations§
Source§impl Secrets<'_>
impl Secrets<'_>
Sourcepub async fn list(&self) -> Result<Page<SecretMeta>>
pub async fn list(&self) -> Result<Page<SecretMeta>>
GET /v1/secrets.
Sourcepub async fn list_with(
&self,
query: &[(&str, &str)],
) -> Result<Page<SecretMeta>>
pub async fn list_with( &self, query: &[(&str, &str)], ) -> Result<Page<SecretMeta>>
GET /v1/secrets with query params (limit, search, category).
Sourcepub async fn set(&self, key: &str, value: &str) -> Result<SecretMeta>
pub async fn set(&self, key: &str, value: &str) -> Result<SecretMeta>
POST /v1/secrets — create a single-value secret. The plaintext is sealed
daemon-side; only metadata is returned.
Sourcepub async fn create(&self, body: Value) -> Result<SecretMeta>
pub async fn create(&self, body: Value) -> Result<SecretMeta>
POST /v1/secrets with a full body — single-value {name, value},
credential {name, username, password}, or card {name, card: {...}}
(plus optional description/category).
Sourcepub async fn get(&self, key: &str) -> Result<SecretMeta>
pub async fn get(&self, key: &str) -> Result<SecretMeta>
GET /v1/secrets/:key — metadata for one secret (never the value).
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Secrets<'a>
impl<'a> !UnwindSafe for Secrets<'a>
impl<'a> Freeze for Secrets<'a>
impl<'a> Send for Secrets<'a>
impl<'a> Sync for Secrets<'a>
impl<'a> Unpin for Secrets<'a>
impl<'a> UnsafeUnpin for Secrets<'a>
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