Skip to content

Commit

Permalink
fix: reuse config_utils
Browse files Browse the repository at this point in the history
  • Loading branch information
Manuthor committed Nov 16, 2024
1 parent c1f0fa7 commit e0d484b
Show file tree
Hide file tree
Showing 43 changed files with 291 additions and 594 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/target
/data
/env
.cargo_check/
.vscode
.env
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# ```
# - If docker-compose-up fails to install, try installing docker-compose and installing the latest docker version.
# If you get an error related to unavailable ports, you might have an instance of redis-server running on the same port. If so, stop the redis-server with the following command: `sudo systemctl stop redis-server.service` and relaunch the pre-commit hooks.
exclude: crate/client/datasets/users.json
exclude: test_data
repos:
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v3.4.0
Expand Down
21 changes: 17 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,13 @@ actix-server = { version = "2.5", default-features = false }
actix-web = { version = "4.9.0", default-features = false }
base64 = "0.21"
clap = { version = "4.5", default-features = false }
cosmian_http_client = { git = "https://www.github.com/Cosmian/http_client_server", branch = "add_http_client" }
# cosmian_http_client = { path ="../../core/client_server/crate/http_client" }
cosmian_logger = { git = "https://www.github.com/Cosmian/http_client_server", branch = "add_http_client" }
# cloudproof_findex = { path = "../cloudproof_rust/crates/findex" }
cloudproof_findex = { git = "https://www.github.com/Cosmian/cloudproof_rust", branch = "feat/add_basic_findex_rest_client" }
# cosmian_config_utils = { path ="../../core/client_server/crate/config_utils" }
# cosmian_http_client = { path ="../../core/client_server/crate/http_client" }
cosmian_http_client = { git = "https://www.github.com/Cosmian/http_client_server", branch = "add_http_client" }
cosmian_config_utils = { git = "https://www.github.com/Cosmian/http_client_server", branch = "add_http_client" }
cosmian_logger = { git = "https://www.github.com/Cosmian/http_client_server", branch = "add_http_client" }
der = { version = "0.7", default-features = false }
openssl = { version = "0.10", default-features = false }
pem = "3.0"
Expand Down
1 change: 1 addition & 0 deletions crate/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ clap = { workspace = true, features = [
"cargo",
] }
cloudproof_findex = { workspace = true, features = ["rest-interface"] }
cosmian_config_utils = { workspace = true }
cosmian_logger = { workspace = true }
cosmian_findex_client = { path = "../client" }
cosmian_findex_structs = { path = "../structs" }
Expand Down
1 change: 1 addition & 0 deletions crate/cli/src/actions/login.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use clap::Parser;
use cosmian_config_utils::ConfigUtils;
use cosmian_findex_client::reexport::{
cosmian_findex_config::{FindexClientConfig, FindexConfigError},
cosmian_http_client::LoginState,
Expand Down
1 change: 1 addition & 0 deletions crate/cli/src/actions/logout.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use clap::Parser;
use cosmian_config_utils::ConfigUtils;
use cosmian_findex_client::reexport::cosmian_findex_config::{
FindexClientConfig, FindexConfigError,
};
Expand Down
194 changes: 0 additions & 194 deletions crate/cli/src/actions/markdown.rs

This file was deleted.

1 change: 0 additions & 1 deletion crate/cli/src/actions/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ pub mod console;
pub mod findex;
pub mod login;
pub mod logout;
pub mod markdown;
pub mod permissions;
pub mod version;
1 change: 1 addition & 0 deletions crate/cli/src/commands.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use std::path::PathBuf;

use clap::{Parser, Subcommand};
use cosmian_config_utils::ConfigUtils;
use cosmian_findex_client::{reexport::cosmian_findex_config::FindexClientConfig, FindexClient};
use cosmian_logger::log_init;
use tracing::info;
Expand Down
4 changes: 4 additions & 0 deletions crate/cli/src/error/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use cloudproof_findex::{
db_interfaces::DbInterfaceError,
reexport::{cosmian_crypto_core::CryptoCoreError, cosmian_findex},
};
use cosmian_config_utils::ConfigUtilsError;
use cosmian_findex_client::{
reexport::{cosmian_findex_config::FindexConfigError, cosmian_http_client::HttpClientError},
FindexClientError,
Expand Down Expand Up @@ -77,6 +78,9 @@ pub enum CliError {

#[error(transparent)]
ConfigError(#[from] FindexConfigError),

#[error(transparent)]
ConfigUtilsError(#[from] ConfigUtilsError),
}

impl From<der::Error> for CliError {
Expand Down
Loading

0 comments on commit e0d484b

Please sign in to comment.