Liking cljdoc? Tell your friends :D

reitit.middleware


*max-compile-depth*clj/s

source

chainclj/s

(chain middleware handler)
(chain middleware handler data)
(chain middleware handler data opts)

Creates a Ring middleware chain out of sequence of IntoMiddleware and Handler. Optional takes route data and (Router) opts.

Creates a Ring middleware chain out of sequence of IntoMiddleware
and Handler. Optional takes route data and (Router) opts.
sourceraw docstring

compile-resultclj/s

(compile-result route opts)
(compile-result [path {:keys [middleware handler] :as data}] opts scope)
source

Endpointcljs

source

IntoMiddlewareclj/s≠protocol

into-middlewareclj/s

(into-middleware this data opts)
source

Middlewarecljs

source

middleware-handlerclj/s

(middleware-handler router)
source

routerclj/s

(router data)
(router data opts)

Creates a reitit.core/Router from raw route data and optionally an options map with support for Middleware. See docs for details.

Example:

(router ["/api" {:middleware [wrap-format wrap-oauth2]} ["/users" {:middleware [wrap-delete] :handler get-user}]])

Options:

keydescription
:reitit.middleware/transformFunction of [Middleware] => [Middleware] to transform the expanded Middleware (default: identity).
:reitit.middleware/registryMap of keyword => IntoMiddleware to replace keyword references into Middleware

See other router options from reitit.core/router.

Creates a [[reitit.core/Router]] from raw route data and optionally an options map with
support for Middleware. See [docs](https://metosin.github.io/reitit/) for details.

Example:

  (router
    ["/api" {:middleware [wrap-format wrap-oauth2]}
      ["/users" {:middleware [wrap-delete]
                   :handler get-user}]])

Options:

| key                            | description |
| -------------------------------|-------------|
| `:reitit.middleware/transform` | Function of `[Middleware] => [Middleware]` to transform the expanded Middleware (default: identity).
| `:reitit.middleware/registry`  | Map of `keyword => IntoMiddleware` to replace keyword references into Middleware

See other router options from [[reitit.core/router]].
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close