Liking cljdoc? Tell your friends :D

reitit.middleware


*max-compile-depth*clj/s


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.
raw docstring

compile-resultclj/s

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

IntoMiddlewareclj/sprotocol

into-middlewareclj/s

(into-middleware this data opts)

middleware-handlerclj/s

(middleware-handler router)

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 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}]])
raw docstring

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

× close