init
This commit is contained in:
+26
@@ -0,0 +1,26 @@
|
||||
mod models;
|
||||
mod utils;
|
||||
|
||||
use models::CloudS3;
|
||||
use std::fs;
|
||||
|
||||
use utils::print_bucket_contents;
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
// Konfiguráció betöltése
|
||||
|
||||
let config_data =
|
||||
fs::read_to_string("config.json").expect("Nem sikerült beolvasni a konfigurációs fájlt.");
|
||||
|
||||
let clouds: Vec<CloudS3> = serde_json::from_str(&config_data)
|
||||
.expect("Nem sikerült feldolgozni a konfigurációs fájlt.");
|
||||
|
||||
for cloud in clouds {
|
||||
println!("Bucket tartalom listázása: {}", cloud.name);
|
||||
match print_bucket_contents(&cloud, cloud.folder.as_deref()).await {
|
||||
Ok(_) => (),
|
||||
Err(e) => eprintln!("Hiba a bucket listázásakor: {}", e),
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user