QueryRoutes

The routes of an aggregate's query models.

A model is queried with POST /{context}/{aggregate}/{model}/query, the operation in the body's kind; a GET of the same path answers the model's capability descriptor. Both end in SEGMENT, which CommandRoutes keeps from the commands, so they never meet a command route.

Properties

Link copied to clipboard
const val EVENTS: String

The aggregate's event streams, one record per commit.

Link copied to clipboard
const val GET: String
Link copied to clipboard
const val SEGMENT: String

The last segment of every query route.

Link copied to clipboard
const val SNAPSHOT: String

The aggregate's snapshots, the default read model, when the aggregate keeps them.

Functions

Link copied to clipboard
fun of(context: String, aggregate: String, model: String): List<RouteManifest>

The query route of model of aggregate in context, then the route of its capability descriptor.

Link copied to clipboard
fun queries(context: String, aggregate: String, snapshots: Boolean): List<QueryManifest>

The query models of aggregate in context: SNAPSHOT when its snapshots are enabled, and EVENTS always.