Liking cljdoc? Tell your friends :D

reitit.middleware


*max-compile-depth*

source

chain

(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-result

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

Endpoint

source

IntoMiddlewareprotocol

into-middleware
(into-middleware this data opts)
source

Middleware

source

middleware-handler

(middleware-handler router)
source

router

(router data)
(router data opts)

Creates a reitit.core/Router from raw route data and optionally an options map with support for Middleware. See documentation on reitit.core/router for available options. In addition, the following options are available:

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

Example:

(router
  ["/api" {:middleware [wrap-format wrap-oauth2]}
  ["/users" {:middleware [wrap-delete]
               :handler get-user}]])
Creates a [[reitit.core/Router]] from raw route data and optionally an options map with
support for Middleware. See documentation on [[reitit.core/router]] for available options.
In addition, the following options are available:

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

Example:

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

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

× close