1use async_trait::async_trait;
2
3use crate::error::Result;
4use crate::r#ref::OciRef;
5
6#[async_trait]
8pub trait OciResolver: Send + Sync {
9 async fn resolve_digest(&self, image: &OciRef) -> Result<String>;
10 async fn exists(&self, image: &OciRef) -> Result<bool>;
11 async fn list_tags(&self, image: &OciRef, limit: Option<usize>) -> Result<Vec<String>>;
12}
13
14#[async_trait]
16pub trait OciPromoter: Send + Sync {
17 async fn promote(&self, source: &OciRef, target: &OciRef, force: bool) -> Result<()>;
18}