Skip to content

Commit

Permalink
refactor: remove unused 'services'
Browse files Browse the repository at this point in the history
  • Loading branch information
nanderstabel committed Jul 31, 2024
1 parent e7ad5a2 commit 9503181
Show file tree
Hide file tree
Showing 12 changed files with 7 additions and 15 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

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

1 change: 0 additions & 1 deletion agent_issuance/src/credential/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ pub mod entity;
pub mod error;
pub mod event;
pub mod queries;
pub mod services;
1 change: 0 additions & 1 deletion agent_issuance/src/credential/services.rs

This file was deleted.

1 change: 0 additions & 1 deletion agent_issuance/src/offer/aggregate.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// use agent_secret_manager::services::SecretManagerServices;
use agent_shared::generate_random_string;
use async_trait::async_trait;
use cqrs_es::Aggregate;
Expand Down
1 change: 0 additions & 1 deletion agent_issuance/src/offer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ pub mod command;
pub mod error;
pub mod event;
pub mod queries;
pub mod services;
1 change: 0 additions & 1 deletion agent_issuance/src/offer/services.rs

This file was deleted.

7 changes: 3 additions & 4 deletions agent_issuance/src/server_config/aggregate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ use tracing::info;
use crate::server_config::command::ServerConfigCommand;
use crate::server_config::error::ServerConfigError;
use crate::server_config::event::ServerConfigEvent;
use crate::server_config::services::ServerConfigServices;

/// An aggregate that holds the configuration of the server.
#[derive(Clone, Default, Deserialize, Serialize, Debug)]
Expand All @@ -29,7 +28,7 @@ impl Aggregate for ServerConfig {
type Command = ServerConfigCommand;
type Event = ServerConfigEvent;
type Error = ServerConfigError;
type Services = ServerConfigServices;
type Services = ();

fn aggregate_type() -> String {
"server_config".to_string()
Expand Down Expand Up @@ -156,7 +155,7 @@ pub mod server_config_tests {

#[test]
fn test_load_server_metadata() {
ServerConfigTestFramework::with(ServerConfigServices)
ServerConfigTestFramework::with(())
.given_no_previous_events()
.when(ServerConfigCommand::InitializeServerMetadata {
authorization_server_metadata: AUTHORIZATION_SERVER_METADATA.clone(),
Expand All @@ -169,7 +168,7 @@ pub mod server_config_tests {
}
#[test]
fn test_create_credentials_supported() {
ServerConfigTestFramework::with(ServerConfigServices)
ServerConfigTestFramework::with(())
.given(vec![ServerConfigEvent::ServerMetadataInitialized {
authorization_server_metadata: AUTHORIZATION_SERVER_METADATA.clone(),
credential_issuer_metadata: CREDENTIAL_ISSUER_METADATA.clone(),
Expand Down
1 change: 0 additions & 1 deletion agent_issuance/src/server_config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ pub mod command;
pub mod error;
pub mod event;
pub mod queries;
pub mod services;
1 change: 0 additions & 1 deletion agent_issuance/src/server_config/services.rs

This file was deleted.

1 change: 1 addition & 0 deletions agent_secret_manager/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ async-trait = "0.1"
base64.workspace = true
cqrs-es = "0.4.2"
did_manager.workspace = true
identity_iota.workspace = true
jsonwebtoken = "9.3"
log = "0.4"
oid4vc-core.workspace = true
Expand Down
3 changes: 1 addition & 2 deletions agent_store/src/in_memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use agent_issuance::{
pre_authorized_code::{PreAuthorizedCodeQuery, PreAuthorizedCodeView},
},
},
server_config::services::ServerConfigServices,
services::IssuanceServices,
state::{CommandHandlers, IssuanceState, ViewRepositories},
SimpleLoggingQuery,
Expand Down Expand Up @@ -139,7 +138,7 @@ pub async fn issuance_state(
command: CommandHandlers {
server_config: Arc::new(
server_config_event_publishers.into_iter().fold(
AggregateHandler::new(ServerConfigServices)
AggregateHandler::new(())
.append_query(SimpleLoggingQuery {})
.append_query(generic_query(server_config.clone())),
|aggregate_handler, event_publisher| aggregate_handler.append_event_publisher(event_publisher),
Expand Down
3 changes: 1 addition & 2 deletions agent_store/src/postgres.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use agent_issuance::{
offer::queries::{access_token::AccessTokenQuery, pre_authorized_code::PreAuthorizedCodeQuery},
server_config::services::ServerConfigServices,
services::IssuanceServices,
state::{CommandHandlers, IssuanceState, ViewRepositories},
SimpleLoggingQuery,
Expand Down Expand Up @@ -92,7 +91,7 @@ pub async fn issuance_state(
command: CommandHandlers {
server_config: Arc::new(
server_config_event_publishers.into_iter().fold(
AggregateHandler::new(pool.clone(), ServerConfigServices)
AggregateHandler::new(pool.clone(), ())
.append_query(SimpleLoggingQuery {})
.append_query(generic_query(server_config.clone())),
|aggregate_handler, event_publisher| aggregate_handler.append_event_publisher(event_publisher),
Expand Down

0 comments on commit 9503181

Please sign in to comment.