Skip to main content

Crate ferro_oci_server

Crate ferro_oci_server 

Source
Expand description

ferro-oci-server

OCI Distribution Spec v1.1 (opencontainers/distribution-spec) and Docker Registry HTTP API v2 (docker/distribution) for FerroRepo.

Phase 1 scope (wired in this crate):

  • GET /v2/ version check and auth challenge (spec §3.2);
  • GET /v2/_catalog repository catalog with n/last pagination (spec §3.5);
  • GET /v2/{name}/tags/list tag listing with pagination (spec §3.6);
  • GET|HEAD|DELETE /v2/{name}/blobs/{digest} (spec §3.2 / §4.9);
  • POST|PATCH|PUT /v2/{name}/blobs/uploads/{uuid?} — monolithic and chunked uploads (spec §4.3–§4.8);
  • GET|HEAD|PUT|DELETE /v2/{name}/manifests/{reference} (spec §3.2 / §4.4 / §4.9);
  • GET /v2/{name}/referrers/{digest} referrers API (spec §3.3).

The Phase 1 exit gate is 100 % pass on the opencontainers/distribution-spec conformance suite and interop with docker, podman, crane, skopeo, and nerdctl.

Re-exports§

pub use error::OciError;
pub use error::OciErrorBody;
pub use error::OciErrorCode;
pub use error::OciErrorInfo;
pub use error::OciResult;
pub use manifest::Descriptor;
pub use manifest::ImageIndex;
pub use manifest::ImageManifest;
pub use manifest::empty_image_index;
pub use media_types::ManifestKind;
pub use media_types::classify_manifest_media_type;
pub use reference::MAX_NAME_LENGTH;
pub use reference::MAX_TAG_LENGTH;
pub use reference::Reference;
pub use reference::validate_name;
pub use registry::InMemoryRegistryMeta;
pub use registry::ReferrerDescriptor;
pub use registry::RegistryMeta;
pub use router::AppState;
pub use router::router;
pub use upload::ContentRange;
pub use upload::UploadState;

Modules§

error
OCI error response shape and mapping to HTTP status codes.
handlers
HTTP handlers for the /v2/** OCI Distribution endpoints.
manifest
OCI image manifest and image index types.
media_types
OCI / Docker media type constants.
reference
Repository-name and reference parsing.
registry
Registry metadata plane.
router
Axum router factory that wires the /v2/** OCI endpoints.
upload
Blob-upload session state machine.

Constants§

CRATE_NAME
Crate name, exposed for diagnostics and /metrics labelling.