An internal Decree.Middleware that extracts the target aggregate's
identity from the command.
It runs after every middleware a router registers, and after Decree.Middleware.CommandId,
so it reads the command they leave. It resolves the identity once per dispatch, and assigns
it twice: :aggregate_uuid is the stream name, with any identify prefix, and
:aggregate_identity is the same string before the prefix.
The identity is checked as the command's field, or the route's identity function, gave it,
before the prefix: it must be a lowercase canonical UUID (Decree.UUID.canonical?/1), or,
on a route declared opaque: true, a non-empty binary. Anything else, a missing field and
nil included, answers {:error, :invalid_aggregate_identity} and halts. Nothing converts,
trims or downcases it, so the stream is named by exactly what the requester sent.
Summary
Functions
Callback implementation for Decree.Middleware.after_dispatch/1.
Callback implementation for Decree.Middleware.after_failure/1.
Callback implementation for Decree.Middleware.before_dispatch/1.
Functions
Callback implementation for Decree.Middleware.after_dispatch/1.
Callback implementation for Decree.Middleware.after_failure/1.
Callback implementation for Decree.Middleware.before_dispatch/1.