pub struct ArtifactsClient { /* private fields */ }Expand description
One namespace’s artifacts. See Client::artifacts.
A reference outside <namespace>/ is a crate::Error::Forbidden whose
message says what the namespace may reach. Every method answers
crate::Error::Conflict when the plugin is not installed in the
namespace (or is switched off for the fleet). Writes need admin over the
whole namespace.
Implementations§
Source§impl ArtifactsClient
impl ArtifactsClient
pub fn namespace(&self) -> &str
Sourcepub async fn info(&self) -> Result<ArtifactStoreInfo>
pub async fn info(&self) -> Result<ArtifactStoreInfo>
Whether there is a store, whether the namespace can publish to it, and the prefix its tags must carry.
Every tag under <namespace>/.
Sourcepub async fn tag(&self, tag: &str) -> Result<ArtifactTag>
pub async fn tag(&self, tag: &str) -> Result<ArtifactTag>
What one tag (<ns>/<repo>:<tag>) points at.
Sourcepub async fn set_tag(&self, tag: &str, digest: &str) -> Result<()>
pub async fn set_tag(&self, tag: &str, digest: &str) -> Result<()>
Point tag at digest (a manifest already in the store), creating
or moving it. Needs admin.
Sourcepub async fn delete_tag(&self, tag: &str) -> Result<()>
pub async fn delete_tag(&self, tag: &str) -> Result<()>
Remove a tag. What it pointed at stays until the store’s GC finds it
unreferenced. Needs admin.
Sourcepub async fn manifest(&self, tag_or_digest: &str) -> Result<Value>
pub async fn manifest(&self, tag_or_digest: &str) -> Result<Value>
A manifest, by an owned tag or by digest, as the store wrote it.
Sourcepub async fn repo(&self, repo: &str) -> Result<ArtifactRepo>
pub async fn repo(&self, repo: &str) -> Result<ArtifactRepo>
A repository (<ns>/<repo>) and its tags.