use async_trait::async_trait;
use crate::client::OciClient;
use crate::error::Result;
use crate::r#ref::OciRef;
use crate::traits::OciPromoter;
pub struct DefaultOciPromoter {
client: OciClient,
}
impl DefaultOciPromoter {
pub fn new(client: OciClient) -> Self {
Self { client }
}
}
#[async_trait]
impl OciPromoter for DefaultOciPromoter {
async fn promote(&self, source: &OciRef, target: &OciRef, force: bool) -> Result<()> {
self.client.promote(source, target, force).await.map(|_| ())
}
}