Refactor event payload handling across adapters
- Introduced `event-payload` crate to centralize event payload definitions. - Updated NATS and PostgreSQL adapters to use the new `EventPayload` type. - Removed redundant event payload definitions and conversion implementations from NATS and PostgreSQL adapters. - Simplified SQLite event queue to utilize the new `EventPayload`. - Refactored wiring functions for PostgreSQL and SQLite to improve database connection handling and migration. - Cleaned up presentation and worker crates by removing unused event publisher dependencies and related wiring functions.
This commit is contained in:
17
Cargo.lock
generated
17
Cargo.lock
generated
@@ -1625,6 +1625,17 @@ dependencies = [
|
||||
"pin-project-lite",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "event-payload"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"chrono",
|
||||
"domain",
|
||||
"serde",
|
||||
"uuid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "event-publisher"
|
||||
version = "0.1.0"
|
||||
@@ -2829,6 +2840,7 @@ dependencies = [
|
||||
"async-trait",
|
||||
"chrono",
|
||||
"domain",
|
||||
"event-payload",
|
||||
"futures",
|
||||
"serde",
|
||||
"serde_json",
|
||||
@@ -3373,6 +3385,7 @@ dependencies = [
|
||||
name = "postgres"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
"chrono",
|
||||
"domain",
|
||||
@@ -3390,6 +3403,7 @@ dependencies = [
|
||||
"async-trait",
|
||||
"chrono",
|
||||
"domain",
|
||||
"event-payload",
|
||||
"futures",
|
||||
"serde",
|
||||
"serde_json",
|
||||
@@ -3454,7 +3468,6 @@ dependencies = [
|
||||
"doc",
|
||||
"domain",
|
||||
"dotenvy",
|
||||
"event-publisher",
|
||||
"export",
|
||||
"http-body-util",
|
||||
"infer",
|
||||
@@ -4532,6 +4545,7 @@ dependencies = [
|
||||
"async-trait",
|
||||
"chrono",
|
||||
"domain",
|
||||
"event-payload",
|
||||
"futures",
|
||||
"serde",
|
||||
"serde_json",
|
||||
@@ -6242,7 +6256,6 @@ dependencies = [
|
||||
"chrono",
|
||||
"domain",
|
||||
"dotenvy",
|
||||
"event-publisher",
|
||||
"export",
|
||||
"futures",
|
||||
"metadata",
|
||||
|
||||
Reference in New Issue
Block a user