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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#![forbid(unsafe_code)]
#![deny(missing_docs)]
#![deny(clippy::all)]
#![warn(rust_2018_idioms)]
// #![warn(clippy::pedantic,missing_debug_implementations)]

//! # cqrs-es2
//!
//! **A lightweight, opinionated CQRS and event sourcing framework
//! targeting serverless architectures.**
//!
//! [![Publish](https://github.com/brgirgis/cqrs-es2/actions/workflows/crates-io.yml/badge.svg)](https://github.com/brgirgis/cqrs-es2/actions/workflows/crates-io.yml)
//! [![Test](https://github.com/brgirgis/cqrs-es2/actions/workflows/rust-ci.yml/badge.svg)](https://github.com/brgirgis/cqrs-es2/actions/workflows/rust-ci.yml)
//! [![Crates.io](https://img.shields.io/crates/v/cqrs-es2)](https://crates.io/crates/cqrs-es2)
//! [![docs](https://img.shields.io/badge/API-docs-blue.svg)](https://docs.rs/cqrs-es2)
//! ---
//!
//! ## Installation
//!
//! ```toml
//! [dependencies]
//! cqrs-es2 = "0.2.5"
//! serde = { version = "^1.0.127", features = ["derive"] }
//! serde_json = "^1.0.66"
//! ```
//!
//! ## Usage
//!
//! Documentation [is available here](https://doc.rust-cqrs.org) along with an introduction to CQRS and event sourcing.
//!
//! A demo application [is available here](https://github.com/brgirgis/cqrs-es2-demo).

pub use crate::{
    aggregates::*,
    events::*,
    framework::*,
    queries::*,
    stores::*,
};

// Aggregates module holds the central traits that define the
// fundamental component of CQRS.
mod aggregates;

// Events module provides the abstract domain events and associated
// wrapper.
mod events;

// Stores module holds the abstract `EventStore` trait as well as an
// in-memory implementation.
mod stores;

// Queries module provides the basic downstream query objects needed
// to render queries (or "views") that describe the state of the
// system.
mod queries;

// Framework provides the base framework and associated logic for
// processing loading aggregates via an event store and subsequently
// processing commands.
mod framework;

// Documentation items
#[doc(hidden)]
pub mod doc;

/// Test provides a test framework for building a resilient test base
/// around aggregates. A `TestFramework` should be used to build a
/// comprehensive set of aggregate tests to verify your application
/// logic (aka business rules).
pub mod test;