pub struct UploadServiceClient<T>(/* private fields */);
Expand description
The Upload Service manages file uploads to object storage.
Implementations§
Source§impl<T> UploadServiceClient<T>where
T: Client,
impl<T> UploadServiceClient<T>where
T: Client,
Sourcepub fn initiate_multipart_upload(
&self,
auth_: &BearerToken,
upload_request: &InitiateMultipartUploadRequest,
) -> Result<InitiateMultipartUploadResponse, Error>
pub 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 fn list_parts(
&self,
auth_: &BearerToken,
upload_id: &str,
key: &str,
) -> Result<Vec<PartWithSize>, Error>
pub 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 fn sign_part(
&self,
auth_: &BearerToken,
upload_id: &str,
key: &str,
part_number: i32,
) -> Result<SignPartResponse, Error>
pub 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 fn complete_multipart_upload(
&self,
auth_: &BearerToken,
upload_id: &str,
key: &str,
parts: &[Part],
) -> Result<CompleteMultipartUploadResponse, Error>
pub 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.
Sourcepub fn abort_multipart_upload(
&self,
auth_: &BearerToken,
upload_id: &str,
key: &str,
) -> Result<(), Error>
pub 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 fn upload_file<U>(
&self,
auth_: &BearerToken,
file_name: &str,
size_bytes: Option<SafeLong>,
workspace: Option<&WorkspaceRid>,
body: U,
) -> Result<S3Path, Error>where
U: WriteBody<T::BodyWriter>,
pub fn upload_file<U>(
&self,
auth_: &BearerToken,
file_name: &str,
size_bytes: Option<SafeLong>,
workspace: Option<&WorkspaceRid>,
body: U,
) -> Result<S3Path, Error>where
U: WriteBody<T::BodyWriter>,
Uploads a file to S3. Intended for smaller files.
Trait Implementations§
Source§impl<T: Clone> Clone for UploadServiceClient<T>
impl<T: Clone> Clone for UploadServiceClient<T>
Source§fn clone(&self) -> UploadServiceClient<T>
fn clone(&self) -> UploadServiceClient<T>
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 moreSource§impl<T: Debug> Debug for UploadServiceClient<T>
impl<T: Debug> Debug for UploadServiceClient<T>
Auto Trait Implementations§
impl<T> Freeze for UploadServiceClient<T>where
T: Freeze,
impl<T> RefUnwindSafe for UploadServiceClient<T>where
T: RefUnwindSafe,
impl<T> Send for UploadServiceClient<T>where
T: Send,
impl<T> Sync for UploadServiceClient<T>where
T: Sync,
impl<T> Unpin for UploadServiceClient<T>where
T: Unpin,
impl<T> UnwindSafe for UploadServiceClient<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