pub struct UploadServiceAsyncClient<T>(/* private fields */);
Expand description
The Upload Service manages file uploads to object storage.
Implementations§
Source§impl<T> UploadServiceAsyncClient<T>where
T: AsyncClient,
impl<T> UploadServiceAsyncClient<T>where
T: AsyncClient,
Sourcepub async fn initiate_multipart_upload(
&self,
auth_: &BearerToken,
upload_request: &InitiateMultipartUploadRequest,
) -> Result<InitiateMultipartUploadResponse, Error>
pub async fn initiate_multipart_upload( &self, auth_: &BearerToken, upload_request: &InitiateMultipartUploadRequest, ) -> Result<InitiateMultipartUploadResponse, Error>
Initiates a multipart upload to object storage. Returns an uploadId that should be used with listParts, signPart, and completeMultipartUpload.
Sourcepub async fn list_parts(
&self,
auth_: &BearerToken,
upload_id: &str,
key: &str,
) -> Result<Vec<PartWithSize>, Error>
pub async fn list_parts( &self, auth_: &BearerToken, upload_id: &str, key: &str, ) -> Result<Vec<PartWithSize>, Error>
Lists the parts that have been uploaded for a given uploadId.
Sourcepub async fn sign_part(
&self,
auth_: &BearerToken,
upload_id: &str,
key: &str,
part_number: i32,
) -> Result<SignPartResponse, Error>
pub async fn sign_part( &self, auth_: &BearerToken, upload_id: &str, key: &str, part_number: i32, ) -> Result<SignPartResponse, Error>
Signs an upload request for a single part. Returns a URL that will execute the upload without further authentication.
Sourcepub async fn complete_multipart_upload(
&self,
auth_: &BearerToken,
upload_id: &str,
key: &str,
parts: &[Part],
) -> Result<CompleteMultipartUploadResponse, Error>
pub async fn complete_multipart_upload( &self, auth_: &BearerToken, upload_id: &str, key: &str, parts: &[Part], ) -> Result<CompleteMultipartUploadResponse, Error>
Completes a multipart upload to object storage. This should be called after all parts have been uploaded. Will throw EmptyMultipartUpload if there are 0 parts.
Sourcepub async fn abort_multipart_upload(
&self,
auth_: &BearerToken,
upload_id: &str,
key: &str,
) -> Result<(), Error>
pub async fn abort_multipart_upload( &self, auth_: &BearerToken, upload_id: &str, key: &str, ) -> Result<(), Error>
Aborts a multipart upload to S3. Frees storage used by previously uploaded parts and prevents further uploads to the same uploadId.
Sourcepub async fn upload_file<U>(
&self,
auth_: &BearerToken,
file_name: &str,
size_bytes: Option<SafeLong>,
workspace: Option<&WorkspaceRid>,
body: U,
) -> Result<S3Path, Error>
pub async fn upload_file<U>( &self, auth_: &BearerToken, file_name: &str, size_bytes: Option<SafeLong>, workspace: Option<&WorkspaceRid>, body: U, ) -> Result<S3Path, Error>
Uploads a file to S3. Intended for smaller files.
Trait Implementations§
Source§impl<T> AsyncService<T> for UploadServiceAsyncClient<T>where
T: AsyncClient,
impl<T> AsyncService<T> for UploadServiceAsyncClient<T>where
T: AsyncClient,
Source§impl<T: Clone> Clone for UploadServiceAsyncClient<T>
impl<T: Clone> Clone for UploadServiceAsyncClient<T>
Source§fn clone(&self) -> UploadServiceAsyncClient<T>
fn clone(&self) -> UploadServiceAsyncClient<T>
Returns a duplicate 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<T> Freeze for UploadServiceAsyncClient<T>where
T: Freeze,
impl<T> RefUnwindSafe for UploadServiceAsyncClient<T>where
T: RefUnwindSafe,
impl<T> Send for UploadServiceAsyncClient<T>where
T: Send,
impl<T> Sync for UploadServiceAsyncClient<T>where
T: Sync,
impl<T> Unpin for UploadServiceAsyncClient<T>where
T: Unpin,
impl<T> UnwindSafe for UploadServiceAsyncClient<T>where
T: UnwindSafe,
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§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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request