1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
//! AntKingImage //! //! A Library For Download OCI Image //! //! Example: //! //! 1、Downloade DockerHub Image //! //! cri_pull_image("".to_string,"".to_string,"".to_string,image_name,image_version,docker:true).await.unwrap; //! //! 2、Download Registry Image //! //! cri_pull_image(repositories_url_ip,username,password,image_name,image_version,docker:true).await.unwrap; pub mod sled_json; pub mod record_image_repositories; pub mod public_struct; pub mod get_manifest; pub mod local_repositories; pub mod get_config; pub mod get_layers; pub mod record_image_digest_layerdiffid_layerdigest; pub mod record_image_chainid; pub mod record_image_layer_level; pub mod utils; pub mod entrypoint; pub mod get_image_digest_dockerhub; pub mod get_manifest_dockerhub; pub mod get_token_dockerhub; pub mod get_config_dockerhub; pub mod get_layers_dockerhub; pub mod cri_server_image_pull; // use sled::{ Config, Mode }; // use entrypoint::pull_image; // #[tokio::main] // pub async fn main() -> sled::Result<()> { // let db = Config::new() // .mode(Mode::HighThroughput) // .path("/var/lib/AntKing/imagedb") // .open()?; // // let repositories_url_ip = "http://192.168.1.118:8899".to_string(); // // let image_name = "saodiseng/nginx".to_string(); // // let image_version = "hi".to_string(); // let image_name = "ruilkyu/nginx".to_string(); // let image_version = "latest".to_string(); // let username = "".to_string(); // let password = "".to_string(); // let docker = true; // pull_image(&db,repositories_url_ip,image_name,image_version,username,password,docker).await; // // Ok(()) // }