Crate aduana[][src]

Expand description

A Simple Crate to Extract Image Details from a Docker Registry

This crate provides a simple interface to retrieve all the images stored on a private registry, and retrieve the details per image as needed.

Example:

use aduana::*;

#[tokio::main]
pub async fn main() -> Result<(), AduanaError> {

    // Create an inspector instance pointing to your registry
    let inspector = AduanaInspector::new("http://localhost:5000");
    // Retrieve a list of images on the registry
    let images = inspector.images().await?;

    // Loop over the retrieved images
    for image in images {
        // For each tag of an image
        for tag in image.tags() {
            // Retrieve its details
            let details = image.details(tag).await?;
            println!("{:#?}", details);
        }
    }

    Ok(())
}

Structs

Enums