pub struct UploadServiceClient<C> { /* private fields */ }Trait Implementations§
Source§impl<C: Clone> Clone for UploadServiceClient<C>
impl<C: Clone> Clone for UploadServiceClient<C>
Source§fn clone(&self) -> UploadServiceClient<C>
fn clone(&self) -> UploadServiceClient<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 moreSource§impl<C: Debug> Debug for UploadServiceClient<C>
impl<C: Debug> Debug for UploadServiceClient<C>
Source§impl<C> Service<C> for UploadServiceClient<C>
impl<C> Service<C> for UploadServiceClient<C>
Source§fn new(client: C, runtime: &Arc<ConjureRuntime>) -> Self
fn new(client: C, runtime: &Arc<ConjureRuntime>) -> Self
Creates a new service wrapping an HTTP client.
Source§impl<O, I: Iterator<Item = Result<Bytes, Error>>, __C> UploadService<O, I> for UploadServiceClient<__C>where
__C: Client<BodyWriter = O, ResponseBody = I>,
impl<O, I: Iterator<Item = Result<Bytes, Error>>, __C> UploadService<O, I> for UploadServiceClient<__C>where
__C: Client<BodyWriter = O, ResponseBody = I>,
Source§fn initiate_multipart_upload(
&self,
auth_: &BearerToken,
upload_request: &InitiateMultipartUploadRequest,
) -> Result<InitiateMultipartUploadResponse, Error>
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§fn list_parts(
&self,
auth_: &BearerToken,
upload_id: &str,
key: &str,
) -> Result<Vec<PartWithSize>, Error>
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§fn sign_part(
&self,
auth_: &BearerToken,
upload_id: &str,
key: &str,
part_number: i32,
) -> Result<SignPartResponse, Error>
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§fn complete_multipart_upload(
&self,
auth_: &BearerToken,
upload_id: &str,
key: &str,
parts: &[Part],
) -> Result<CompleteMultipartUploadResponse, Error>
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§fn abort_multipart_upload(
&self,
auth_: &BearerToken,
upload_id: &str,
key: &str,
) -> Result<(), Error>
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§fn sign_download(
&self,
auth_: &BearerToken,
request: &SignDownloadRequest,
) -> Result<SignDownloadResponse, Error>
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§fn upload_file(
&self,
auth_: &BearerToken,
file_name: &str,
size_bytes: Option<SafeLong>,
workspace: Option<&WorkspaceRid>,
body: impl WriteBody<O>,
) -> Result<S3Path, Error>
fn upload_file( &self, auth_: &BearerToken, file_name: &str, size_bytes: Option<SafeLong>, workspace: Option<&WorkspaceRid>, body: impl WriteBody<O>, ) -> Result<S3Path, Error>
Uploads a file to S3. Intended for smaller files.
Auto Trait Implementations§
impl<C> Freeze for UploadServiceClient<C>where
C: Freeze,
impl<C> !RefUnwindSafe for UploadServiceClient<C>
impl<C> Send for UploadServiceClient<C>where
C: Send,
impl<C> Sync for UploadServiceClient<C>where
C: Sync,
impl<C> Unpin for UploadServiceClient<C>where
C: Unpin,
impl<C> UnsafeUnpin for UploadServiceClient<C>where
C: UnsafeUnpin,
impl<C> !UnwindSafe for UploadServiceClient<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