pub mod config;
pub use config::*;
#[cfg(feature = "cosign")]
pub(crate) mod oci_client;
#[cfg(feature = "cosign")]
pub(crate) use oci_client::*;
#[cfg(feature = "cosign")]
pub mod oci_reference;
#[cfg(feature = "cosign")]
pub use oci_reference::OciReference;
#[cfg(all(feature = "cosign", feature = "cached-client"))]
pub(crate) mod oci_caching_client;
#[cfg(all(feature = "cosign", feature = "cached-client"))]
pub(crate) use oci_caching_client::*;
use crate::errors::Result;
use async_trait::async_trait;
use ::oci_client as oci_client_dep;
pub(crate) trait ClientCapabilitiesDeps: Send + Sync {}
#[async_trait]
pub(crate) trait ClientCapabilities: ClientCapabilitiesDeps {
async fn fetch_manifest_digest(
&mut self,
image: &oci_client_dep::Reference,
auth: &oci_client_dep::secrets::RegistryAuth,
) -> Result<String>;
async fn pull(
&mut self,
image: &oci_client_dep::Reference,
auth: &oci_client_dep::secrets::RegistryAuth,
accepted_media_types: Vec<&str>,
) -> Result<oci_client_dep::client::ImageData>;
async fn pull_manifest(
&mut self,
image: &oci_client_dep::Reference,
auth: &oci_client_dep::secrets::RegistryAuth,
) -> Result<(oci_client_dep::manifest::OciManifest, String)>;
async fn push(
&mut self,
image_ref: &oci_client_dep::Reference,
layers: &[oci_client_dep::client::ImageLayer],
config: oci_client_dep::client::Config,
auth: &oci_client_dep::secrets::RegistryAuth,
manifest: Option<oci_client_dep::manifest::OciImageManifest>,
) -> Result<oci_client_dep::client::PushResponse>;
async fn pull_referrers(
&mut self,
image: &oci_client_dep::Reference,
auth: &oci_client_dep::secrets::RegistryAuth,
artifact_type: Option<&str>,
) -> Result<oci_client_dep::manifest::OciImageIndex>;
}