Liking cljdoc? Tell your friends :D

io.randomseed.utils.reitit.http

Random utils, Reitit support functions.

Random utils, Reitit support functions.
raw docstring

Matchablecljprotocol

The Identifiable protocol describes operations on path or route ID/name data.

The Identifiable protocol describes operations on path or route ID/name data.

matchclj

(match r)
(match id r)
(match id params r)

Converts or coerces the given argument to a Match.

Converts or coerces the given argument to a Match.

match?clj

(match? r)

Returns true if the given argument is a Match object.

Returns true if the given argument is a Match object.
sourceraw docstring

pathclj

(path req-or-match)
(path req-or-router name-or-path)
(path req-or-router name-or-path path-params)

For the given request map, a Reitit match object, or a Reitit router, returns the path of a route for the current path or for a path specified by its unique identifier or a string. Optionally path params map can be given if the path supports path params.

For the given request map, a Reitit match object, or a Reitit router, returns the
path of a route for the current path or for a path specified by its unique
identifier or a string. Optionally path params map can be given if the path
supports path params.
sourceraw docstring

req-or-route-paramclj

(req-or-route-param req-or-match param)
(req-or-route-param req-or-router param default)

Works like io.randomseed.utils.reitit.http/route-data-param but first tries to get the parameter from a request map, if the first argument is a request map.

Works like io.randomseed.utils.reitit.http/route-data-param but first tries to get
the parameter from a request map, if the first argument is a request map.
sourceraw docstring

Routablecljprotocol

The Routable protocol describes operations on route-related data.

The Routable protocol describes operations on route-related data.

routerclj

(router r)

Converts or coerces the given argument to a Router.

Converts or coerces the given argument to a Router.

router?clj

(router? r)

Returns true if the given argument is a Router object.

Returns true if the given argument is a Router object.
sourceraw docstring

route-conflicting?clj

(route-conflicting? req-or-match)
(route-conflicting? req-or-router name-or-path)
(route-conflicting? req-or-router name-or-path path-params)

For the given request map, a Reitit match object, or a Reitit router, returns true if a route (for the path specified by its unique identifier or a string) is marked as conflicting. Optionally path params map can be given if the path supports path params.

For the given request map, a Reitit match object, or a Reitit router, returns true
if a route (for the path specified by its unique identifier or a string) is marked
as conflicting. Optionally path params map can be given if the path supports path
params.
sourceraw docstring

route-dataclj

(route-data req-or-match)
(route-data req-or-router name-or-path)
(route-data req-or-router name-or-path path-params)

For the given request map, a Reitit match object, or a Reitit router, returns a route data map for the current path or for the path specified by its unique identifier or a string. Optionally path params map can be given if the path supports path params.

For the given request map, a Reitit match object, or a Reitit router, returns a
route data map for the current path or for the path specified by its unique
identifier or a string. Optionally path params map can be given if the path
supports path params.
sourceraw docstring

route-data-paramclj

(route-data-param req-or-match param)
(route-data-param req-or-router param name-or-path)
(route-data-param req-or-router param name-or-path path-params)

For the given request map, a Reitit match object, or a Reitit router, returns the requested parameter of a route data map for the current path or for the path specified by its unique identifier or a string. Optionally path params map can be given if the path supports path params.

For the given request map, a Reitit match object, or a Reitit router, returns the
requested parameter of a route data map for the current path or for the path
specified by its unique identifier or a string. Optionally path params map can be
given if the path supports path params.
sourceraw docstring

route-handlerclj

(route-handler req-or-match)
(route-handler req-or-router name-or-path)
(route-handler req-or-router name-or-path path-params)

For the given request map, a Reitit match object, or a Reitit router, returns a handler of a route for the path specified by its unique identifier or a string. Optionally path params map can be given if the path supports path params.

For the given request map, a Reitit match object, or a Reitit router, returns a
handler of a route for the path specified by its unique identifier or a
string. Optionally path params map can be given if the path supports path params.
sourceraw docstring

route-middlewareclj

(route-middleware req-or-match)
(route-middleware req-or-router name-or-path)
(route-middleware req-or-router name-or-path path-params)

For the given request map, a Reitit match object, or a Reitit router, returns a middleware chain of a route for the path specified by its unique identifier or a string. Optionally path params map can be given if the path supports path params.

For the given request map, a Reitit match object, or a Reitit router, returns a
middleware chain of a route for the path specified by its unique identifier or a
string. Optionally path params map can be given if the path supports path params.
sourceraw docstring

route-nameclj

(route-name req-or-match)
(route-name req-or-router name-or-path)
(route-name req-or-router name-or-path path-params)

For the given request map, a Reitit match object, or a Reitit router, returns a unique name of a route for the path specified by its unique identifier or a string. Optionally path params map can be given if the path supports path params.

For the given request map, a Reitit match object, or a Reitit router, returns a
unique name of a route for the path specified by its unique identifier or a
string. Optionally path params map can be given if the path supports path params.
sourceraw docstring

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

× close