pub mod handlers;
pub mod models;
pub mod providers;
pub mod routes;
use crate::server::registry::models::RegistryCredentials;
use anyhow::Result;
use async_trait::async_trait;
#[derive(Debug, Clone, Copy)]
pub enum ImageTagType {
ClientFacing,
Internal,
}
#[async_trait]
pub trait RegistryProvider: Send + Sync {
async fn get_credentials(&self, repository: &str) -> Result<RegistryCredentials>;
async fn get_pull_credentials(&self) -> Result<(String, String)>;
fn registry_host(&self) -> &str;
fn registry_url(&self) -> &str;
fn get_image_tag(&self, repository: &str, tag: &str, tag_type: ImageTagType) -> String;
}