Modules
Use Decree to build your own Elixir applications following the CQRS/ES pattern.
What an aggregate module declares about itself, read where the aggregate is defined.
Use Decree.Aggregate.Multi to generate multiple events from a single
command.
Aggregate is a GenServer process used to provide access to an
instance of an event sourced aggregate.
The Decree.Aggregates.AggregateLifespan behaviour is used to control the
aggregate GenServer process lifespan.
Builds an aggregate's state by loading its snapshot and/or events from the event store.
The default implementation of the Decree.Aggregates.AggregateLifespan
behaviour.
Defines the arguments used to execute a command for an aggregate.
Supervises Decree.Aggregates.Aggregate instance processes.
Defines a Decree application.
A command whose command_id its requester mints.
Composite router allows you to combine multiple router modules into a single router able to dispatch any registered command from an included child router.
Contains the aggregate, events, and metadata created by a successfully executed command.
Defines the behaviour a command handler module must implement to support command dispatch.
Command routing macro to allow configuration of each command to its command handler.
A rule decided over events, with no aggregate process and no stream of its own to replay.
Finds the event types a decision's condition can miss.
Test helpers for a Decree.Decision, for an application to import.
What an aggregate's append has to check beyond its own stream.
What a rule's reads answered, for one call of execute/2.
The one function that runs just before the store append.
Data related to an event handling failure.
Defines the behaviour an event handler must implement and provides a convenience macro that implements the behaviour, allowing you to handle only the events you are interested in processing.
Map events to/from the structs used for persistence.
Which of an event's fields and metadata entries hold personal data, and whose.
The tag kinds an event may not be appended without.
What Decree.Event.Tags.tags/2 may read besides the event.
Finds the event modules with no Decree.Event.Tags implementation.
The tags an event carries in the store, beyond the ones the framework adds.
Protocol to allow an event to be transformed before being passed to a consumer.
Use the event store configured for a Decree application: the Decree.Store module named by
event_store: [event_store: MyApp.EventStore] in its config, called with the store process's
name:. The framework's Decree.EventStore.EventData, RecordedEvent and SnapshotData are
mapped to the store's structs and back here.
EventData contains the data for a single event before being persisted to storage.
Contains the persisted stream identity, type, data, and metadata for a single event.
Snapshot data
Specification to convert between an Elixir struct and a corresponding string type.
Middleware provides an extension point to add functions that you want to be called for every command the router dispatches.
An internal Decree.Middleware that refuses a command whose command_id is not a
lowercase canonical UUID.
An internal Decree.Middleware that extracts the target aggregate's
identity from the command.
Pipeline is a struct used as an argument in the callback functions of modules
implementing the Decree.Middleware behaviour.
Personal fields: values encrypted under their subject's key before they reach the store.
What an aggregate reads of its personal fields.
What an event declares through Decree.Event.PersonalFields.
The stored form of a personal value: a JSON object, never a string.
Where the data keys of Decree.PersonalFields come from.
A subject's wrapped data key, on a stream of its own that can be hard deleted.
A key stream's last event, read: its wrap, and the version a rewrap appends at.
Stands in for an exception raised while a decrypted value was in hand.
A subject's data key, wrapped, as the first event of its stream.
A subject's data key under a new wrap, with its key_id unchanged.
Read model projections for Decree using Ecto.
Use the process registry configured for a Decree application.
Defines a behaviour for a process registry to be used by Decree.
Local process registration, restricted to a single node, using Elixir's
Registry module.
A serializer that uses the JSON format and Jason library.
A type provider that uses the Elixir module name
Specification of a generic serializer.
Decree.Store allows you to define one or more event store modules to append, read, and subscribe to streams of events.
The :condition of a conditional Decree.Store.append_to_stream/4.
An append that the database did not accept, classified by what a caller can do about it.
What an append wrote, answered by Decree.Store.append_to_stream/4 and
Decree.Store.append_to_streams/2 when called with returning: :append_result.
Provides access to the Decree.Store configuration.
EventData contains the data for a single event before being persisted to storage
A serializer that uses the JSON format.
Temporary. This module stands in for Postgrex.Notifications because Postgrex
0.22.4, the newest release on Hex, drops a notification that arrives while its idle ping
runs. The fix, elixir-ecto/postgrex#795 (commit bd402a5310), is in no release yet.
Remove this module, and go back to Postgrex.Notifications, at the first Hex Postgrex
release that contains bd402a5310 (expected to be 0.23). sparkle-space/sparklespace#8532
tracks that clean-up. Before removing it, check that the release's
Postgrex.Notifications also covers what 0.22.4's lacks besides the ping
A GenStage producer which listens for event stream notifications from PostgreSQL using the
PostgreSQL LISTEN/NOTIFY mechanism and emits Decree.Store.Notifications.Notification events
for subscribed Decree.Store.Notifications.Publisher processes.
Represents a notification received from PostgreSQL's LISTEN/NOTIFY mechanism.
A GenStage consumer which subscribes to a Decree.Store.Notifications.Listener and receives
Decree.Store.Notifications.Notification events, reading the corresponding range of events from
storage, deserializing them, and broadcasting them to PubSub subscribers for the relevant storage
stream.
Pub/sub using Elixir's local Registry module.
What Decree.Store.read_query/2 and Decree.Store.stream_query/2 search for.
What Decree.Store.read_query/2 answers, all of it from one database snapshot.
Decree.Store.RecordedEvent contains the persisted data and metadata for a
single event.
Specification of a serializer to convert between an Elixir term and its representation in the database.
Snapshot data.
The grammar of the facts that say whether a tag index can be trusted.
Task to create the Decree.Store
Task to drop the Decree.Store database.
Task to initalize the Decree.Store database
Task to migrate Decree.Store
Task to show the migration status of Decree.Store
Raised by a read (read_*, stream_*, read_query) that meets an event whose type the
event store's serializer does not know (see Decree.Store.Serializer.known_type?/1).
Typically an event appended by a newer release of the application, read by an older one.
Generate and format random, version 4 UUIDs.
Finds the routed handler arms that can accept a command without an event.
Conveniences for writing Decree.Store related Mix tasks.
Mix Tasks
Create the database for the Decree.Store.
Drop the database for the Decree.Store.
Initialize the database for the Decree.Store.
Migrate an existing Decree.Store database.
Show the migration status of an existing Decree.Store database.
Fails on any routed handler arm that can accept a command without appending an event.