pub struct AsyncUploadServiceClient<C> { /* private fields */ }Trait Implementations§
Source§impl<C> AsyncService<C> for AsyncUploadServiceClient<C>
impl<C> AsyncService<C> for AsyncUploadServiceClient<C>
Source§fn new(client: C, runtime: &Arc<ConjureRuntime>) -> Self
fn new(client: C, runtime: &Arc<ConjureRuntime>) -> Self
Creates a new service wrapping an async HTTP client.
Source§impl<O, I: Stream<Item = Result<Bytes, Error>>, __C> AsyncUploadService<O, I> for AsyncUploadServiceClient<__C>where
__C: AsyncClient<BodyWriter = O, ResponseBody = I> + Sync + Send,
__C::ResponseBody: 'static + Send,
impl<O, I: Stream<Item = Result<Bytes, Error>>, __C> AsyncUploadService<O, I> for AsyncUploadServiceClient<__C>where
__C: AsyncClient<BodyWriter = O, ResponseBody = I> + Sync + Send,
__C::ResponseBody: 'static + Send,
Source§async fn initiate_multipart_upload(
&self,
auth_: &BearerToken,
upload_request: &InitiateMultipartUploadRequest,
) -> Result<InitiateMultipartUploadResponse, Error>
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.
Source§async fn list_parts(
&self,
auth_: &BearerToken,
upload_id: &str,
key: &str,
) -> Result<Vec<PartWithSize>, Error>
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.
Source§async fn sign_part(
&self,
auth_: &BearerToken,
upload_id: &str,
key: &str,
part_number: i32,
) -> Result<SignPartResponse, Error>
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.
Source§async fn complete_multipart_upload(
&self,
auth_: &BearerToken,
upload_id: &str,
key: &str,
parts: &[Part],
) -> Result<CompleteMultipartUploadResponse, Error>
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.
Source§async fn abort_multipart_upload(
&self,
auth_: &BearerToken,
upload_id: &str,
key: &str,
) -> Result<(), Error>
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.
Source§async fn sign_download(
&self,
auth_: &BearerToken,
request: &SignDownloadRequest,
) -> Result<SignDownloadResponse, Error>
async fn sign_download( &self, auth_: &BearerToken, request: &SignDownloadRequest, ) -> Result<SignDownloadResponse, Error>
Returns a short-lived signed GET URL for an object already in the uploads bucket.
Use this to hand a freshly-uploaded object’s path to an external service (e.g. Dagger)
without giving that service any Scout credentials. The caller must be authorized to
read the workspace that owns the path (encoded as the first segment of the object key).
Source§async fn upload_file(
&self,
auth_: &BearerToken,
file_name: &str,
size_bytes: Option<SafeLong>,
workspace: Option<&WorkspaceRid>,
body: impl AsyncWriteBody<O> + Sync + Send,
) -> Result<S3Path, Error>
async fn upload_file( &self, auth_: &BearerToken, file_name: &str, size_bytes: Option<SafeLong>, workspace: Option<&WorkspaceRid>, body: impl AsyncWriteBody<O> + Sync + Send, ) -> Result<S3Path, Error>
Uploads a file to S3. Intended for smaller files.
Source§impl<C: Clone> Clone for AsyncUploadServiceClient<C>
impl<C: Clone> Clone for AsyncUploadServiceClient<C>
Source§fn clone(&self) -> AsyncUploadServiceClient<C>
fn clone(&self) -> AsyncUploadServiceClient<C>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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<C> Freeze for AsyncUploadServiceClient<C>where
C: Freeze,
impl<C> !RefUnwindSafe for AsyncUploadServiceClient<C>
impl<C> Send for AsyncUploadServiceClient<C>where
C: Send,
impl<C> Sync for AsyncUploadServiceClient<C>where
C: Sync,
impl<C> Unpin for AsyncUploadServiceClient<C>where
C: Unpin,
impl<C> UnsafeUnpin for AsyncUploadServiceClient<C>where
C: UnsafeUnpin,
impl<C> !UnwindSafe for AsyncUploadServiceClient<C>
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