Struct taskcluster::Object [−][src]
Object Service
The object service provides HTTP-accessible storage for large blobs of data.
Implementations
impl Object
[src]
pub fn new<CB: Into<ClientBuilder>>(client_builder: CB) -> Result<Self, Error>
[src]
Create a new undefined instance, based on the given client.
pub async fn ping(&self) -> Result<(), Error>
[src]
Ping Server
Respond without doing anything. This endpoint is used to check that the service is up.
pub fn ping_url(&self) -> Result<String, Error>
[src]
Generate an unsigned URL for the ping endpoint
pub fn ping_signed_url(&self, ttl: Duration) -> Result<String, Error>
[src]
Generate a signed URL for the ping endpoint
pub async fn createUpload(
&self,
name: &str,
payload: &Value
) -> Result<Value, Error>
[src]
&self,
name: &str,
payload: &Value
) -> Result<Value, Error>
Begin upload of a new object
Create a new object by initiating upload of its data.
This endpoint implements negotiation of upload methods. It can be called multiple times if necessary, either to propose new upload methods or to renew credentials for an already-agreed upload.
The uploadId
must be supplied by the caller, and any attempts to upload
an object with the same name but a different uploadId
will fail.
Thus the first call to this method establishes the uploadId
for the
object, and as long as that value is kept secret, no other caller can
upload an object of that name, regardless of scopes. Object expiration
cannot be changed after the initial call, either. It is possible to call
this method with no proposed upload methods, which hsa the effect of "locking
in" the expiration
and uploadId
properties.
Unfinished uploads expire after 1 day.
pub async fn startDownload(
&self,
name: &str,
payload: &Value
) -> Result<Value, Error>
[src]
&self,
name: &str,
payload: &Value
) -> Result<Value, Error>
Download object data
Start the process of downloading an object's data. Call this endpoint with a list of acceptable download methods, and the server will select a method and return the corresponding payload.
Returns a 406 error if none of the given download methods are available.
See Download Methods for more detail.
pub async fn download(&self, name: &str) -> Result<(), Error>
[src]
Get an object's data
Get the data in an object directly. This method does not return a JSON body, but redirects to a location that will serve the object content directly.
URLs for this endpoint, perhaps with attached authentication (?bewit=..
),
are typically used for downloads of objects by simple HTTP clients such as
web browsers, curl, or wget.
This method is limited by the common capabilities of HTTP, so it may not be
the most efficient, resilient, or featureful way to retrieve an artifact.
Situations where such functionality is required should ues the
startDownload
API endpoint.
See Simple Downloads for more detail.
pub fn download_url(&self, name: &str) -> Result<String, Error>
[src]
Generate an unsigned URL for the download endpoint
pub fn download_signed_url(
&self,
name: &str,
ttl: Duration
) -> Result<String, Error>
[src]
&self,
name: &str,
ttl: Duration
) -> Result<String, Error>
Generate a signed URL for the download endpoint
Auto Trait Implementations
impl !RefUnwindSafe for Object
[src]
impl Send for Object
[src]
impl Sync for Object
[src]
impl Unpin for Object
[src]
impl !UnwindSafe for Object
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,