[−][src]Struct oci_registry_client::DockerRegistryClientV2
Client to fetch image manifests and download blobs.
DockerRegistryClientV2 provides functions to fetch manifests and download blobs from a OCI Image Registry (or a Docker Registry API V2).
Methods
impl DockerRegistryClientV2
[src]
pub fn new<T: Into<String>>(service: T, api_url: T, oauth_url: T) -> Self
[src]
Returns a new DockerRegistryClientV2
.
Arguments
service
- Name of a Image Registry Service (example: registry.docker.io)api_url
- Service HTTPS address (example: https://registry-1.docker.io)auth_url
- Address to get a OAuth 2.0 token for this service.
Example
let mut client = DockerRegistryClientV2::new( "registry.docker.io", "https://registry-1.docker.io", "https://auth.docker.io/token" );
pub fn set_auth_token(&mut self, token: Option<AuthToken>)
[src]
Set access token to authenticate subsequent requests.
pub async fn auth<'_, '_, '_, '_>(
&'_ self,
r#type: &'_ str,
name: &'_ str,
action: &'_ str
) -> Result<AuthToken, ErrorResponse>
[src]
&'_ self,
r#type: &'_ str,
name: &'_ str,
action: &'_ str
) -> Result<AuthToken, ErrorResponse>
Fetch a access token from auth_url
for this service
.
Arguments
type
- Scope type (example: "repository").name
- Name of resource (example: "library/ubuntu").action
- List of actions separated by comma (example: "pull").
pub async fn version<'_>(&'_ self) -> Result<Version, ErrorResponse>
[src]
Get API version.
pub async fn list_manifests<'_, '_, '_>(
&'_ self,
image: &'_ str,
reference: &'_ str
) -> Result<ManifestList, ErrorResponse>
[src]
&'_ self,
image: &'_ str,
reference: &'_ str
) -> Result<ManifestList, ErrorResponse>
List manifests from given image and reference.
pub async fn manifest<'_, '_, '_>(
&'_ self,
image: &'_ str,
reference: &'_ str
) -> Result<Manifest, ErrorResponse>
[src]
&'_ self,
image: &'_ str,
reference: &'_ str
) -> Result<Manifest, ErrorResponse>
Get the image manifest.
pub async fn config<'_, '_, '_>(
&'_ self,
image: &'_ str,
reference: &'_ Digest
) -> Result<Image, ErrorResponse>
[src]
&'_ self,
image: &'_ str,
reference: &'_ Digest
) -> Result<Image, ErrorResponse>
Get the container config.
pub async fn blob<'_, '_, '_>(
&'_ self,
image: &'_ str,
digest: &'_ Digest
) -> Result<Blob, ErrorResponse>
[src]
&'_ self,
image: &'_ str,
digest: &'_ Digest
) -> Result<Blob, ErrorResponse>
Retrieve the blob from the registry identified by digest
.
Trait Implementations
impl Clone for DockerRegistryClientV2
[src]
fn clone(&self) -> DockerRegistryClientV2
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for DockerRegistryClientV2
[src]
Auto Trait Implementations
impl !RefUnwindSafe for DockerRegistryClientV2
impl Send for DockerRegistryClientV2
impl Sync for DockerRegistryClientV2
impl Unpin for DockerRegistryClientV2
impl !UnwindSafe for DockerRegistryClientV2
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,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,