Expand description
The transform pipeline: traits a request/response step implements, the mutable request/response views they operate on, and the registry of code-registered custom transforms.
Modules§
- error_
remap error_remapresponse built-in: when the upstream status equalswhen_status, replace the body with a normalized{error, detail?}contract (status kept).- inject
injectbuilt-in: set a header or a dotted body path from a context key or a constant. Caller-supplied values at the target are overwritten.- wrap
wrapbuilt-in: nest the incoming JSON body under a key, then inject sibling fields. Reproduces the integration/callenvelope:{ <under>: <original body>, org: …, workspace: … }.
Structs§
- Proxy
Request - Mutable view of the request a
RequestTransformmay edit before forwarding.bodyis JSON when present; non-JSON bodies are exposed as raw bytes and are not editable as JSON. - Proxy
Response - Mutable view of the upstream response. v1 transforms touch status/headers and may replace the body with a small JSON value; if no replacement is set the handler streams the upstream body unchanged.
- Transform
Registry - Code-registered custom transforms, looked up by
{ transform = "name" }.
Enums§
- Transform
Error - A step’s failure:
Rejectshort-circuits the pipeline with a contract body.