pub struct SpacesApi<'a> { /* private fields */ }Implementations§
Source§impl<'a> SpacesApi<'a>
impl<'a> SpacesApi<'a>
Sourcepub async fn memberships(
&self,
page: u32,
limit: u32,
) -> Result<Vec<Membership>>
pub async fn memberships( &self, page: u32, limit: u32, ) -> Result<Vec<Membership>>
GET /api/v1/user/memberships — the spaces the caller belongs to.
Sourcepub async fn secrets(
&self,
space: &str,
query: Option<&str>,
page: u32,
limit: u32,
) -> Result<Vec<SpaceSecret>>
pub async fn secrets( &self, space: &str, query: Option<&str>, page: u32, limit: u32, ) -> Result<Vec<SpaceSecret>>
GET /api/v1/spaces/{space_ref}/secrets
Sourcepub async fn secret(&self, space: &str, identifier: &str) -> Result<SpaceSecret>
pub async fn secret(&self, space: &str, identifier: &str) -> Result<SpaceSecret>
GET /api/v1/secrets/{secret_ref}
Sourcepub async fn create_secret(
&self,
space: &str,
identifier: &str,
data: &str,
description: Option<&str>,
) -> Result<SpaceSecret>
pub async fn create_secret( &self, space: &str, identifier: &str, data: &str, description: Option<&str>, ) -> Result<SpaceSecret>
POST /api/v1/secrets
Sourcepub async fn update_secret(
&self,
space: &str,
identifier: &str,
data: &str,
description: Option<&str>,
) -> Result<SpaceSecret>
pub async fn update_secret( &self, space: &str, identifier: &str, data: &str, description: Option<&str>, ) -> Result<SpaceSecret>
PATCH /api/v1/secrets/{secret_ref}
Sourcepub async fn delete_secret(&self, space: &str, identifier: &str) -> Result<()>
pub async fn delete_secret(&self, space: &str, identifier: &str) -> Result<()>
DELETE /api/v1/secrets/{secret_ref}
Sourcepub async fn public_keys(&self, page: u32, limit: u32) -> Result<Vec<PublicKey>>
pub async fn public_keys(&self, page: u32, limit: u32) -> Result<Vec<PublicKey>>
GET /api/v1/user/keys
Sourcepub async fn add_public_key(
&self,
identifier: &str,
content: &str,
) -> Result<PublicKey>
pub async fn add_public_key( &self, identifier: &str, content: &str, ) -> Result<PublicKey>
POST /api/v1/user/keys
Sourcepub async fn delete_public_key(&self, identifier: &str) -> Result<()>
pub async fn delete_public_key(&self, identifier: &str) -> Result<()>
DELETE /api/v1/user/keys/{public_key_identifier}
Sourcepub async fn system_config(&self) -> Result<SystemConfig>
pub async fn system_config(&self) -> Result<SystemConfig>
GET /api/v1/system/config
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for SpacesApi<'a>
impl<'a> !UnwindSafe for SpacesApi<'a>
impl<'a> Forget for SpacesApi<'a>
impl<'a> Freeze for SpacesApi<'a>
impl<'a> Send for SpacesApi<'a>
impl<'a> Sync for SpacesApi<'a>
impl<'a> Unpin for SpacesApi<'a>
impl<'a> UnsafeUnpin for SpacesApi<'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