-
Notifications
You must be signed in to change notification settings - Fork 0
/
io.randomseed.utils.reitit.http.html
18 lines (18 loc) · 15.3 KB
/
io.randomseed.utils.reitit.http.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<!DOCTYPE html PUBLIC ""
"">
<html><head><meta charset="UTF-8" /><title>io.randomseed.utils.reitit.http documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script><link rel="stylesheet" type="text/css" href="css/randomseed.css" /></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Random:utils</span> <span class="project-version">1.2.34</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="10_introduction.html"><div class="inner"><span>Introduction</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>io</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>randomseed</span></div></div></li><li class="depth-3"><a href="io.randomseed.utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.bot.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>bot</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.bus.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>bus</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.crypto.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crypto</span></div></a></li><li class="depth-4"><a href="io.randomseed.utils.db.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>db</span></div></a></li><li class="depth-5"><a href="io.randomseed.utils.db.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.fs.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>fs</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.ip.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>ip</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.log.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>log</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.map.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>map</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.nop-cache.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>nop-cache</span></div></a></li><li class="depth-4"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reitit</span></div></div></li><li class="depth-5 current"><a href="io.randomseed.utils.reitit.http.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>http</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.set.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>set</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.time.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>time</span></div></a></li><li class="depth-4"><a href="io.randomseed.utils.validators.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validators</span></div></a></li><li class="depth-5"><a href="io.randomseed.utils.validators.common.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>common</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.var.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>var</span></div></a></li><li class="depth-4"><a href="io.randomseed.utils.vec.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>vec</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="io.randomseed.utils.reitit.http.html#var-Matchable"><div class="inner"><span>Matchable</span></div></a></li><li class="depth-2 branch"><a href="io.randomseed.utils.reitit.http.html#var-match"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>match</span></div></a></li><li class="depth-2"><a href="io.randomseed.utils.reitit.http.html#var-match.3F"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>match?</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.reitit.http.html#var-path"><div class="inner"><span>path</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.reitit.http.html#var-req-or-route-param"><div class="inner"><span>req-or-route-param</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.reitit.http.html#var-Routable"><div class="inner"><span>Routable</span></div></a></li><li class="depth-2 branch"><a href="io.randomseed.utils.reitit.http.html#var-router"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>router</span></div></a></li><li class="depth-2"><a href="io.randomseed.utils.reitit.http.html#var-router.3F"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>router?</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.reitit.http.html#var-route-conflicting.3F"><div class="inner"><span>route-conflicting?</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.reitit.http.html#var-route-data"><div class="inner"><span>route-data</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.reitit.http.html#var-route-data-param"><div class="inner"><span>route-data-param</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.reitit.http.html#var-route-handler"><div class="inner"><span>route-handler</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.reitit.http.html#var-route-middleware"><div class="inner"><span>route-middleware</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.reitit.http.html#var-route-name"><div class="inner"><span>route-name</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">io.randomseed.utils.reitit.http</h1><h4 class="added">added in 1.0.5</h4><div class="doc"><div class="markdown"><p>Random utils, Reitit support functions.</p>
</div></div><div class="public anchor" id="var-Matchable"><h3>Matchable</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>The Identifiable protocol describes operations on path or route ID/name data.</p>
</div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-match"><h3>match</h3><div class="usage"><code>(match r)</code><code>(match id r)</code><code>(match id params r)</code></div><div class="doc"><div class="markdown"><p>Converts or coerces the given argument to a Match.</p>
</div></div></div><div class="public anchor" id="var-match.3F"><h3>match?</h3><div class="usage"><code>(match? r)</code></div><div class="doc"><div class="markdown"><p>Returns true if the given argument is a Match object.</p>
</div></div></div></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/reitit/http.clj#L28">view source</a></div></div><div class="public anchor" id="var-path"><h3>path</h3><div class="usage"><code>(path req-or-match)</code><code>(path req-or-router name-or-path)</code><code>(path req-or-router name-or-path path-params)</code></div><div class="doc"><div class="markdown"><p>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.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/reitit/http.clj#L206">view source</a></div></div><div class="public anchor" id="var-req-or-route-param"><h3>req-or-route-param</h3><div class="usage"><code>(req-or-route-param req-or-match param)</code><code>(req-or-route-param req-or-router param default)</code></div><div class="doc"><div class="markdown"><p>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.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/reitit/http.clj#L218">view source</a></div></div><div class="public anchor" id="var-Routable"><h3>Routable</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>The Routable protocol describes operations on route-related data.</p>
</div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-router"><h3>router</h3><div class="usage"><code>(router r)</code></div><div class="doc"><div class="markdown"><p>Converts or coerces the given argument to a Router.</p>
</div></div></div><div class="public anchor" id="var-router.3F"><h3>router?</h3><div class="usage"><code>(router? r)</code></div><div class="doc"><div class="markdown"><p>Returns true if the given argument is a Router object.</p>
</div></div></div></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/reitit/http.clj#L19">view source</a></div></div><div class="public anchor" id="var-route-conflicting.3F"><h3>route-conflicting?</h3><div class="usage"><code>(route-conflicting? req-or-match)</code><code>(route-conflicting? req-or-router name-or-path)</code><code>(route-conflicting? req-or-router name-or-path path-params)</code></div><div class="doc"><div class="markdown"><p>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.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/reitit/http.clj#L194">view source</a></div></div><div class="public anchor" id="var-route-data"><h3>route-data</h3><div class="usage"><code>(route-data req-or-match)</code><code>(route-data req-or-router name-or-path)</code><code>(route-data req-or-router name-or-path path-params)</code></div><div class="doc"><div class="markdown"><p>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.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/reitit/http.clj#L137">view source</a></div></div><div class="public anchor" id="var-route-data-param"><h3>route-data-param</h3><div class="usage"><code>(route-data-param req-or-match param)</code><code>(route-data-param req-or-router param name-or-path)</code><code>(route-data-param req-or-router param name-or-path path-params)</code></div><div class="doc"><div class="markdown"><p>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.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/reitit/http.clj#L149">view source</a></div></div><div class="public anchor" id="var-route-handler"><h3>route-handler</h3><div class="usage"><code>(route-handler req-or-match)</code><code>(route-handler req-or-router name-or-path)</code><code>(route-handler req-or-router name-or-path path-params)</code></div><div class="doc"><div class="markdown"><p>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.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/reitit/http.clj#L183">view source</a></div></div><div class="public anchor" id="var-route-middleware"><h3>route-middleware</h3><div class="usage"><code>(route-middleware req-or-match)</code><code>(route-middleware req-or-router name-or-path)</code><code>(route-middleware req-or-router name-or-path path-params)</code></div><div class="doc"><div class="markdown"><p>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.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/reitit/http.clj#L172">view source</a></div></div><div class="public anchor" id="var-route-name"><h3>route-name</h3><div class="usage"><code>(route-name req-or-match)</code><code>(route-name req-or-router name-or-path)</code><code>(route-name req-or-router name-or-path path-params)</code></div><div class="doc"><div class="markdown"><p>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.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/reitit/http.clj#L161">view source</a></div></div></div></body></html>