2025-12-29 17:16:35 +01:00
|
|
|
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);
|
2025-12-31 19:00:22 +01:00
|
|
|
match print_bucket_contents(&cloud).await {
|
2025-12-29 17:16:35 +01:00
|
|
|
Ok(_) => (),
|
|
|
|
|
Err(e) => eprintln!("Hiba a bucket listázásakor: {}", e),
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|