1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//! `mako-markt` — market data library for German energy market (`MaKo` / `marktd`).
//!
//! # Architecture
//!
//! ```text
//! crates/mako-markt/ ← traits, domain types, CloudEvents structs, makod HTTP client
//! NO axum, NO utoipa, NO server framework
//! services/marktd/ ← axum handlers, routes, config, PostgreSQL impls, main.rs
//! ```
//!
//! This mirrors the `mako-engine` / `makod` split exactly:
//! `mako-engine` defines traits only; `makod` wires axum + `SlateDB`.
//!
//! # Modules
//!
//! | Module | Contents |
//! |--------|----------|
//! | [`domain`] | `Sparte`, `ProcessStatus`; re-exports `MaloId`, `MeloId`, `MarktpartnerId` from [`rubo4e::identifiers`]; `nad_agency_code()` for NAD DE3055 coding authority |
//! | [`repository`] | Repository traits: `MaloRepository`, `MeloRepository`, `SubscriptionRepository`, `CorrelationIndex`, `PartnerRepository`, `VersorgungsStatusRepository`, **`MaloGridRepository`**, **`NbEnergiemixRepository`**; record types incl. `VersorgungsStatusRecord`, `LieferStatus`, `NbContractRecord`, **`MaloGridRecord`**, **`NbEnergiemixRecord`** |
//! | [`cloudevents`] | CloudEvents 1.0 envelope types: `InboundMakoEvent` (from `makod`) and `MarktEvent` (`marktd`-emitted `de.markt.*`) |
//! | [`commands`] | ERP command-name constants shared between `makod`'s registry and dispatching services (`processd`, …) |
//! | [`makod_client`] | Typed HTTP client for `makod` admin + command APIs (reqwest-backed); requires `makod-client` feature |
//! | [`error`] | `MdmError` — all domain-level error variants |
//! | [`testing`] | In-memory test doubles (behind `testing` feature): incl. `InMemoryVersorgungsStatusRepository`, `InMemoryMaloGridRepository` |