Expand description
The REST request pipeline of Postrust: an HTTP request in, the response the PostgREST-dialect API gives it out.
No web framework is involved. The server (postrust-server) wraps this in
axum, and the Lambda adapter reaches it through the server. It is meant to
be shared with a host that cannot run axum – a Cloudflare Worker – too,
once the database interface is driver-neutral; it does not build for wasm32
yet, since it still talks to PostgreSQL through sqlx. See issue #50.
let response = postrust_engine::handle(&state, request).await;Modules§
- observe
- Measurements the pipeline takes for a host that exports metrics.
Traits§
- State
- Everything the pipeline needs from its host.
Functions§
- allow
- What the resource this request names allows, or why it cannot say.
- authenticate
- Who a request is, from its
Authorizationheader. - authorization
- The
Authorizationheader a request carries, as authentication reads it. - error_
response - Build an error response.
- handle
- Answer a request to the REST API.
- jwks_
builder - The JWKS
PGRST_JWT_JWKS_URLnames, to be fetched throughfetch, orNonewhen it is not set. - jwt_
config - The JWT configuration an
AppConfigdescribes. - jwt_
config_ with_ keys - As
jwt_config, with keys the host has already parsed.