pub struct RegistryClient {
pub name: String,
pub base_url: String,
pub client: Client,
}Fields§
§name: String§base_url: String§client: ClientImplementations§
Source§impl RegistryClient
impl RegistryClient
pub fn new(cfg: &RegistryConfig) -> Result<Self>
Sourcepub async fn list_versions(
&self,
group_id: &str,
artifact_id: &str,
) -> Result<Vec<Version>>
pub async fn list_versions( &self, group_id: &str, artifact_id: &str, ) -> Result<Vec<Version>>
List all published versions for a given artifact
pub fn get_download_url( &self, group_id: &str, artifact_id: &str, version: &Version, ) -> String
Sourcepub async fn download(
&self,
group_id: &str,
artifact_id: &str,
version: &Version,
) -> Result<Bytes>
pub async fn download( &self, group_id: &str, artifact_id: &str, version: &Version, ) -> Result<Bytes>
Download the raw content for a specific version
Sourcepub async fn list_groups(&self) -> Result<Vec<String>>
pub async fn list_groups(&self) -> Result<Vec<String>>
List all groups in the registry
Sourcepub async fn list_artifacts(&self, group_id: &str) -> Result<Vec<String>>
pub async fn list_artifacts(&self, group_id: &str) -> Result<Vec<String>>
List all artifacts in a specific group
Sourcepub async fn artifact_exists(
&self,
group_id: &str,
artifact_id: &str,
) -> Result<bool>
pub async fn artifact_exists( &self, group_id: &str, artifact_id: &str, ) -> Result<bool>
Check if an artifact exists in the registry
Sourcepub async fn get_artifact_metadata(
&self,
group_id: &str,
artifact_id: &str,
) -> Result<ArtifactMetadata>
pub async fn get_artifact_metadata( &self, group_id: &str, artifact_id: &str, ) -> Result<ArtifactMetadata>
Get artifact metadata including type
Sourcepub async fn publish_artifact(
&self,
publish: &PublishConfig,
content: &str,
) -> Result<()>
pub async fn publish_artifact( &self, publish: &PublishConfig, content: &str, ) -> Result<()>
Publish an artifact to the registry
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