//! OCI-compliant extension registry proxy for managing provisioning system
//! extensions
//!
//! Provides HTTP API for pushing, pulling, and managing OCI container images
//! and artifacts representing provisioning extensions, with support for
//! manifest operations, digest validation, and registry federation.

pub mod api;
pub mod cache;
pub mod client;
pub mod config;
pub mod error;
#[cfg(feature = "nats")]
pub mod events;
pub mod gitea;
pub mod models;
pub mod oci;
pub mod registry;
pub mod service;

pub use api::handlers::AppState;
pub use api::routes::build_routes;
pub use config::Config;
pub use service::ExtensionRegistry;

/// HTTP API version
pub const API_VERSION: &str = "v2";

/// Default port for extension registry
pub const DEFAULT_PORT: u16 = 8084;

/// OCI image media types
pub mod media_types {
    pub const APPLICATION_VND_DOCKER_DISTRIBUTION_MANIFEST_V2: &str =
        "application/vnd.docker.distribution.manifest.v2+json";
    pub const APPLICATION_VND_DOCKER_DISTRIBUTION_MANIFEST_LIST_V2: &str =
        "application/vnd.docker.distribution.manifest.list.v2+json";
    pub const APPLICATION_VND_OCI_IMAGE_MANIFEST_V1: &str =
        "application/vnd.oci.image.manifest.v1+json";
    pub const APPLICATION_VND_OCI_IMAGE_INDEX_V1: &str = "application/vnd.oci.image.index.v1+json";
    pub const APPLICATION_VND_DOCKER_CONTAINER_IMAGE_V1: &str =
        "application/vnd.docker.container.image.v1+json";
    pub const APPLICATION_OCTET_STREAM: &str = "application/octet-stream";
}
