config + client

This commit is contained in:
2026-01-01 17:39:41 +01:00
parent 258c408369
commit 636444536b
2 changed files with 35 additions and 28 deletions
+7 -1
View File
@@ -6,6 +6,8 @@ use std::fs;
use utils::print_bucket_contents;
use crate::utils::s3_utils::{create_client, create_config};
#[tokio::main]
async fn main() {
// Konfiguráció betöltése
@@ -17,8 +19,12 @@ async fn main() {
.expect("Nem sikerült feldolgozni a konfigurációs fájlt.");
for cloud in clouds {
let config = create_config(&cloud);
let client = create_client(config);
println!("Bucket tartalom listázása: {}", cloud.name);
match print_bucket_contents(&cloud).await {
match print_bucket_contents(&client, &cloud).await {
Ok(_) => (),
Err(e) => eprintln!("Hiba a bucket listázásakor: {}", e),
}