pub struct Client { /* private fields */ }Expand description
A Client to make outgoing API requests to a registry.
Implementations§
Source§impl Client
impl Client
Sourcepub async fn authenticate(self, scopes: &[&str]) -> Result<Self>
pub async fn authenticate(self, scopes: &[&str]) -> Result<Self>
Perform registry authentication and return the authenticated client.
If Bearer authentication is used the returned client will be authorized for the requested scopes.
Source§impl Client
impl Client
Sourcepub async fn get_manifest(
&self,
name: &str,
reference: &str,
) -> Result<Manifest>
pub async fn get_manifest( &self, name: &str, reference: &str, ) -> Result<Manifest>
Fetch an image manifest.
The name and reference parameters identify the image. The reference may be either a tag or digest.
Sourcepub async fn get_manifest_and_ref(
&self,
name: &str,
reference: &str,
) -> Result<(Manifest, Option<String>)>
pub async fn get_manifest_and_ref( &self, name: &str, reference: &str, ) -> Result<(Manifest, Option<String>)>
Fetch an image manifest and return it with its digest.
The name and reference parameters identify the image. The reference may be either a tag or digest.
Sourcepub async fn get_manifestref(
&self,
name: &str,
reference: &str,
) -> Result<Option<String>>
pub async fn get_manifestref( &self, name: &str, reference: &str, ) -> Result<Option<String>>
Fetch content digest for a particular tag.
Sourcepub async fn has_manifest(
&self,
name: &str,
reference: &str,
mediatypes: Option<&[&str]>,
) -> Result<Option<MediaTypes>>
pub async fn has_manifest( &self, name: &str, reference: &str, mediatypes: Option<&[&str]>, ) -> Result<Option<MediaTypes>>
Check if an image manifest exists.
The name and reference parameters identify the image. The reference may be either a tag or digest.
Source§impl Client
impl Client
pub async fn get_blob_response( &self, name: &str, digest: &str, ) -> Result<BlobResponse>
Source§impl Client
impl Client
pub fn configure() -> Config
Sourcepub async fn ensure_v2_registry(self) -> Result<Self>
pub async fn ensure_v2_registry(self) -> Result<Self>
Ensure remote registry supports v2 API.
Sourcepub async fn is_v2_supported(&self) -> Result<bool>
pub async fn is_v2_supported(&self) -> Result<bool>
Check whether remote registry supports v2 API.
Check whether remote registry supports v2 API and self is authorized.
Authorized means to successfully GET the /v2 endpoint on the remote registry.