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