pub struct CloudApiClient { /* private fields */ }Implementations§
Source§impl CloudApiClient
impl CloudApiClient
pub fn new(api_url: &str, token: &str) -> Self
pub fn api_url(&self) -> &str
pub fn token(&self) -> &str
pub async fn get_user(&self) -> Result<UserMeResponse>
pub async fn list_tenants(&self) -> Result<Vec<Tenant>>
pub async fn get_plans(&self) -> Result<Vec<Plan>>
pub async fn create_checkout( &self, price_id: &str, region: &str, redirect_uri: Option<&str>, ) -> Result<CheckoutResponse>
Source§impl CloudApiClient
impl CloudApiClient
pub fn subscribe_provisioning_events( &self, tenant_id: &str, ) -> Pin<Box<dyn Stream<Item = Result<ProvisioningEvent>> + Send + '_>>
pub fn subscribe_checkout_events( &self, checkout_session_id: &str, ) -> Pin<Box<dyn Stream<Item = Result<CheckoutEvent>> + Send + '_>>
Source§impl CloudApiClient
impl CloudApiClient
pub async fn get_tenant_status(&self, tenant_id: &str) -> Result<TenantStatus>
pub async fn get_registry_token(&self, tenant_id: &str) -> Result<RegistryToken>
pub async fn deploy( &self, tenant_id: &str, image: &str, ) -> Result<DeployResponse>
pub async fn fetch_secrets(&self, secrets_url: &str) -> Result<TenantSecrets>
pub async fn delete_tenant(&self, tenant_id: &str) -> Result<()>
pub async fn restart_tenant(&self, tenant_id: &str) -> Result<StatusResponse>
pub async fn retry_provision(&self, tenant_id: &str) -> Result<StatusResponse>
pub async fn set_secrets( &self, tenant_id: &str, secrets: HashMap<String, String>, ) -> Result<Vec<String>>
pub async fn unset_secret(&self, tenant_id: &str, key: &str) -> Result<()>
pub async fn set_external_db_access( &self, tenant_id: &str, enabled: bool, ) -> Result<ExternalDbAccessResponse>
pub async fn rotate_credentials( &self, tenant_id: &str, ) -> Result<RotateCredentialsResponse>
pub async fn rotate_sync_token( &self, tenant_id: &str, ) -> Result<RotateSyncTokenResponse>
pub async fn list_secrets(&self, tenant_id: &str) -> Result<ListSecretsResponse>
pub async fn set_custom_domain( &self, tenant_id: &str, domain: &str, ) -> Result<CustomDomainResponse>
pub async fn get_custom_domain( &self, tenant_id: &str, ) -> Result<CustomDomainResponse>
pub async fn delete_custom_domain(&self, tenant_id: &str) -> Result<()>
pub async fn cancel_subscription(&self, tenant_id: &str) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CloudApiClient
impl !RefUnwindSafe for CloudApiClient
impl Send for CloudApiClient
impl Sync for CloudApiClient
impl Unpin for CloudApiClient
impl !UnwindSafe for CloudApiClient
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more