thy1016/mooncmd/event does not have a README file
pub(all) suberror EventBusError {
PublishError(String)
}pub(all) struct EventBus[AggregateId, E] {
publish : (EventBus[AggregateId, E], Array[EventMessage[AggregateId, E]]) -> Unit raise EventBusError
}pub(all) struct EventMessage[AggregateId, E] {
event : E
event_id : String
aggregate_id : AggregateId
aggregate_version : Int
correlation_id : String
causation_id : String
user_id : String?
timestamp : Int64
metadata : Json
schema_version : Int
}fn[AggregateId, E, C] EventMessage::from_command(event : E, aggregate_id : AggregateId, version : Int, cmd : CommandMessage[C]) -> EventMessage[AggregateId, E]fn[AggregateId, E] EventMessage::new(event : E, aggregate_id : AggregateId, version : Int) -> EventMessage[AggregateId, E]pub(all) enum EventStream[AggregateId, E] {
Nil
Cons(EventMessage[AggregateId, E], EventStream[AggregateId, E])
}fn[AggregateId, E] EventStream::to_array(self : EventStream[AggregateId, E]) -> Array[EventMessage[AggregateId, E]]Install
Download zipCommand-side event sourcing kernel for MoonBit: pure command handlers, auto-wrapped EventMessage metadata (correlation/causation), optimistic concurrency with duplicate-version rejection, SQLite event store, projections and snapshots.