pub struct RegistryClient {
pub auth: Auth,
/* private fields */
}
Fields§
§auth: Auth
Implementations§
Source§impl RegistryClient
impl RegistryClient
Sourcepub fn with_token_manager(self, token_manager: Option<TokenManager>) -> Self
pub fn with_token_manager(self, token_manager: Option<TokenManager>) -> Self
Set token manager for all operations
pub async fn test_connectivity(&self) -> Result<()>
pub async fn check_blob_exists( &self, digest: &str, repository: &str, ) -> Result<bool>
pub async fn check_blob_exists_with_token( &self, digest: &str, repository: &str, token: &Option<String>, ) -> Result<bool>
pub async fn authenticate( &self, auth_config: &AuthConfig, ) -> Result<Option<String>>
pub async fn authenticate_for_repository( &self, auth_config: &AuthConfig, repository: &str, ) -> Result<Option<String>>
Sourcepub async fn upload_blob_with_token(
&self,
data: &[u8],
digest: &str,
repository: &str,
token: &Option<String>,
) -> Result<String>
pub async fn upload_blob_with_token( &self, data: &[u8], digest: &str, repository: &str, token: &Option<String>, ) -> Result<String>
统一的blob上传方法(合并upload_blob和upload_blob_with_token)
Sourcepub async fn upload_manifest_with_token(
&self,
manifest: &str,
repository: &str,
reference: &str,
token: &Option<String>,
) -> Result<()>
pub async fn upload_manifest_with_token( &self, manifest: &str, repository: &str, reference: &str, token: &Option<String>, ) -> Result<()>
统一的manifest上传方法
pub async fn pull_manifest( &self, repository: &str, reference: &str, token: &Option<String>, ) -> Result<Vec<u8>>
Sourcepub async fn pull_blob(
&self,
repository: &str,
digest: &str,
token: &Option<String>,
) -> Result<Vec<u8>>
pub async fn pull_blob( &self, repository: &str, digest: &str, token: &Option<String>, ) -> Result<Vec<u8>>
从 repository 拉取 blob
通过 registry API 获取指定的 blob 数据
Sourcepub async fn pull_blob_silent(
&self,
repository: &str,
digest: &str,
token: &Option<String>,
) -> Result<Vec<u8>>
pub async fn pull_blob_silent( &self, repository: &str, digest: &str, token: &Option<String>, ) -> Result<Vec<u8>>
Pull blob silently without printing individual success messages (for enhanced progress display)
获取仓库中的所有标签列表
Sourcepub async fn check_image_exists(
&self,
repository: &str,
reference: &str,
token: &Option<String>,
) -> Result<bool>
pub async fn check_image_exists( &self, repository: &str, reference: &str, token: &Option<String>, ) -> Result<bool>
检查镜像是否存在于仓库中
Sourcepub async fn push_blob_from_tar(
&self,
tar_path: &Path,
layer_path: &str,
digest: &str,
repository: &str,
_token: &Option<String>,
) -> Result<()>
pub async fn push_blob_from_tar( &self, tar_path: &Path, layer_path: &str, digest: &str, repository: &str, _token: &Option<String>, ) -> Result<()>
从 tar 文件中提取并推送 blob 到 registry
Sourcepub fn enable_oci_client(&mut self) -> Result<()>
pub fn enable_oci_client(&mut self) -> Result<()>
Enable OCI client functionality
Sourcepub fn enable_oci_client_with_auth(
&mut self,
auth_config: &AuthConfig,
) -> Result<()>
pub fn enable_oci_client_with_auth( &mut self, auth_config: &AuthConfig, ) -> Result<()>
Enable OCI client with authentication
Sourcepub fn has_oci_client(&self) -> bool
pub fn has_oci_client(&self) -> bool
Check if OCI client is enabled
Sourcepub fn oci_client(&self) -> Option<&OciClientAdapter>
pub fn oci_client(&self) -> Option<&OciClientAdapter>
Get OCI client reference if available
Trait Implementations§
Source§impl Clone for RegistryClient
impl Clone for RegistryClient
Source§fn clone(&self) -> RegistryClient
fn clone(&self) -> RegistryClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl OciRegistryOperations for RegistryClient
impl OciRegistryOperations for RegistryClient
fn oci_pull_manifest<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
repository: &'life1 str,
reference: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(Vec<u8>, String)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn oci_pull_blob<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
repository: &'life1 str,
digest: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn oci_push_blob<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
repository: &'life1 str,
data: &'life2 [u8],
digest: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn oci_push_manifest<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
repository: &'life1 str,
reference: &'life2 str,
manifest: &'life3 [u8],
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn oci_blob_exists<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
repository: &'life1 str,
digest: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn oci_manifest_exists<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
repository: &'life1 str,
reference: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Auto Trait Implementations§
impl Freeze for RegistryClient
impl !RefUnwindSafe for RegistryClient
impl Send for RegistryClient
impl Sync for RegistryClient
impl Unpin for RegistryClient
impl !UnwindSafe for RegistryClient
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