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
#[cfg(feature = "postgres")]
pub use sqlx;

mod esrs;

pub mod aggregate {
    pub use crate::esrs::aggregate::{Aggregate, AggregateName};
    pub use crate::esrs::state::AggregateState;
}

pub mod error {
    pub use serde_json::Error as JsonError;
    #[cfg(feature = "postgres")]
    pub use sqlx::Error as SqlxError;
}

#[cfg(feature = "postgres")]
pub mod policy {
    pub use crate::esrs::postgres::policy::PgPolicy;
}

#[cfg(feature = "postgres")]
pub mod projector {
    pub use crate::esrs::postgres::projector::PgProjector;
}

pub mod store {
    #[cfg(feature = "postgres")]
    pub use crate::esrs::postgres::PgStore;
    pub use crate::esrs::store::{EventStore, ProjectEvent, StoreEvent};
}

pub mod types {
    pub use crate::esrs::SequenceNumber;
}