pub struct Client { /* private fields */ }
Expand description
Client
provides a wrapper around the Infisical API that gives easy access to its endpoints
Implementations§
Source§impl Client
impl Client
Sourcepub fn new(api_key: &str) -> Result<Client>
pub fn new(api_key: &str) -> Result<Client>
Constructs a new Client
using the default Infisical Cloud API endpoint and reqwest Client
Sourcepub fn builder() -> ClientBuilder
pub fn builder() -> ClientBuilder
Creates a new ClientBuilder
to allow for Client
customization.
This is the same as ClientBuilder::new()
.
pub async fn get_user(&self) -> Result<User>
pub async fn get_my_organizations(&self) -> Result<Vec<Organization>>
pub async fn get_organization_memberships( &self, organization_id: &str, ) -> Result<Vec<OrganizationMembership>>
pub async fn update_organization_membership( &self, organization_id: &str, membership_id: &str, role: &str, ) -> Result<OrganizationMembership>
pub async fn delete_organization_membership( &self, organization_id: &str, membership_id: &str, ) -> Result<OrganizationMembership>
pub async fn get_organization_projects( &self, organization_id: &str, ) -> Result<Vec<Workspace>>
pub async fn get_project_memberships( &self, workspace_id: &str, ) -> Result<Vec<ProjectMembership>>
pub async fn update_project_membership( &self, workspace_id: &str, membership_id: &str, role: &str, ) -> Result<ProjectMembership>
pub async fn delete_project_membership( &self, workspace_id: &str, membership_id: &str, ) -> Result<ProjectMembership>
pub async fn get_encrypted_project_key( &self, workspace_id: &str, ) -> Result<GetProjectKeyResponse>
pub async fn get_decrypted_project_key( &self, workspace_id: &str, private_key: &str, ) -> Result<String>
pub async fn get_project_logs( &self, workspace_id: &str, user_id: &str, offset: &str, limit: &str, sort_by: &str, action_names: &str, ) -> Result<Vec<ProjectLog>>
pub async fn get_project_snapshots( &self, workspace_id: &str, offset: &str, limit: &str, ) -> Result<Vec<SecretSnapshot>>
pub async fn roll_back_to_snapshot( &self, workspace_id: &str, version: u8, ) -> Result<Vec<EncryptedSecret>>
pub async fn create_project_secrets( &self, workspace_id: &str, environment: &str, secrets: Vec<SecretToCreate>, ) -> Result<Vec<EncryptedSecret>>
pub async fn get_encrypted_project_secrets( &self, workspace_id: &str, environment: &str, ) -> Result<Vec<EncryptedSecret>>
pub async fn get_decrypted_project_secrets( &self, workspace_id: &str, environment: &str, private_key: &str, ) -> Result<Vec<DecryptedSecret>>
pub async fn get_user_decrypted_private_key( &self, infisical_secret: &str, ) -> Result<String>
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
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