Skip to content

Commit 3e08b2b

Browse files
committed
feat: update to latest docbox versions and crates
1 parent bcca097 commit 3e08b2b

4 files changed

Lines changed: 74 additions & 24 deletions

File tree

Cargo.lock

Lines changed: 52 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,29 @@ readme = "./README.md"
88
license = "MIT"
99

1010
[dependencies]
11-
# Environment variables
11+
# Environment variables
1212
dotenvy = "=0.15.7"
1313

1414
# Command line parser
1515
clap = { version = "=4.5.40", features = ["derive"] }
1616

1717
# Core business logic
18-
docbox-core = { version = "0.3.0" }
18+
docbox-core = { version = "0.4.0" }
1919

2020
# Database access
21-
docbox-database = { version = "0.3.0" }
21+
docbox-database = { version = "0.4.0" }
2222

2323
# Search access
24-
docbox-search = { version = "0.3.0" }
24+
docbox-search = { version = "0.4.0" }
2525

2626
# Management access
27-
docbox-management = { version = "0.1.0" }
27+
docbox-management = { version = "0.2.0" }
28+
29+
# Secrets management
30+
docbox-secrets = { version = "0.1.0" }
31+
32+
# Storage access
33+
docbox-storage = { version = "0.1.0" }
2834

2935
# Asynchronous runtime & Helpers
3036
tokio = { version = "=1.46.1", features = ["full"] }

cspell.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
"words": [
44
"docbox",
55
"serde",
6-
"thiserror"
6+
"thiserror",
7+
"dotenv",
8+
"dotenvy"
79
]
8-
}
10+
}

src/main.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
use clap::{Parser, Subcommand};
22
use docbox_core::{
33
aws::aws_config,
4-
secrets::{AppSecretManager, SecretsManagerConfig},
5-
storage::{StorageLayerFactory, StorageLayerFactoryConfig},
64
tenant::rebuild_tenant_index::{rebuild_tenant_index, recreate_search_index_data},
75
};
86
use docbox_database::models::tenant::TenantId;
@@ -16,9 +14,11 @@ use docbox_management::{
1614
},
1715
};
1816
use docbox_search::{SearchIndexFactory, SearchIndexFactoryConfig};
17+
use docbox_secrets::{AppSecretManager, SecretsManagerConfig};
18+
use docbox_storage::{StorageLayerFactory, StorageLayerFactoryConfig};
1919
use eyre::{Context, ContextCompat};
2020
use serde::Deserialize;
21-
use std::path::PathBuf;
21+
use std::{path::PathBuf, sync::Arc};
2222

2323
use crate::database::CliDatabaseProvider;
2424

@@ -85,7 +85,7 @@ pub enum Commands {
8585
#[arg(short, long)]
8686
tenant_id: TenantId,
8787

88-
/// File to save the rebuilt index to incase of failure
88+
/// File to save the rebuilt index to in case of failure
8989
#[arg(short, long)]
9090
file: PathBuf,
9191
},
@@ -179,8 +179,10 @@ async fn main() -> eyre::Result<()> {
179179

180180
let aws_config = aws_config().await;
181181
let secrets = AppSecretManager::from_config(&aws_config, config.secrets.clone());
182+
let secrets = Arc::new(secrets);
182183
let search_factory =
183-
SearchIndexFactory::from_config(&aws_config, config.search.clone()).map_err(AnyhowError)?;
184+
SearchIndexFactory::from_config(&aws_config, secrets.clone(), config.search.clone())
185+
.map_err(AnyhowError)?;
184186
let storage_factory = StorageLayerFactory::from_config(&aws_config, config.storage.clone());
185187

186188
let db_provider = match (

0 commit comments

Comments
 (0)