pub struct ShuttleApiClient {
pub client: ClientWithMiddleware,
pub api_url: String,
pub api_key: Option<String>,
}
Fields§
§client: ClientWithMiddleware
§api_url: String
§api_key: Option<String>
Implementations§
Source§impl ShuttleApiClient
impl ShuttleApiClient
pub fn new( api_url: String, api_key: Option<String>, headers: Option<HeaderMap>, ) -> Self
pub fn set_auth_bearer(&self, builder: RequestBuilder) -> RequestBuilder
pub async fn get_api_versions(&self) -> Result<VersionInfo>
pub async fn get_device_auth_ws( &self, ) -> Result<WebSocketStream<MaybeTlsStream<TcpStream>>>
pub async fn check_project_name(&self, project_name: &str) -> Result<bool>
pub async fn check_project_name_beta(&self, project_name: &str) -> Result<bool>
pub async fn get_current_user_beta(&self) -> Result<UserResponse>
pub async fn deploy( &self, project: &str, deployment_req: DeploymentRequest, ) -> Result<Response>
pub async fn deploy_beta( &self, project: &str, deployment_req: DeploymentRequestBeta, ) -> Result<DeploymentResponseBeta>
pub async fn upload_archive_beta( &self, project: &str, data: Vec<u8>, ) -> Result<UploadArchiveResponseBeta>
pub async fn redeploy_beta( &self, project: &str, deployment_id: &str, ) -> Result<DeploymentResponseBeta>
pub async fn stop_service(&self, project: &str) -> Result<Summary>
pub async fn stop_service_beta(&self, project: &str) -> Result<String>
pub async fn get_service(&self, project: &str) -> Result<Summary>
pub async fn get_service_resources( &self, project: &str, ) -> Result<Vec<Response>>
pub async fn get_service_resources_beta( &self, project: &str, ) -> Result<ResourceListResponseBeta>
pub async fn dump_service_resource( &self, project: &str, resource_type: &Type, ) -> Result<Vec<u8>>
pub async fn delete_service_resource( &self, project: &str, resource_type: &Type, ) -> Result<()>
pub async fn delete_service_resource_beta( &self, project: &str, resource_type: &Type, ) -> Result<String>
pub async fn provision_resource_beta( &self, project: &str, req: ProvisionResourceRequestBeta, ) -> Result<ResourceResponseBeta>
pub async fn get_secrets_beta( &self, project: &str, ) -> Result<ResourceResponseBeta>
pub async fn list_certificates_beta( &self, project: &str, ) -> Result<CertificateListResponse>
pub async fn add_certificate_beta( &self, project: &str, subject: String, ) -> Result<CertificateResponse>
pub async fn delete_certificate_beta( &self, project: &str, subject: String, ) -> Result<String>
pub async fn create_project( &self, project: &str, config: &Config, ) -> Result<Response>
pub async fn create_project_beta( &self, name: &str, ) -> Result<ProjectResponseBeta>
pub async fn clean_project(&self, project: &str) -> Result<String>
pub async fn get_project(&self, project: &str) -> Result<Response>
pub async fn get_project_beta( &self, project: &str, ) -> Result<ProjectResponseBeta>
pub async fn get_projects_list(&self) -> Result<Vec<Response>>
pub async fn get_projects_list_beta(&self) -> Result<ProjectListResponseBeta>
pub async fn update_project_beta( &self, project: &str, req: ProjectUpdateRequestBeta, ) -> Result<ProjectResponseBeta>
pub async fn stop_project(&self, project: &str) -> Result<Response>
pub async fn delete_project(&self, project: &str) -> Result<String>
pub async fn delete_project_beta(&self, project: &str) -> Result<String>
pub async fn get_teams_list(&self) -> Result<Vec<Response>>
pub async fn get_team_projects_list( &self, team_id: &str, ) -> Result<Vec<Response>>
pub async fn get_team_projects_list_beta( &self, team_id: &str, ) -> Result<ProjectListResponseBeta>
pub async fn get_logs( &self, project: &str, deployment_id: &str, range: LogsRange, ) -> Result<Vec<LogItem>>
pub async fn get_deployment_logs_beta( &self, project: &str, deployment_id: &str, ) -> Result<LogsResponseBeta>
pub async fn get_project_logs_beta( &self, project: &str, ) -> Result<LogsResponseBeta>
pub async fn get_logs_ws( &self, project: &str, deployment_id: &str, range: LogsRange, ) -> Result<WebSocketStream<MaybeTlsStream<TcpStream>>>
pub async fn get_deployments( &self, project: &str, page: u32, limit: u32, ) -> Result<Vec<Response>>
pub async fn get_deployments_beta( &self, project: &str, page: i32, per_page: i32, ) -> Result<DeploymentListResponseBeta>
pub async fn get_current_deployment_beta( &self, project: &str, ) -> Result<Option<DeploymentResponseBeta>>
pub async fn get_deployment_beta( &self, project: &str, deployment_id: &str, ) -> Result<DeploymentResponseBeta>
pub async fn get_deployment_details( &self, project: &str, deployment_id: &Uuid, ) -> Result<Response>
pub async fn reset_api_key(&self) -> Result<Response>
pub async fn ws_get( &self, path: String, ) -> Result<WebSocketStream<MaybeTlsStream<TcpStream>>>
pub async fn get<T: Serialize>( &self, path: impl AsRef<str>, body: Option<T>, ) -> Result<Response>
pub async fn get_json<R>(&self, path: impl AsRef<str>) -> Result<R>where
R: for<'de> Deserialize<'de>,
pub async fn get_json_with_body<R, T: Serialize>(
&self,
path: impl AsRef<str>,
body: T,
) -> Result<R>where
R: for<'de> Deserialize<'de>,
pub async fn post<T: Serialize>( &self, path: impl AsRef<str>, body: Option<T>, ) -> Result<Response>
pub async fn post_json<T: Serialize, R>(
&self,
path: impl AsRef<str>,
body: Option<T>,
) -> Result<R>where
R: for<'de> Deserialize<'de>,
pub async fn put<T: Serialize>( &self, path: impl AsRef<str>, body: Option<T>, ) -> Result<Response>
pub async fn put_json<T: Serialize, R>(
&self,
path: impl AsRef<str>,
body: Option<T>,
) -> Result<R>where
R: for<'de> Deserialize<'de>,
pub async fn delete<T: Serialize>( &self, path: impl AsRef<str>, body: Option<T>, ) -> Result<Response>
pub async fn delete_json<R>(&self, path: impl AsRef<str>) -> Result<R>where
R: for<'de> Deserialize<'de>,
pub async fn delete_json_with_body<R, T: Serialize>(
&self,
path: impl AsRef<str>,
body: T,
) -> Result<R>where
R: for<'de> Deserialize<'de>,
Trait Implementations§
Source§impl Clone for ShuttleApiClient
impl Clone for ShuttleApiClient
Source§fn clone(&self) -> ShuttleApiClient
fn clone(&self) -> ShuttleApiClient
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for ShuttleApiClient
impl !RefUnwindSafe for ShuttleApiClient
impl Send for ShuttleApiClient
impl Sync for ShuttleApiClient
impl Unpin for ShuttleApiClient
impl !UnwindSafe for ShuttleApiClient
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)