-
Notifications
You must be signed in to change notification settings - Fork 0
/
amelinium.api.html
219 lines (219 loc) · 141 KB
/
amelinium.api.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
<!DOCTYPE html PUBLIC ""
"">
<html><head><meta charset="UTF-8" /><title>amelinium.api 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">Amelinium</span> <span class="project-version">1.0.1</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><li class="depth-1 "><a href="20_hypermedia.html"><div class="inner"><span>Hypermedia-driven</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><a href="amelinium.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>amelinium</span></div></a></li><li class="depth-2 branch"><a href="amelinium.admin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>admin</span></div></a></li><li class="depth-2 current"><a href="amelinium.api.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>api</span></div></a></li><li class="depth-3"><a href="amelinium.api.controller.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>controller</span></div></a></li><li class="depth-4"><a href="amelinium.api.controller.user.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>user</span></div></a></li><li class="depth-3"><a href="amelinium.api.url.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>url</span></div></a></li><li class="depth-2 branch"><a href="amelinium.app.html"><div class="inner"><span class="tree" style="top: -114px;"><span class="top" style="height: 123px;"></span><span class="bottom"></span></span><span>app</span></div></a></li><li class="depth-2"><a href="amelinium.auth.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>auth</span></div></a></li><li class="depth-3"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>algo</span></div></div></li><li class="depth-4 branch"><a href="amelinium.auth.algo.append.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>append</span></div></a></li><li class="depth-4 branch"><a href="amelinium.auth.algo.fail.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fail</span></div></a></li><li class="depth-4 branch"><a href="amelinium.auth.algo.pbkdf2.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pbkdf2</span></div></a></li><li class="depth-4"><a href="amelinium.auth.algo.scrypt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scrypt</span></div></a></li><li class="depth-3 branch"><a href="amelinium.auth.pwd.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>pwd</span></div></a></li><li class="depth-3"><a href="amelinium.auth.specs.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>specs</span></div></a></li><li class="depth-2"><a href="amelinium.common.html"><div class="inner"><span class="tree" style="top: -238px;"><span class="top" style="height: 247px;"></span><span class="bottom"></span></span><span>common</span></div></a></li><li class="depth-3 branch"><a href="amelinium.common.controller.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>controller</span></div></a></li><li class="depth-3"><a href="amelinium.common.oplog.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>oplog</span></div></a></li><li class="depth-4"><a href="amelinium.common.oplog.auth.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>auth</span></div></a></li><li class="depth-3 branch"><a href="amelinium.common.populators.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>populators</span></div></a></li><li class="depth-3"><a href="amelinium.common.swagger.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>swagger</span></div></a></li><li class="depth-2 branch"><a href="amelinium.core.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2"><a href="amelinium.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-3"><a href="amelinium.db.sql.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sql</span></div></a></li><li class="depth-2 branch"><a href="amelinium.errors.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>errors</span></div></a></li><li class="depth-2"><a href="amelinium.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-3"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>client</span></div></div></li><li class="depth-4"><a href="amelinium.http.client.twilio.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>twilio</span></div></a></li><li class="depth-3 branch"><a href="amelinium.http.handler.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>handler</span></div></a></li><li class="depth-3"><a href="amelinium.http.middleware.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>middleware</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.coercion.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>coercion</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.content.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>content</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.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-4 branch"><a href="amelinium.http.middleware.debug.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>debug</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.format.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>format</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.headers.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>headers</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.language.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>language</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.lazy-req.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy-req</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.populators.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>populators</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.remote-ip.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>remote-ip</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.roles.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>roles</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.session.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>session</span></div></a></li><li class="depth-4"><a href="amelinium.http.middleware.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-3 branch"><a href="amelinium.http.router.html"><div class="inner"><span class="tree" style="top: -424px;"><span class="top" style="height: 433px;"></span><span class="bottom"></span></span><span>router</span></div></a></li><li class="depth-3"><a href="amelinium.http.server.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>server</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.server.jetty.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>jetty</span></div></a></li><li class="depth-4"><a href="amelinium.http.server.undertow.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>undertow</span></div></a></li><li class="depth-2"><a href="amelinium.i18n.html"><div class="inner"><span class="tree" style="top: -672px;"><span class="top" style="height: 681px;"></span><span class="bottom"></span></span><span>i18n</span></div></a></li><li class="depth-3"><a href="amelinium.i18n.pluralizers.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pluralizers</span></div></a></li><li class="depth-2 branch"><a href="amelinium.identity.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-2 branch"><a href="amelinium.locale.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>locale</span></div></a></li><li class="depth-2 branch"><a href="amelinium.logging.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>logging</span></div></a></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>model</span></div></div></li><li class="depth-3 branch"><a href="amelinium.model.confirmation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>confirmation</span></div></a></li><li class="depth-3"><a href="amelinium.model.user.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>user</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -83px;"><span class="top" style="height: 92px;"></span><span class="bottom"></span></span><span>proto</span></div></div></li><li class="depth-3 branch"><a href="amelinium.proto.auth.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>auth</span></div></a></li><li class="depth-3 branch"><a href="amelinium.proto.errors.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>errors</span></div></a></li><li class="depth-3 branch"><a href="amelinium.proto.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="amelinium.proto.session.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>session</span></div></a></li><li class="depth-3"><a href="amelinium.proto.twilio.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>twilio</span></div></a></li><li class="depth-2 branch"><a href="amelinium.schemas.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>schemas</span></div></a></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>server</span></div></div></li><li class="depth-3"><a href="amelinium.server.ssl.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>ssl</span></div></a></li><li class="depth-2 branch"><a href="amelinium.system.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>system</span></div></a></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>types</span></div></div></li><li class="depth-3 branch"><a href="amelinium.types.auth.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>auth</span></div></a></li><li class="depth-3 branch"><a href="amelinium.types.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-3 branch"><a href="amelinium.types.errors.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>errors</span></div></a></li><li class="depth-3 branch"><a href="amelinium.types.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="amelinium.types.session.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>session</span></div></a></li><li class="depth-3"><a href="amelinium.types.twilio.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>twilio</span></div></a></li><li class="depth-2 branch"><a href="amelinium.utils.html"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-2"><a href="amelinium.web.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>web</span></div></a></li><li class="depth-3"><a href="amelinium.web.controller.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>controller</span></div></a></li><li class="depth-4 branch"><a href="amelinium.web.controller.admin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>admin</span></div></a></li><li class="depth-4"><a href="amelinium.web.controller.user.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>user</span></div></a></li><li class="depth-3 branch"><a href="amelinium.web.js.html"><div class="inner"><span class="tree" style="top: -83px;"><span class="top" style="height: 92px;"></span><span class="bottom"></span></span><span>js</span></div></a></li><li class="depth-3 branch"><a href="amelinium.web.taggers.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>taggers</span></div></a></li><li class="depth-3"><a href="amelinium.web.url.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>url</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="amelinium.api.html#var-add-body"><div class="inner"><span>add-body</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-add-header"><div class="inner"><span>add-header</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-add-headers"><div class="inner"><span>add-headers</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-add-missing-sub-status"><div class="inner"><span>add-missing-sub-status</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-add-missing-sub-status-to-response"><div class="inner"><span>add-missing-sub-status-to-response</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-add-slash"><div class="inner"><span>add-slash</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-add-status"><div class="inner"><span>add-status</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-anti-spam-code"><div class="inner"><span>anti-spam-code</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-assoc-body"><div class="inner"><span>assoc-body</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-auth-page"><div class="inner"><span>auth-page</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-auth-page.3F"><div class="inner"><span>auth-page?</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-body-add-lang"><div class="inner"><span>body-add-lang</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-body-add-session-id"><div class="inner"><span>body-add-session-id</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-body-add-session-status"><div class="inner"><span>body-add-session-status</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-current-page"><div class="inner"><span>current-page</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-current-page-id"><div class="inner"><span>current-page-id</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-current-page-id-or-path"><div class="inner"><span>current-page-id-or-path</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-default-contexts-labeler"><div class="inner"><span>default-contexts-labeler</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-go-to"><div class="inner"><span>go-to</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-guess-lang-param"><div class="inner"><span>guess-lang-param</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-hard-lock-time"><div class="inner"><span>hard-lock-time</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-hard-locked.3F"><div class="inner"><span>hard-locked?</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-has-any-role.3F"><div class="inner"><span>has-any-role?</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-has-param.3F"><div class="inner"><span>has-param?</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-has-role.3F"><div class="inner"><span>has-role?</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-lang-config"><div class="inner"><span>lang-config</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-lang-id"><div class="inner"><span>lang-id</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-lang-param"><div class="inner"><span>lang-param</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-lang-redir"><div class="inner"><span>lang-redir</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-lang-str"><div class="inner"><span>lang-str</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-lang-url"><div class="inner"><span>lang-url</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-localized-page"><div class="inner"><span>localized-page</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-localized-path"><div class="inner"><span>localized-path</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-localized-see-other"><div class="inner"><span>localized-see-other</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-localized-temporary-redirect"><div class="inner"><span>localized-temporary-redirect</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-lock-wait"><div class="inner"><span>lock-wait</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-lock-wait-default"><div class="inner"><span>lock-wait-default</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-login-auth-state"><div class="inner"><span>login-auth-state</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-login-page"><div class="inner"><span>login-page</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-login-page.3F"><div class="inner"><span>login-page?</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-move-to"><div class="inner"><span>move-to</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-on-page.3F"><div class="inner"><span>on-page?</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-oplog"><div class="inner"><span>oplog</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-oplog-config"><div class="inner"><span>oplog-config</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-oplog-logger"><div class="inner"><span>oplog-logger</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-oplog-logger-populated"><div class="inner"><span>oplog-logger-populated</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-page"><div class="inner"><span>page</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-parameterized-page"><div class="inner"><span>parameterized-page</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-path"><div class="inner"><span>path</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-path-language"><div class="inner"><span>path-language</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-path-param"><div class="inner"><span>path-param</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-path-params"><div class="inner"><span>path-params</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-path-template-with-param"><div class="inner"><span>path-template-with-param</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-path-variants"><div class="inner"><span>path-variants</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-remove-status"><div class="inner"><span>remove-status</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render"><div class="inner"><span>render</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-accepted"><div class="inner"><span>render-accepted</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-already-reported"><div class="inner"><span>render-already-reported</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-bad-gateway"><div class="inner"><span>render-bad-gateway</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-bad-params"><div class="inner"><span>render-bad-params</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-bad-request"><div class="inner"><span>render-bad-request</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-bandwidth-limit-exceeded"><div class="inner"><span>render-bandwidth-limit-exceeded</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-blocked-by-windows-parental-controls"><div class="inner"><span>render-blocked-by-windows-parental-controls</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-conflict"><div class="inner"><span>render-conflict</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-continue"><div class="inner"><span>render-continue</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-created"><div class="inner"><span>render-created</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-early-hints"><div class="inner"><span>render-early-hints</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-enhance-your-calm"><div class="inner"><span>render-enhance-your-calm</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-error"><div class="inner"><span>render-error</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-expectation-failed"><div class="inner"><span>render-expectation-failed</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-failed-dependency"><div class="inner"><span>render-failed-dependency</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-forbidden"><div class="inner"><span>render-forbidden</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-found"><div class="inner"><span>render-found</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-gateway-timeout"><div class="inner"><span>render-gateway-timeout</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-gone"><div class="inner"><span>render-gone</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-http-version-not-supported"><div class="inner"><span>render-http-version-not-supported</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-im-a-teapot"><div class="inner"><span>render-im-a-teapot</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-im-used"><div class="inner"><span>render-im-used</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-in-progress"><div class="inner"><span>render-in-progress</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-insufficient-storage"><div class="inner"><span>render-insufficient-storage</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-internal-server-error"><div class="inner"><span>render-internal-server-error</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-length-required"><div class="inner"><span>render-length-required</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-localized-created"><div class="inner"><span>render-localized-created</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-locked"><div class="inner"><span>render-locked</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-loop-detected"><div class="inner"><span>render-loop-detected</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-method-not-allowed"><div class="inner"><span>render-method-not-allowed</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-misdirected-request"><div class="inner"><span>render-misdirected-request</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-multi-status"><div class="inner"><span>render-multi-status</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-network-authentication-required"><div class="inner"><span>render-network-authentication-required</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-network-connect-timeout"><div class="inner"><span>render-network-connect-timeout</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-network-read-timeout"><div class="inner"><span>render-network-read-timeout</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-no-content"><div class="inner"><span>render-no-content</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-non-authoritative-information"><div class="inner"><span>render-non-authoritative-information</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-not-acceptable"><div class="inner"><span>render-not-acceptable</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-not-extended"><div class="inner"><span>render-not-extended</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-not-found"><div class="inner"><span>render-not-found</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-not-implemented"><div class="inner"><span>render-not-implemented</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-ok"><div class="inner"><span>render-ok</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-page"><div class="inner"><span>render-page</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-partial-content"><div class="inner"><span>render-partial-content</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-payment-required"><div class="inner"><span>render-payment-required</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-precondition-failed"><div class="inner"><span>render-precondition-failed</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-precondition-required"><div class="inner"><span>render-precondition-required</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-processing"><div class="inner"><span>render-processing</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-proxy-authentication-required"><div class="inner"><span>render-proxy-authentication-required</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-request-entity-too-large"><div class="inner"><span>render-request-entity-too-large</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-request-header-fields-too-large"><div class="inner"><span>render-request-header-fields-too-large</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-request-timeout"><div class="inner"><span>render-request-timeout</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-request-uri-too-long"><div class="inner"><span>render-request-uri-too-long</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-requested-range-not-satisfiable"><div class="inner"><span>render-requested-range-not-satisfiable</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-reset-content"><div class="inner"><span>render-reset-content</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-response"><div class="inner"><span>render-response</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-response-force"><div class="inner"><span>render-response-force</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-retry-with"><div class="inner"><span>render-retry-with</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-service-unavailable"><div class="inner"><span>render-service-unavailable</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-status"><div class="inner"><span>render-status</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-switching-protocols"><div class="inner"><span>render-switching-protocols</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-too-early"><div class="inner"><span>render-too-early</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-too-many-requests"><div class="inner"><span>render-too-many-requests</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-unauthorized"><div class="inner"><span>render-unauthorized</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-unavailable-for-legal-reasons"><div class="inner"><span>render-unavailable-for-legal-reasons</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-unordered-collection"><div class="inner"><span>render-unordered-collection</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-unprocessable-entity"><div class="inner"><span>render-unprocessable-entity</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-unsupported-media-type"><div class="inner"><span>render-unsupported-media-type</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-upgrade-required"><div class="inner"><span>render-upgrade-required</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-render-variant-also-negotiates"><div class="inner"><span>render-variant-also-negotiates</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-response"><div class="inner"><span>response</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-response.3F"><div class="inner"><span>response?</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-role-required.21"><div class="inner"><span>role-required!</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-roles-for-context"><div class="inner"><span>roles-for-context</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-roles-for-contexts"><div class="inner"><span>roles-for-contexts</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-roles-matrix"><div class="inner"><span>roles-matrix</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-roles-tabler"><div class="inner"><span>roles-tabler</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-router-match.3F"><div class="inner"><span>router-match?</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-see-other"><div class="inner"><span>see-other</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-session-status"><div class="inner"><span>session-status</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-slash-redir"><div class="inner"><span>slash-redir</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-soft-lock-passed"><div class="inner"><span>soft-lock-passed</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-soft-lock-remains"><div class="inner"><span>soft-lock-remains</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-soft-lock-time"><div class="inner"><span>soft-lock-time</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-soft-locked.3F"><div class="inner"><span>soft-locked?</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-split-query-params"><div class="inner"><span>split-query-params</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-split-query-params-simple"><div class="inner"><span>split-query-params-simple</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-strictly-localized-page"><div class="inner"><span>strictly-localized-page</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-template-path"><div class="inner"><span>template-path</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-temporary-redirect"><div class="inner"><span>temporary-redirect</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-update-body"><div class="inner"><span>update-body</span></div></a></li><li class="depth-1"><a href="amelinium.api.html#var-with-role-only.21"><div class="inner"><span>with-role-only!</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">amelinium.api</h1><h4 class="added">added in 1.0.0</h4><div class="doc"><div class="markdown"><p>API helpers for amelinium.</p>
</div></div><div class="public anchor" id="var-add-body"><h3>add-body</h3><h4 class="type">macro</h4><div class="usage"><code>(add-body req & body)</code></div><div class="doc"><div class="markdown"><p>Adds a response body to a request map <code>req</code> under its key <code>:response/body</code> using <code>qassoc</code>. The body is a result of evaluating expressions passed as additional arguments (<code>body</code>). Returns updated <code>req</code>. Assumes that <code>req</code> is always a map.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L928">view source</a></div></div><div class="public anchor" id="var-add-header"><h3>add-header</h3><h4 class="type">macro</h4><div class="usage"><code>(add-header req header-name & body)</code></div><div class="doc"><div class="markdown"><p>Adds a header <code>header</code> to <code>:response/headers</code> map of the <code>req</code> using built-in function <code>qassoc</code>. If a header name argument is a literal keyword, a character, a number, or a literal string, it will be converted to a string literal and placed as <code>qassoc</code> argument. Otherwise it will be left as is and wrapped into a call to <code>io.randomseed.utils/some-str</code> to ensure the result is a string run-time. All arguments of the body are used to calculate a value of the header. Assumes that <code>req</code> is always a map.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L2317">view source</a></div></div><div class="public anchor" id="var-add-headers"><h3>add-headers</h3><h4 class="type">macro</h4><div class="usage"><code>(add-headers req header-name header-value)</code><code>(add-headers req header-name header-value & more)</code></div><div class="doc"><div class="markdown"><p>Adds headers with associated values to <code>:response/headers</code> map of the <code>req</code> using built-in function <code>qassoc</code>. If any header name argument is a literal keyword, a character, a number, or a literal string, it will be converted to a string literal and placed as an argument passed to <code>qassoc</code>. Otherwise it will be left as is and wrapped in a call to <code>io.randomseed.utils/some-str</code> to ensure at run-time that the result will be a string. Missing header value, if any, will be padded with <code>nil</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L2339">view source</a></div></div><div class="public anchor" id="var-add-missing-sub-status"><h3>add-missing-sub-status</h3><div class="usage"><code>(add-missing-sub-status req sub-status)</code><code>(add-missing-sub-status req sub-status sub-key)</code><code>(add-missing-sub-status req sub-status sub-key main-key)</code><code>(add-missing-sub-status req sub-status sub-key main-key tr-sub)</code><code>(add-missing-sub-status req sub-status sub-key main-key sub-title-key sub-desc-key see-also-key)</code><code>(add-missing-sub-status req sub-status sub-key main-key sub-title-key sub-desc-key see-also-key tr-sub)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L682">view source</a></div></div><div class="public anchor" id="var-add-missing-sub-status-to-response"><h3>add-missing-sub-status-to-response</h3><div class="usage"><code>(add-missing-sub-status-to-response req out sub-status)</code><code>(add-missing-sub-status-to-response req out sub-status sub-key)</code><code>(add-missing-sub-status-to-response req out sub-status sub-key main-key)</code><code>(add-missing-sub-status-to-response req out sub-status sub-key main-key tr-sub)</code><code>(add-missing-sub-status-to-response req out sub-status sub-key main-key sub-title-key sub-desc-key see-also-key)</code><code>(add-missing-sub-status-to-response req out sub-status sub-key main-key sub-title-key sub-desc-key see-also-key tr-sub)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L644">view source</a></div></div><div class="public anchor" id="var-add-slash"><h3>add-slash</h3><div class="usage"><code>(add-slash uri)</code></div><div class="doc"><div class="markdown"><p>Adds trailing slash to a path unless it already exists.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L1441">view source</a></div></div><div class="public anchor" id="var-add-status"><h3>add-status</h3><h4 class="type">macro</h4><div class="usage"><code>(add-status req & body)</code></div><div class="doc"><div class="markdown"><p>Adds response status to a request map <code>req</code> under its key <code>:response/status</code> using <code>qassoc</code>. The status is a result of evaluating expressions passed as additional arguments. Returns updated <code>req</code>. Assumes that <code>req</code> is always a map.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L2524">view source</a></div></div><div class="public anchor" id="var-anti-spam-code"><h3>anti-spam-code</h3><div class="usage"><code>(anti-spam-code config)</code><code>(anti-spam-code config num)</code><code>(anti-spam-code config num rng)</code></div><div class="doc"><div class="markdown"><p>Generates anti-spam value pairs string containing randomly selected fields and values using <code>validators/gen-required</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L813">view source</a></div></div><div class="public anchor" id="var-assoc-body"><h3>assoc-body</h3><h4 class="type">macro</h4><div class="usage"><code>(assoc-body req k v)</code><code>(assoc-body req k v & more)</code></div><div class="doc"><div class="markdown"><p>Adds keys with associated values to <code>:response/body</code> map of the <code>req</code> using <code>qassoc</code>. If any key argument is a literal keyword, a character, or a literal string, it will be converted to a keyword literal and placed as <code>qassoc</code> argument. Otherwise it will be left as is and wrapped into a call to <code>io.randomseed.utils/some-keyword</code> to ensure the result is a keyword run-time. Missing last value, if any, will be padded with <code>nil</code>. If there is no body or the body is empty, it will initialize it with a map expression, otherwise it will use <code>assoc</code>. Assumes that <code>req</code> is always a map.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L951">view source</a></div></div><div class="public anchor" id="var-auth-page"><h3>auth-page</h3><div class="usage"><code>(auth-page req)</code><code>(auth-page req lang-id)</code></div><div class="doc"><div class="markdown"><p>Returns a path for the authentication page. The page must have ID of <code>:user/welcome</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L1002">view source</a></div></div><div class="public anchor" id="var-auth-page.3F"><h3>auth-page?</h3><div class="usage"><code>(auth-page? req)</code><code>(auth-page? req ring-match)</code></div><div class="doc"><div class="markdown"><p>Returns true if the current (or given as a match) page is an authentication page (has :auth-page? route data set to a truthy value).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L160">view source</a></div></div><div class="public anchor" id="var-body-add-lang"><h3>body-add-lang</h3><div class="usage"><code>(body-add-lang req)</code><code>(body-add-lang req lang)</code><code>(body-add-lang req lang field)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L838">view source</a></div></div><div class="public anchor" id="var-body-add-session-id"><h3>body-add-session-id</h3><div class="usage"><code>(body-add-session-id req)</code><code>(body-add-session-id req smap)</code><code>(body-add-session-id req session-key)</code><code>(body-add-session-id req smap field)</code><code>(body-add-session-id req session-key field)</code></div><div class="doc"><div class="markdown"><p>Adds session ID field to the response body (<code>:response/body</code>) of the given request map <code>req</code>. Works only on a valid sessions, having <code>:id</code> field set.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L858">view source</a></div></div><div class="public anchor" id="var-body-add-session-status"><h3>body-add-session-status</h3><div class="usage"><code>(body-add-session-status req)</code><code>(body-add-session-status req smap)</code><code>(body-add-session-status req session-key)</code><code>(body-add-session-status req smap translate-sub)</code><code>(body-add-session-status req session-key translate-sub)</code></div><div class="doc"><div class="markdown"><p>Gets the value of <code>:response/status</code> key of the given <code>req</code> and if it is set to <code>:auth/session-error</code> or <code>:error/session</code>, adds <code>:session-status</code> to a response body with a value set to a result of calling <code>session-status</code> on a current session. If there is no session error detected, it simply calls <code>body-add-session</code> to add session ID to the response body.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L892">view source</a></div></div><div class="public anchor" id="var-current-page"><h3>current-page</h3><div class="usage"><code>(current-page req)</code></div><div class="doc"><div class="markdown"><p>Returns a path of the current page.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L981">view source</a></div></div><div class="public anchor" id="var-current-page-id"><h3>current-page-id</h3><div class="usage"><code>(current-page-id req-or-match)</code></div><div class="doc"><div class="markdown"><p>Returns an identifier of a current page if it is defined for a HTTP route.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L986">view source</a></div></div><div class="public anchor" id="var-current-page-id-or-path"><h3>current-page-id-or-path</h3><div class="usage"><code>(current-page-id-or-path req)</code></div><div class="doc"><div class="markdown"><p>Returns an identifier of a current page if it is defined for a HTTP route or a path if the page name is not defined.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L991">view source</a></div></div><div class="public anchor" id="var-default-contexts-labeler"><h3>default-contexts-labeler</h3><div class="usage"><code>(default-contexts-labeler _ ids)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L1792">view source</a></div></div><div class="public anchor" id="var-go-to"><h3>go-to</h3><div class="usage"><code>(go-to)</code><code>(go-to req)</code><code>(go-to url)</code><code>(go-to req url)</code><code>(go-to req name-or-path)</code><code>(go-to req name-or-path path-params)</code><code>(go-to req name-or-path path-params query-params)</code><code>(go-to req name-or-path lang)</code><code>(go-to req name-or-path lang path-params)</code><code>(go-to req name-or-path lang path-params query-params)</code><code>(go-to req name-or-path lang path-params query-params & more)</code></div><div class="doc"><div class="markdown"><p>Uses the <code>localized-page</code> function to calculate the destination path on a basis of page name (identifier) or a path (a string) and performs a redirect with code 303 to it using <code>resp/see-other</code>. If the language is given it uses the <code>localized-page</code> function. If there is no language given but the page identified by its name requires a language parameter to be set, it will be obtained from the given request map (under the key <code>:language/str</code>).</p>
<p>The difference between this function and its regular counterpart (if defined) is in binary variants of them (when a request map and a name or a path are given as arguments). The regular function will fail to generate a redirect if there is no language parameter and the given path does not point to an existing page. On the contrary, this function will generate a localized path using a language obtained from a request (under <code>:language/str</code> key) and if there will be no language-parameterized variant of the path, it will fail. Use this function to make sure that a localized path will be produced, or <code>nil</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L1371">view source</a></div></div><div class="public anchor" id="var-guess-lang-param"><h3>guess-lang-param</h3><div class="usage"><code>(guess-lang-param)</code><code>(guess-lang-param src)</code></div><div class="doc"><div class="markdown"><p>For the given src argument, tries to obtain a language ID. If it’s a map it looks for <code>:param</code> key and for <code>:language/settings</code> if that fails. If <code>:language/settings</code> is found, it will try to get :param, assuming it’s a map too. If the argument is not a map it will simply convert it into a keyword (without a namespace). If all of that fails (e.g. the src is nil) then the :lang keyword is returned.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L139">view source</a></div></div><div class="public anchor" id="var-hard-lock-time"><h3>hard-lock-time</h3><div class="usage"><code>(hard-lock-time user)</code></div><div class="doc"><div class="markdown"><p>Gets a hard-lock time for a given user specified by a map having the :locked key.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L1469">view source</a></div></div><div class="public anchor" id="var-hard-locked.3F"><h3>hard-locked?</h3><div class="usage"><code>(hard-locked? user)</code></div><div class="doc"><div class="markdown"><p>Returns true if the given user map contains the :locked key and a value associated with it is not nil. Does not connect to a database.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L1497">view source</a></div></div><div class="public anchor" id="var-has-any-role.3F"><h3>has-any-role?</h3><div class="usage"><code>(has-any-role? req role)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L1743">view source</a></div></div><div class="public anchor" id="var-has-param.3F"><h3>has-param?</h3><div class="usage"><code>(has-param? match param)</code></div><div class="doc"><div class="markdown"><p>Checks if the given route match can be parameterized with a parameter of the given id.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L340">view source</a></div></div><div class="public anchor" id="var-has-role.3F"><h3>has-role?</h3><div class="usage"><code>(has-role? req role)</code><code>(has-role? req role context)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L1749">view source</a></div></div><div class="public anchor" id="var-lang-config"><h3>lang-config</h3><div class="usage"><code>(lang-config req)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L2240">view source</a></div></div><div class="public anchor" id="var-lang-id"><h3>lang-id</h3><div class="usage"><code>(lang-id req)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L2218">view source</a></div></div><div class="public anchor" id="var-lang-param"><h3>lang-param</h3><div class="usage"><code>(lang-param req)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L2214">view source</a></div></div><div class="public anchor" id="var-lang-redir"><h3>lang-redir</h3><div class="usage"><code>(lang-redir req)</code></div><div class="doc"><div class="markdown"><p>Redirects to a best-suited language version of the URI. Uses <code>:browser</code> pickers chain to get the right language if the path is language-parameterized.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L1457">view source</a></div></div><div class="public anchor" id="var-lang-str"><h3>lang-str</h3><div class="usage"><code>(lang-str req)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L2227">view source</a></div></div><div class="public anchor" id="var-lang-url"><h3>lang-url</h3><div class="usage"><code>(lang-url req path-or-name lang params query-params lang-settings)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L834">view source</a></div></div><div class="public anchor" id="var-localized-page"><h3>localized-page</h3><div class="usage"><code>(localized-page req)</code><code>(localized-page req name-or-path)</code><code>(localized-page req name-or-path path-params)</code><code>(localized-page req name-or-path path-params query-params)</code><code>(localized-page req name-or-path lang)</code><code>(localized-page req name-or-path lang path-params)</code><code>(localized-page req name-or-path lang path-params query-params)</code><code>(localized-page req name-or-path lang lang-required?)</code><code>(localized-page req name-or-path lang path-params lang-required?)</code><code>(localized-page req name-or-path lang path-params query-params lang-required?)</code><code>(localized-page req name-or-path lang path-params query-params lang-required? name-path-fallback?)</code><code>(localized-page req name-or-path lang path-params query-params lang-required? name-path-fallback? router)</code><code>(localized-page _ name-or-path lang path-params query-params lang-required? name-path-fallback? router language-settings-or-param)</code></div><div class="doc"><div class="markdown"><p>Generates a page path for the given page identifier and language identifier. When called with just a request map, returns a path of the current page but re-generated to support current language in use (taken from <code>:language/str</code> key of the request map).</p>
<p>The optional <code>name-path-fallback?</code> argument, when set to a truthy value (<code>true</code> by default), causes non-matching route identifier to be retried by extracting its path and calling this function for that path given as a string.</p>
<p>The optional <code>lang-required?</code> argument (set to <code>false</code> when not given) enables extra check eliminating pages which do not support the given language parameter. Example:</p>
<p><code>(localized-page req :login-page :pl true)</code></p>
<p>will fail if there is no parameter <code>:lang</code> handled by the route named <code>:login-page</code>.</p>
<p>When the given path is already parameterized with language then re-parameterized path is generated and checked if it exists, unless the value of the parameter is the same as the existing one. In such case the path is returned after a quick existence check.</p>
<p>Additional path parameters (<code>path-params</code>) can be given to be used when matching by name. Giving extra (unknown to route) parameters does not affect lookup. Giving <code>path-params</code> when matching by path causes them to be silently ignored.</p>
<p>Additional query parameters (<code>query-params</code>) can be given. They will be used when generating path. If the path was given and it already contains query parameters, they will be replaced.</p>
<p>If the path is given instead of a route identifier, it must exist (after being equipped with any extra parameters, if needed, using <code>path-params</code>).</p>
<p>When the <code>lang-required?</code> is set to <code>false</code> (default) and a path is given but it does not require language parameter, a path will be generated by testing whether it exists for regular and for slash-stripped or slash-added variant (the original variant goes first).</p>
<p>When the <code>lang-required?</code> is set to <code>false</code> (default) and a path is given but it does not require language parameter plus the <code>name-path-fallback?</code> argument is set to <code>:brute-force</code>, all possible path variants (with language parameter injected within its succesive segments) will be tried in hope that one will exist, regardless of parameter name that matches. Use it with caution as it may give weird matches; if for example, there is a route path <code>/users/:id</code> defined, and the given path is <code>/users/</code> with language set to <code>:pl</code>, then it will match <code>/users/pl</code> even though the parameter is not related to a language.</p>
<p>When the <code>lang-required?</code> is set to <code>true</code> and a path is given but it does not require a language parameter, all possible path variants (with parameter injected within its succesive segments) will be tried in hope that one will match, being a path that requires language parameter.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L573">view source</a></div></div><div class="public anchor" id="var-localized-path"><h3>localized-path</h3><div class="usage"><code>(localized-path)</code><code>(localized-path req)</code><code>(localized-path req name-or-path)</code><code>(localized-path req name-or-path lang)</code><code>(localized-path req name-or-path lang params)</code><code>(localized-path req name-or-path lang params query-params)</code><code>(localized-path name-or-path lang params query-params router language-settings-or-param)</code></div><div class="doc"><div class="markdown"><p>Creates a URL on a basis of route name or a path.</p>
<p>Uses very optimistic matching algorithm. Tries to obtain language from user settings and client settings if the path does not contain language information. Uses the <code>:default</code> language picker.</p>
<p>Non-matching route identifier is retried by extracting its path and calling the <code>localized-page</code> function for that path given as a string.</p>
<p>If a page found does not have a language parameter it is accepted too.</p>
<p>When the given path is already parameterized with language then re-parameterized path is generated and checked if it exists, unless the value of the parameter is the same as the existing one. In such case the path is returned after a quick existence check.</p>
<p>Additional path parameters (<code>params</code>) can be given to be used when matching by name. Giving extra (unknown to route) parameters does not affect lookup. Giving <code>params</code> when matching by path causes them to be silently ignored.</p>
<p>Additional query parameters (<code>query-params</code>) can be given. They will be used when generating path. If the path was given and it already contains query parameters, they will be replaced.</p>
<p>If the path is given instead of a route identifier, it must exist (after being equipped with any extra parameters, if needed, using <code>params</code>).</p>
<p>When a path is given but it does not require language parameter, a path will be generated by testing whether it exists for regular and for slash-stripped or slash-added variant (the original variant goes first).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L1933">view source</a></div></div><div class="public anchor" id="var-localized-see-other"><h3>localized-see-other</h3><div class="usage"><code>(localized-see-other)</code><code>(localized-see-other req)</code><code>(localized-see-other url)</code><code>(localized-see-other req url)</code><code>(localized-see-other req name-or-path)</code><code>(localized-see-other req name-or-path path-params)</code><code>(localized-see-other req name-or-path path-params query-params)</code><code>(localized-see-other req name-or-path lang)</code><code>(localized-see-other req name-or-path lang path-params)</code><code>(localized-see-other req name-or-path lang path-params query-params)</code><code>(localized-see-other req name-or-path lang path-params query-params & more)</code></div><div class="doc"><div class="markdown"><p>Uses the <code>localized-page</code> function to calculate the destination path on a basis of page name (identifier) or a path (a string) and performs a redirect with code 303 to it using <code>resp/see-other</code>. If the language is given it uses the <code>localized-page</code> function. If there is no language given but the page identified by its name requires a language parameter to be set, it will be obtained from the given request map (under the key <code>:language/str</code>).</p>
<p>The difference between this function and its regular counterpart (if defined) is in binary variants of them (when a request map and a name or a path are given as arguments). The regular function will fail to generate a redirect if there is no language parameter and the given path does not point to an existing page. On the contrary, this function will generate a localized path using a language obtained from a request (under <code>:language/str</code> key) and if there will be no language-parameterized variant of the path, it will fail. Use this function to make sure that a localized path will be produced, or <code>nil</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L1370">view source</a></div></div><div class="public anchor" id="var-localized-temporary-redirect"><h3>localized-temporary-redirect</h3><div class="usage"><code>(localized-temporary-redirect)</code><code>(localized-temporary-redirect req)</code><code>(localized-temporary-redirect url)</code><code>(localized-temporary-redirect req url)</code><code>(localized-temporary-redirect req name-or-path)</code><code>(localized-temporary-redirect req name-or-path path-params)</code><code>(localized-temporary-redirect req name-or-path path-params query-params)</code><code>(localized-temporary-redirect req name-or-path lang)</code><code>(localized-temporary-redirect req name-or-path lang path-params)</code><code>(localized-temporary-redirect req name-or-path lang path-params query-params)</code><code>(localized-temporary-redirect req name-or-path lang path-params query-params & more)</code></div><div class="doc"><div class="markdown"><p>Uses the <code>localized-page</code> function to calculate the destination path on a basis of page name (identifier) or a path (a string) and performs a redirect with code 307 to it using <code>resp/temporary-redirect</code>. If the language is given it uses the <code>localized-page</code> function. If there is no language given but the page identified by its name requires a language parameter to be set, it will be obtained from the given request map (under the key <code>:language/str</code>).</p>
<p>The difference between this function and its regular counterpart (if defined) is in binary variants of them (when a request map and a name or a path are given as arguments). The regular function will fail to generate a redirect if there is no language parameter and the given path does not point to an existing page. On the contrary, this function will generate a localized path using a language obtained from a request (under <code>:language/str</code> key) and if there will be no language-parameterized variant of the path, it will fail. Use this function to make sure that a localized path will be produced, or <code>nil</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L1373">view source</a></div></div><div class="public anchor" id="var-lock-wait"><h3>lock-wait</h3><div class="usage"><code>(lock-wait auth-config-or-lock-wait)</code></div><div class="doc"><div class="markdown"><p>Returns lock-wait configuration option taken from the authentication configuration map or given as a time duration. Does not connect to a database.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L1488">view source</a></div></div><div class="public anchor" id="var-lock-wait-default"><h3>lock-wait-default</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L1467">view source</a></div></div><div class="public anchor" id="var-login-auth-state"><h3>login-auth-state</h3><div class="usage"><code>(login-auth-state req)</code><code>(login-auth-state req ring-match)</code><code>(login-auth-state req login-page-data auth-page-data)</code><code>(login-auth-state req ring-match login-page-data auth-page-data)</code></div><div class="doc"><div class="markdown"><p>Helper which returns 2-element vector telling if the current (or given as a match) page is a login page (1st element) and/or an auth page (2nd element).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L166">view source</a></div></div><div class="public anchor" id="var-login-page"><h3>login-page</h3><div class="usage"><code>(login-page req)</code><code>(login-page req lang-id)</code></div><div class="doc"><div class="markdown"><p>Returns a path for the login page. The page must have ID of <code>:user/login</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L997">view source</a></div></div><div class="public anchor" id="var-login-page.3F"><h3>login-page?</h3><div class="usage"><code>(login-page? req)</code><code>(login-page? req ring-match)</code></div><div class="doc"><div class="markdown"><p>Returns true if the current (or given as a match) page is a login page (has <code>:login-page?</code> route data set to a truthy value).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L154">view source</a></div></div><div class="public anchor" id="var-move-to"><h3>move-to</h3><div class="usage"><code>(move-to)</code><code>(move-to req)</code><code>(move-to url)</code><code>(move-to req url)</code><code>(move-to req name-or-path)</code><code>(move-to req name-or-path path-params)</code><code>(move-to req name-or-path path-params query-params)</code><code>(move-to req name-or-path lang)</code><code>(move-to req name-or-path lang path-params)</code><code>(move-to req name-or-path lang path-params query-params)</code><code>(move-to req name-or-path lang path-params query-params & more)</code></div><div class="doc"><div class="markdown"><p>Uses the <code>localized-page</code> function to calculate the destination path on a basis of page name (identifier) or a path (a string) and performs a redirect with code 307 to it using <code>resp/temporary-redirect</code>. If the language is given it uses the <code>localized-page</code> function. If there is no language given but the page identified by its name requires a language parameter to be set, it will be obtained from the given request map (under the key <code>:language/str</code>).</p>
<p>The difference between this function and its regular counterpart (if defined) is in binary variants of them (when a request map and a name or a path are given as arguments). The regular function will fail to generate a redirect if there is no language parameter and the given path does not point to an existing page. On the contrary, this function will generate a localized path using a language obtained from a request (under <code>:language/str</code> key) and if there will be no language-parameterized variant of the path, it will fail. Use this function to make sure that a localized path will be produced, or <code>nil</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L1374">view source</a></div></div><div class="public anchor" id="var-on-page.3F"><h3>on-page?</h3><div class="usage"><code>(on-page?)</code><code>(on-page? req)</code><code>(on-page? req page-id-or-path)</code><code>(on-page? req page-id-or-path & more)</code></div><div class="doc"><div class="markdown"><p>Checks if a current page matches the given route name (if an identifier is given) or the exact path. For multiple page names or paths, it returns true when any of them matches.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L106">view source</a></div></div><div class="public anchor" id="var-oplog"><h3>oplog</h3><div class="usage"><code>(oplog req-or-match & message)</code></div><div class="doc"><div class="markdown"><p>Logs operation using operations logger. First argument should be a request map or a <code>Match</code> object containing configuration associated with the current route data under the <code>:oplog/config</code> key.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L92">view source</a></div></div><div class="public anchor" id="var-oplog-config"><h3>oplog-config</h3><div class="usage"><code>(oplog-config req-or-match)</code></div><div class="doc"><div class="markdown"><p>Returns operations logger configuration obtained from a request or a <code>Match</code> object.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L51">view source</a></div></div><div class="public anchor" id="var-oplog-logger"><h3>oplog-logger</h3><div class="usage"><code>(oplog-logger req-or-match)</code></div><div class="doc"><div class="markdown"><p>Retrieves operations logger function from a current route data (via <code>:oplog/config</code> key and then the <code>:fn/reporter</code> key), and if that fails, tries to retrieve it using <code>:oplog/config</code> key of the request map (and <code>:fn/reporter</code> sub-key). When everything fails it will fall back to a global variable <code>amelinium.common.oplog.auth/log</code>. The given argument can be either a request map or a <code>Match</code> object.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L66">view source</a></div></div><div class="public anchor" id="var-oplog-logger-populated"><h3>oplog-logger-populated</h3><div class="usage"><code>(oplog-logger-populated req)</code><code>(oplog-logger-populated req route-data)</code></div><div class="doc"><div class="markdown"><p>Creates operations logging function on a basis of operations logger retrieved by getting <code>:oplog/logger</code> key of the request (<code>req</code>), and if that fails by calling <code>oplog-logger-from-route-data</code> (when <code>route-data</code> is given), and if that fails by calling <code>oplog-logger</code> function on a <code>req</code> (which falls back to <code>amelinium.common.oplog.auth/log</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L78">view source</a></div></div><div class="public anchor" id="var-page"><h3>page</h3><div class="usage"><code>(page req)</code><code>(page req name-or-path)</code><code>(page req name-or-path path-params)</code><code>(page req name-or-path path-params query-params)</code><code>(page req name-or-path lang)</code><code>(page req name-or-path lang path-params)</code><code>(page req name-or-path lang path-params query-params)</code><code>(page req name-or-path lang lang-required?)</code><code>(page req name-or-path lang path-params lang-required?)</code><code>(page req name-or-path lang path-params query-params lang-required?)</code><code>(page req name-or-path lang path-params query-params lang-required? name-path-fallback?)</code><code>(page _ _ name-or-path path-params query-params router hint-lang lang-settings-or-param)</code><code>(page _ name-or-path lang path-params query-params lang-required? name-path-fallback? router lang-settings-or-param)</code></div><div class="doc"><div class="markdown"><p>Generates a page path for the given page identifier (a route name) or a path, and optional language identifier. When called with just a request map, returns a path of the current page.</p>
<p>It tries to be optimistic. When called for a page identified by its name (expressed as an identifier, usually a keyword) and with a language parameter to be found (so it cannot be looked up using just a name alone), it will use currently detected language obtained from the given request map (key <code>:language/str</code>), and will use it.</p>
<p>Additional query parameters (<code>query-params</code>) can be given. They will be used when generating path with <code>localized-page</code>. If the path was given and it already contains query parameters, they will be replaced.</p>
<p>Additional path parameters (<code>path-params</code>) may be given. Giving extra (unknown to route) parameters does not affect lookup. Giving <code>path-params</code> when matching by path causes them to be silently ignored.</p>
<p>When invoked with a language parameter, calls <code>localized-page</code> internally.</p>
<p>When invoked with a language parameter, the <code>lang-required?</code> argument may be used (by default set to <code>false</code>) to check if a matching route is parameterized with a language parameter. This is to ensure that only a localized route is used.</p>
<p>When invoked with a language parameter, the optional <code>name-path-fallback?</code> argument may be used (set to <code>true</code> by default) to cause non-matching route identifier to be retried by extracting its path and calling <code>localized-page</code> function for that path expressed as a string.</p>
<p>If the path is given instead of a route identifier, it must exist (after being equipped with any extra parameters, if needed, using <code>path-params</code>).</p>
<p>When invoked with a language parameter, the <code>lang-required?</code> is set to <code>false</code> (default), and a path is given but it does not require language parameter, a path will be generated by testing whether it exists for regular and for slash-stripped or slash-added variant (the original variant goes first).</p>
<p>When invoked with a language parameter, the <code>lang-required?</code> is set to <code>false</code> (default), and a path is given but it does not require language parameter plus the <code>name-path-fallback?</code> argument is set to <code>:brute-force</code>, all possible path variants (with language parameter injected within its succesive segments) will be tried in hope that one will exist, regardless of parameter name that matches. Use it with caution as it may give weird matches; if for example, there is a route path <code>/users/:id</code> defined, and the given path is <code>/users/</code> with language set to <code>:pl</code>, then it will match <code>/users/pl</code> even though the parameter is not related to a language.</p>
<p>When invoked with a language parameter, the <code>lang-required?</code> is set to <code>true</code>, and a path is given but it does not require a language parameter, all possible path variants (with language parameter injected within its succesive segments) will be tried in hope that one will match, being a path that requires language parameter.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L787">view source</a></div></div><div class="public anchor" id="var-parameterized-page"><h3>parameterized-page</h3><div class="usage"><code>(parameterized-page)</code><code>(parameterized-page req)</code><code>(parameterized-page req name-or-path)</code><code>(parameterized-page req name-or-path param param-value)</code><code>(parameterized-page req name-or-path param param-value path-params)</code><code>(parameterized-page req name-or-path param param-value path-params query-params)</code><code>(parameterized-page req name-or-path param param-value require-param?)</code><code>(parameterized-page req name-or-path param param-value path-params require-param?)</code><code>(parameterized-page req name-or-path param param-value path-params query-params require-param?)</code><code>(parameterized-page req name-or-path param param-value path-params query-params require-param? name-path-fallback?)</code><code>(parameterized-page _ name-or-path param param-value path-params query-params require-param? name-path-fallback? router)</code></div><div class="doc"><div class="markdown"><p>Generates a path for the given page identifier (which may be a name expressed with an identifier, preferably a keyword, or a path expressed as a string) and a parameter with the given value.</p>
<p>Optional path parameters may be given. They will be used to match a page by name if it requires additional parameters to be present.</p>
<p>Examples:</p>
<p><code>(parameterized-page req)</code> <code>(parameterized-page req :login-page)</code> <code>(parameterized-page req :login-page :lang :pl)</code> <code>(parameterized-page req :login-page :lang :pl {:client "wow-corp"})</code> <code>(parameterized-page req "/login/page/")</code> <code>(parameterized-page req "/login/page/" :lang :pl)</code> <code>(parameterized-page req "/en/login/page/" :lang :pl)</code></p>
<p>When called with just a request map, returns a path of the current page if the page exists. When called with a page name or path, it returns a path if the page exists.</p>
<p>The optional <code>name-path-fallback?</code> argument, when set to a truthy value (default is <code>false</code>), causes non-matching route identifier to be retried by extracting its path and calling this function for that path given as a string.</p>
<p>The optional <code>require-param?</code> argument (set to <code>false</code> when not given) enables extra check eliminating pages which do not support the given parameter, yet would be matched. Example:</p>
<p><code>(parameterized-page req :login-page :lang :pl true)</code></p>
<p>will fail if there is no parameter <code>:lang</code> handled by the route named <code>:login-page</code>.</p>
<p>When the given path is already parameterized then re-parameterized path is generated and checked if it exists, unless the value of the parameter is the same as the existing one. In such case the path is returned after a quick existence check.</p>
<p>Additional path parameters (<code>path-params</code>) can be given to be used when matching by name. Giving extra (unknown to route) parameters does not affect lookup. Giving <code>path-params</code> when matching by path causes them to be silently ignored.</p>
<p>Additional query parameters (<code>query-params</code>) can be given. They will be used when generating path. If the path was given and it already contains query parameters, they will be replaced.</p>
<p>If the path is given instead of a route identifier, it must exist (after being equipped with any extra parameters, if needed, using <code>path-params</code>).</p>
<p>When the <code>require-param?</code> is set to <code>false</code> (default) and a path is given but it does not require this parameter, a path will be generated by testing whether it exists for regular and for slash-stripped or slash-added variant (the original variant goes first).</p>
<p>When the <code>require-param?</code> is set to <code>false</code> (default) and a path is given but it does not require this parameter plus the <code>name-path-fallback?</code> argument is set to <code>:brute-force</code>, all possible path variants (with parameter injected within its succesive segments) will be tried in hope that one will exist, regardless of parameter name that matches. Use it with caution as it may give weird matches; if for example, there is a route path <code>/users/:id</code> defined, and the given path is <code>/users/</code> with <code>:lang</code> parameter set to <code>:pl</code>, then it will match <code>/users/pl</code> even though the parameter name is different.</p>
<p>When the <code>require-param?</code> is set to <code>true</code> and a path is given but it does not require this parameter, all possible path variants (with parameter injected within its succesive segments) will be tried in hope that one will match, being a path that requires this parameter.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L459">view source</a></div></div><div class="public anchor" id="var-path"><h3>path</h3><div class="usage"><code>(path)</code><code>(path req)</code><code>(path req name-or-path)</code><code>(path req name-or-path lang)</code><code>(path req name-or-path lang params)</code><code>(path req name-or-path lang params query-params)</code><code>(path name-or-path lang params query-params router language-settings-or-param)</code></div><div class="doc"><div class="markdown"><p>Creates a URL on a basis of route name or a path.</p>
<p>If a page found does not have a language parameter it is accepted too.</p>
<p>When the given path is already parameterized with language then re-parameterized path is generated and checked if it exists, unless the value of the parameter is the same as the existing one. In such case the path is returned after a quick existence check.</p>
<p>Additional path parameters (<code>params</code>) can be given to be used when matching by name. Giving extra (unknown to route) parameters does not affect lookup. Giving <code>params</code> when matching by path causes them to be silently ignored.</p>
<p>Additional query parameters (<code>query-params</code>) can be given. They will be used when generating path. If the path was given and it already contains query parameters, they will be replaced.</p>
<p>If the path is given instead of a route identifier, it must exist (after being equipped with any extra parameters, if needed, using <code>params</code>).</p>
<p>When a path is given but it does not require language parameter, a path will be generated by testing whether it exists for regular and for slash-stripped or slash-added variant (the original variant goes first).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L1882">view source</a></div></div><div class="public anchor" id="var-path-language"><h3>path-language</h3><div class="usage"><code>(path-language req)</code><code>(path-language req-or-match path-or-lang-settings)</code><code>(path-language req path router)</code><code>(path-language _ path router language-settings-or-param)</code></div><div class="doc"><div class="markdown"><p>Returns a language string if the given path contains a language parameter. Otherwise it returns nil.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L269">view source</a></div></div><div class="public anchor" id="var-path-param"><h3>path-param</h3><div class="usage"><code>(path-param req-or-match param)</code><code>(path-param req path param)</code><code>(path-param _ path param router)</code></div><div class="doc"><div class="markdown"><p>Returns a parameter if the given path contains it and it is set. Otherwise it returns nil.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L247">view source</a></div></div><div class="public anchor" id="var-path-params"><h3>path-params</h3><div class="usage"><code>(path-params req-or-match)</code><code>(path-params req path)</code><code>(path-params _ path router)</code></div><div class="doc"><div class="markdown"><p>Returns a map of parameters if the given path contains it. Otherwise it returns nil.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L259">view source</a></div></div><div class="public anchor" id="var-path-template-with-param"><h3>path-template-with-param</h3><div class="usage"><code>(path-template-with-param match required-param)</code><code>(path-template-with-param match required-param short-circuit)</code></div><div class="doc"><div class="markdown"><p>Returns a path template for the given match if the route supports the given parameter.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L364">view source</a></div></div><div class="public anchor" id="var-path-variants"><h3>path-variants</h3><div class="usage"><code>(path-variants path lang-id)</code><code>(path-variants path lang suffix)</code></div><div class="doc"><div class="markdown"><p>Generates a list of all possible language variants of a path.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L241">view source</a></div></div><div class="public anchor" id="var-remove-status"><h3>remove-status</h3><h4 class="type">macro</h4><div class="usage"><code>(remove-status req)</code></div><div class="doc"><div class="markdown"><p>Removes <code>:response/status</code> from <code>req</code> using <code>clojure.core/dissoc</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L2533">view source</a></div></div><div class="public anchor" id="var-render"><h3>render</h3><div class="usage"><code>(render)</code><code>(render req)</code><code>(render req status)</code></div><div class="doc"><div class="markdown"><p>Returns response body on a basis of a value associated with the <code>:response/body</code> key of the <code>req</code>.</p>
<p>If <code>status</code> is given and <code>:response/body</code> is a map, it adds the following associations to it: <code>:status</code> (with a keyword describing status as value), <code>:status/title</code> (with a string describing status translated using a detected language) and <code>:status/description</code> (with a longer string explaining the status, based on a translation key created by adding “.full” to the original status key). If any key already exists in <code>:response/body</code>, it will not be added.</p>
<p>If <code>status</code> is given and the <code>:response/body</code> does not exist in <code>req</code>, it adds it and associates it with an empty, performing the calculations described above.</p>
<p>Additionally, if the body map contains <code>:status/title</code> or <code>:status/description</code> key and does not contain <code>:lang</code> key, the <code>:lang</code> key will be added with an associated value of <code>:language/id</code> taken from a request map <code>req</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L83">view source</a></div></div><div class="public anchor" id="var-render-accepted"><h3>render-accepted</h3><div class="usage"><code>(render-accepted)</code><code>(render-accepted req)</code></div><div class="doc"><div class="markdown"><p>Renders 202 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L225">view source</a></div></div><div class="public anchor" id="var-render-already-reported"><h3>render-already-reported</h3><div class="usage"><code>(render-already-reported)</code><code>(render-already-reported req)</code></div><div class="doc"><div class="markdown"><p>Renders 208 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L255">view source</a></div></div><div class="public anchor" id="var-render-bad-gateway"><h3>render-bad-gateway</h3><div class="usage"><code>(render-bad-gateway)</code><code>(render-bad-gateway req)</code></div><div class="doc"><div class="markdown"><p>Renders 502 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L485">view source</a></div></div><div class="public anchor" id="var-render-bad-params"><h3>render-bad-params</h3><div class="usage"><code>(render-bad-params)</code><code>(render-bad-params req)</code></div><div class="doc"><div class="markdown"><p>Renders 422 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L401">view source</a></div></div><div class="public anchor" id="var-render-bad-request"><h3>render-bad-request</h3><div class="usage"><code>(render-bad-request)</code><code>(render-bad-request req)</code></div><div class="doc"><div class="markdown"><p>Renders 400 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L269">view source</a></div></div><div class="public anchor" id="var-render-bandwidth-limit-exceeded"><h3>render-bandwidth-limit-exceeded</h3><div class="usage"><code>(render-bandwidth-limit-exceeded)</code><code>(render-bandwidth-limit-exceeded req)</code></div><div class="doc"><div class="markdown"><p>Renders 509 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L527">view source</a></div></div><div class="public anchor" id="var-render-blocked-by-windows-parental-controls"><h3>render-blocked-by-windows-parental-controls</h3><div class="usage"><code>(render-blocked-by-windows-parental-controls)</code><code>(render-blocked-by-windows-parental-controls req)</code></div><div class="doc"><div class="markdown"><p>Renders 450 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L461">view source</a></div></div><div class="public anchor" id="var-render-conflict"><h3>render-conflict</h3><div class="usage"><code>(render-conflict)</code><code>(render-conflict req)</code></div><div class="doc"><div class="markdown"><p>Renders 409 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L323">view source</a></div></div><div class="public anchor" id="var-render-continue"><h3>render-continue</h3><div class="usage"><code>(render-continue)</code><code>(render-continue req)</code><code>(render-continue req & more)</code></div><div class="doc"><div class="markdown"><p>Renders 100 response without a body.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L612">view source</a></div></div><div class="public anchor" id="var-render-created"><h3>render-created</h3><div class="usage"><code>(render-created)</code><code>(render-created req)</code><code>(render-created req name-or-path)</code><code>(render-created req name-or-path lang)</code><code>(render-created req name-or-path lang params)</code><code>(render-created req name-or-path lang params query-params)</code><code>(render-created req name-or-path lang params query-params & more)</code></div><div class="doc"><div class="markdown"><p>Renders 201 response with a redirect (possibly localized if a destination path is language-parameterized) and possible body taken from a request map (under the <code>:response/body</code>). If a name or a path is not given as <code>name-or-path</code>, it is looked up in <code>req</code> under the <code>:response/location</code> key.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L559">view source</a></div></div><div class="public anchor" id="var-render-early-hints"><h3>render-early-hints</h3><div class="usage"><code>(render-early-hints)</code><code>(render-early-hints req)</code></div><div class="doc"><div class="markdown"><p>Renders 103 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L217">view source</a></div></div><div class="public anchor" id="var-render-enhance-your-calm"><h3>render-enhance-your-calm</h3><div class="usage"><code>(render-enhance-your-calm)</code><code>(render-enhance-your-calm req)</code></div><div class="doc"><div class="markdown"><p>Renders 420 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L383">view source</a></div></div><div class="public anchor" id="var-render-error"><h3>render-error</h3><div class="usage"><code>(render-error)</code><code>(render-error req)</code><code>(render-error req sub-status)</code><code>(render-error req sub-statuses)</code><code>(render-error req sub-status default)</code><code>(render-error req sub-statuses default)</code><code>(render-error req sub-status default & more)</code><code>(render-error req sub-statuses default & more)</code></div><div class="doc"><div class="markdown"><p>Renders an error response for the given request map and optional <code>sub-status</code> (a keyword, mapped to a response rendering function, using a map passed under the <code>:errors/config</code> key in a route data). If it is not given (or its value is <code>nil</code> or <code>false</code>) then <code>render-internal-server-error</code> will be used to generate the response.</p>
<p>The resulting response body will have the <code>:status</code> key set by the rendering function and <code>:sub-status</code> added by this function. Additionally, <code>:status/title</code>, <code>:status/description</code>, <code>:sub-status/title</code> and <code>:sub-status/description</code> will be populated by strings explaining the status and sub-status.</p>
<p>Example:</p>
<p><code>(render-error req :verify/bad-token)</code></p>
<p>Will create a response with the following body:</p>
<pre><code>{:status :error/unauthorized
:status/title "Unauthorized"
:status/description "You are not authorized to perform this action."
:sub-status :verify/bad-token
:sub-status/title "Bad token"
:sub-status/description "The given token is malformed of has expired."
:lang :en}
</code></pre>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L754">view source</a></div></div><div class="public anchor" id="var-render-expectation-failed"><h3>render-expectation-failed</h3><div class="usage"><code>(render-expectation-failed)</code><code>(render-expectation-failed req)</code></div><div class="doc"><div class="markdown"><p>Renders 417 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L371">view source</a></div></div><div class="public anchor" id="var-render-failed-dependency"><h3>render-failed-dependency</h3><div class="usage"><code>(render-failed-dependency)</code><code>(render-failed-dependency req)</code></div><div class="doc"><div class="markdown"><p>Renders 424 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L413">view source</a></div></div><div class="public anchor" id="var-render-forbidden"><h3>render-forbidden</h3><div class="usage"><code>(render-forbidden)</code><code>(render-forbidden req)</code></div><div class="doc"><div class="markdown"><p>Renders 403 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L287">view source</a></div></div><div class="public anchor" id="var-render-found"><h3>render-found</h3><div class="usage"><code>(render-found)</code><code>(render-found req)</code></div><div class="doc"><div class="markdown"><p>Renders 200 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L209">view source</a></div></div><div class="public anchor" id="var-render-gateway-timeout"><h3>render-gateway-timeout</h3><div class="usage"><code>(render-gateway-timeout)</code><code>(render-gateway-timeout req)</code></div><div class="doc"><div class="markdown"><p>Renders 504 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L497">view source</a></div></div><div class="public anchor" id="var-render-gone"><h3>render-gone</h3><div class="usage"><code>(render-gone)</code><code>(render-gone req)</code></div><div class="doc"><div class="markdown"><p>Renders 410 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L329">view source</a></div></div><div class="public anchor" id="var-render-http-version-not-supported"><h3>render-http-version-not-supported</h3><div class="usage"><code>(render-http-version-not-supported)</code><code>(render-http-version-not-supported req)</code></div><div class="doc"><div class="markdown"><p>Renders 505 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L503">view source</a></div></div><div class="public anchor" id="var-render-im-a-teapot"><h3>render-im-a-teapot</h3><div class="usage"><code>(render-im-a-teapot)</code><code>(render-im-a-teapot req)</code></div><div class="doc"><div class="markdown"><p>Renders 418 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L377">view source</a></div></div><div class="public anchor" id="var-render-im-used"><h3>render-im-used</h3><div class="usage"><code>(render-im-used)</code><code>(render-im-used req)</code></div><div class="doc"><div class="markdown"><p>Renders 226 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L261">view source</a></div></div><div class="public anchor" id="var-render-in-progress"><h3>render-in-progress</h3><div class="usage"><code>(render-in-progress)</code><code>(render-in-progress req)</code></div><div class="doc"><div class="markdown"><p>Renders 202 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L231">view source</a></div></div><div class="public anchor" id="var-render-insufficient-storage"><h3>render-insufficient-storage</h3><div class="usage"><code>(render-insufficient-storage)</code><code>(render-insufficient-storage req)</code></div><div class="doc"><div class="markdown"><p>Renders 507 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L515">view source</a></div></div><div class="public anchor" id="var-render-internal-server-error"><h3>render-internal-server-error</h3><div class="usage"><code>(render-internal-server-error)</code><code>(render-internal-server-error req)</code></div><div class="doc"><div class="markdown"><p>Renders 500 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L473">view source</a></div></div><div class="public anchor" id="var-render-length-required"><h3>render-length-required</h3><div class="usage"><code>(render-length-required)</code><code>(render-length-required req)</code></div><div class="doc"><div class="markdown"><p>Renders 411 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L335">view source</a></div></div><div class="public anchor" id="var-render-localized-created"><h3>render-localized-created</h3><div class="usage"><code>(render-localized-created)</code><code>(render-localized-created req)</code><code>(render-localized-created req name-or-path)</code><code>(render-localized-created req name-or-path lang)</code><code>(render-localized-created req name-or-path lang params)</code><code>(render-localized-created req name-or-path lang params query-params)</code><code>(render-localized-created req name-or-path lang params query-params & more)</code></div><div class="doc"><div class="markdown"><p>Renders 201 response with a localized redirect and possible body taken from a request map (under the <code>:response/body</code>). If a name or a path is not given as <code>name-or-path</code>, it is looked up in <code>req</code> under the <code>:response/location</code> key.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L585">view source</a></div></div><div class="public anchor" id="var-render-locked"><h3>render-locked</h3><div class="usage"><code>(render-locked)</code><code>(render-locked req)</code></div><div class="doc"><div class="markdown"><p>Renders 423 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L407">view source</a></div></div><div class="public anchor" id="var-render-loop-detected"><h3>render-loop-detected</h3><div class="usage"><code>(render-loop-detected)</code><code>(render-loop-detected req)</code></div><div class="doc"><div class="markdown"><p>Renders 508 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L521">view source</a></div></div><div class="public anchor" id="var-render-method-not-allowed"><h3>render-method-not-allowed</h3><div class="usage"><code>(render-method-not-allowed)</code><code>(render-method-not-allowed req)</code></div><div class="doc"><div class="markdown"><p>Renders 405 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L299">view source</a></div></div><div class="public anchor" id="var-render-misdirected-request"><h3>render-misdirected-request</h3><div class="usage"><code>(render-misdirected-request)</code><code>(render-misdirected-request req)</code></div><div class="doc"><div class="markdown"><p>Renders 421 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L389">view source</a></div></div><div class="public anchor" id="var-render-multi-status"><h3>render-multi-status</h3><div class="usage"><code>(render-multi-status)</code><code>(render-multi-status req)</code></div><div class="doc"><div class="markdown"><p>Renders 207 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L249">view source</a></div></div><div class="public anchor" id="var-render-network-authentication-required"><h3>render-network-authentication-required</h3><div class="usage"><code>(render-network-authentication-required)</code><code>(render-network-authentication-required req)</code></div><div class="doc"><div class="markdown"><p>Renders 511 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L539">view source</a></div></div><div class="public anchor" id="var-render-network-connect-timeout"><h3>render-network-connect-timeout</h3><div class="usage"><code>(render-network-connect-timeout)</code><code>(render-network-connect-timeout req)</code></div><div class="doc"><div class="markdown"><p>Renders 599 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L551">view source</a></div></div><div class="public anchor" id="var-render-network-read-timeout"><h3>render-network-read-timeout</h3><div class="usage"><code>(render-network-read-timeout)</code><code>(render-network-read-timeout req)</code></div><div class="doc"><div class="markdown"><p>Renders 598 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L545">view source</a></div></div><div class="public anchor" id="var-render-no-content"><h3>render-no-content</h3><div class="usage"><code>(render-no-content)</code><code>(render-no-content req)</code><code>(render-no-content req & more)</code></div><div class="doc"><div class="markdown"><p>Renders 204 response without a body.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L630">view source</a></div></div><div class="public anchor" id="var-render-non-authoritative-information"><h3>render-non-authoritative-information</h3><div class="usage"><code>(render-non-authoritative-information)</code><code>(render-non-authoritative-information req)</code></div><div class="doc"><div class="markdown"><p>Renders 203 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L237">view source</a></div></div><div class="public anchor" id="var-render-not-acceptable"><h3>render-not-acceptable</h3><div class="usage"><code>(render-not-acceptable)</code><code>(render-not-acceptable req)</code></div><div class="doc"><div class="markdown"><p>Renders 406 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L305">view source</a></div></div><div class="public anchor" id="var-render-not-extended"><h3>render-not-extended</h3><div class="usage"><code>(render-not-extended)</code><code>(render-not-extended req)</code></div><div class="doc"><div class="markdown"><p>Renders 510 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L533">view source</a></div></div><div class="public anchor" id="var-render-not-found"><h3>render-not-found</h3><div class="usage"><code>(render-not-found)</code><code>(render-not-found req)</code></div><div class="doc"><div class="markdown"><p>Renders 404 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L293">view source</a></div></div><div class="public anchor" id="var-render-not-implemented"><h3>render-not-implemented</h3><div class="usage"><code>(render-not-implemented)</code><code>(render-not-implemented req)</code></div><div class="doc"><div class="markdown"><p>Renders 501 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L479">view source</a></div></div><div class="public anchor" id="var-render-ok"><h3>render-ok</h3><div class="usage"><code>(render-ok)</code><code>(render-ok req)</code></div><div class="doc"><div class="markdown"><p>Renders 200 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L197">view source</a></div></div><div class="public anchor" id="var-render-page"><h3>render-page</h3><div class="usage"><code>(render-page)</code><code>(render-page req)</code></div><div class="doc"><div class="markdown"><p>Renders 200 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L203">view source</a></div></div><div class="public anchor" id="var-render-partial-content"><h3>render-partial-content</h3><div class="usage"><code>(render-partial-content)</code><code>(render-partial-content req)</code></div><div class="doc"><div class="markdown"><p>Renders 206 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L243">view source</a></div></div><div class="public anchor" id="var-render-payment-required"><h3>render-payment-required</h3><div class="usage"><code>(render-payment-required)</code><code>(render-payment-required req)</code></div><div class="doc"><div class="markdown"><p>Renders 402 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L281">view source</a></div></div><div class="public anchor" id="var-render-precondition-failed"><h3>render-precondition-failed</h3><div class="usage"><code>(render-precondition-failed)</code><code>(render-precondition-failed req)</code></div><div class="doc"><div class="markdown"><p>Renders 412 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L341">view source</a></div></div><div class="public anchor" id="var-render-precondition-required"><h3>render-precondition-required</h3><div class="usage"><code>(render-precondition-required)</code><code>(render-precondition-required req)</code></div><div class="doc"><div class="markdown"><p>Renders 428 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L437">view source</a></div></div><div class="public anchor" id="var-render-processing"><h3>render-processing</h3><div class="usage"><code>(render-processing)</code><code>(render-processing req)</code><code>(render-processing req & more)</code></div><div class="doc"><div class="markdown"><p>Renders 102 response without a body.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L624">view source</a></div></div><div class="public anchor" id="var-render-proxy-authentication-required"><h3>render-proxy-authentication-required</h3><div class="usage"><code>(render-proxy-authentication-required)</code><code>(render-proxy-authentication-required req)</code></div><div class="doc"><div class="markdown"><p>Renders 407 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L311">view source</a></div></div><div class="public anchor" id="var-render-request-entity-too-large"><h3>render-request-entity-too-large</h3><div class="usage"><code>(render-request-entity-too-large)</code><code>(render-request-entity-too-large req)</code></div><div class="doc"><div class="markdown"><p>Renders 413 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L347">view source</a></div></div><div class="public anchor" id="var-render-request-header-fields-too-large"><h3>render-request-header-fields-too-large</h3><div class="usage"><code>(render-request-header-fields-too-large)</code><code>(render-request-header-fields-too-large req)</code></div><div class="doc"><div class="markdown"><p>Renders 431 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L449">view source</a></div></div><div class="public anchor" id="var-render-request-timeout"><h3>render-request-timeout</h3><div class="usage"><code>(render-request-timeout)</code><code>(render-request-timeout req)</code></div><div class="doc"><div class="markdown"><p>Renders 408 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L317">view source</a></div></div><div class="public anchor" id="var-render-request-uri-too-long"><h3>render-request-uri-too-long</h3><div class="usage"><code>(render-request-uri-too-long)</code><code>(render-request-uri-too-long req)</code></div><div class="doc"><div class="markdown"><p>Renders 414 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L353">view source</a></div></div><div class="public anchor" id="var-render-requested-range-not-satisfiable"><h3>render-requested-range-not-satisfiable</h3><div class="usage"><code>(render-requested-range-not-satisfiable)</code><code>(render-requested-range-not-satisfiable req)</code></div><div class="doc"><div class="markdown"><p>Renders 416 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L365">view source</a></div></div><div class="public anchor" id="var-render-reset-content"><h3>render-reset-content</h3><div class="usage"><code>(render-reset-content)</code><code>(render-reset-content req)</code><code>(render-reset-content req & more)</code></div><div class="doc"><div class="markdown"><p>Renders 205 response without a body.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L636">view source</a></div></div><div class="public anchor" id="var-render-response"><h3>render-response</h3><div class="usage"><code>(render-response)</code><code>(render-response resp-fn)</code><code>(render-response resp-fn req)</code><code>(render-response resp-fn status req)</code></div><div class="doc"><div class="markdown"><p>API response renderer. Uses the <code>render</code> function to render the response body (unless the <code>req</code> is already a valid response - in such case it is returned as-is) and <code>resp-fn</code> function to construct the response map.</p>
<p>If <code>status</code> is given and <code>:response/body</code> is a map, it adds two associations to it: <code>:status</code> (with a keyword describing HTTP status as value) and <code>:message</code> (with a string describing HTTP status translated using a detected language). If any key already exists in <code>:response/body</code>, it will not be added.</p>
<p>Additionally, if the body map contains <code>:message</code> or <code>message/sub</code> key and does not contain <code>:lang</code> key, it will be added with a value of <code>:language/id</code> taken from a request map <code>req</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L136">view source</a></div></div><div class="public anchor" id="var-render-response-force"><h3>render-response-force</h3><div class="usage"><code>(render-response-force)</code><code>(render-response-force resp-fn)</code><code>(render-response-force resp-fn req)</code><code>(render-response-force resp-fn status req)</code></div><div class="doc"><div class="markdown"><p>API response renderer. Uses the <code>render</code> function to render the response body and <code>resp-fn</code> function to construct the response map.</p>
<p>If <code>status</code> is given and <code>:response/body</code> is a map, it adds two associations to it: <code>:status</code> (with a keyword describing HTTP status as value) and <code>:message</code> (with a string describing HTTP status translated using a detected language). If any key already exists in <code>:response/body</code>, it will not be added.</p>
<p>Additionally, if the body map contains <code>:message</code> or <code>message/sub</code> key and does not contain <code>:lang</code> key, it will be added with a value of <code>:language/id</code> taken from a request map <code>req</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L168">view source</a></div></div><div class="public anchor" id="var-render-retry-with"><h3>render-retry-with</h3><div class="usage"><code>(render-retry-with)</code><code>(render-retry-with req)</code></div><div class="doc"><div class="markdown"><p>Renders 449 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L455">view source</a></div></div><div class="public anchor" id="var-render-service-unavailable"><h3>render-service-unavailable</h3><div class="usage"><code>(render-service-unavailable)</code><code>(render-service-unavailable req)</code></div><div class="doc"><div class="markdown"><p>Renders 503 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L491">view source</a></div></div><div class="public anchor" id="var-render-status"><h3>render-status</h3><div class="usage"><code>(render-status)</code><code>(render-status req)</code><code>(render-status req sub-status)</code><code>(render-status req sub-statuses)</code><code>(render-status req sub-status default)</code><code>(render-status req sub-statuses default)</code><code>(render-status req sub-status default & more)</code><code>(render-status req sub-statuses default & more)</code></div><div class="doc"><div class="markdown"><p>Renders a status response for the given request map and optional <code>sub-status</code> (a keyword, mapped to a response rendering function, using a map passed under the <code>:errors/config</code> key in a route data). If it is not given (or its value is <code>nil</code> or <code>false</code>) then <code>render-ok</code> will be used to generate the response.</p>
<p>The resulting response body will have the <code>:status</code> key set by the rendering function and <code>:sub-status</code> added by this function. Additionally, <code>:status/title</code>, <code>:status/description</code>, <code>:sub-status/title</code> and <code>:sub-status/description</code> will be populated by strings explaining the status and sub-status.</p>
<p>Example:</p>
<p><code>(render-status req :verify/bad-token)</code></p>
<p>Will create a response with the following body:</p>
<pre><code>{:status :error/unauthorized
:status/title "Unauthorized"
:status/description "You are not authorized to perform this action."
:sub-status :verify/bad-token
:sub-status/title "Bad token"
:sub-status/description "The given token is malformed of has expired."
:lang :en}
</code></pre>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L700">view source</a></div></div><div class="public anchor" id="var-render-switching-protocols"><h3>render-switching-protocols</h3><div class="usage"><code>(render-switching-protocols)</code><code>(render-switching-protocols req)</code><code>(render-switching-protocols req & more)</code></div><div class="doc"><div class="markdown"><p>Renders 101 response without a body.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L618">view source</a></div></div><div class="public anchor" id="var-render-too-early"><h3>render-too-early</h3><div class="usage"><code>(render-too-early)</code><code>(render-too-early req)</code></div><div class="doc"><div class="markdown"><p>Renders 425 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L425">view source</a></div></div><div class="public anchor" id="var-render-too-many-requests"><h3>render-too-many-requests</h3><div class="usage"><code>(render-too-many-requests)</code><code>(render-too-many-requests req)</code></div><div class="doc"><div class="markdown"><p>Renders 429 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L443">view source</a></div></div><div class="public anchor" id="var-render-unauthorized"><h3>render-unauthorized</h3><div class="usage"><code>(render-unauthorized)</code><code>(render-unauthorized req)</code></div><div class="doc"><div class="markdown"><p>Renders 401 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L275">view source</a></div></div><div class="public anchor" id="var-render-unavailable-for-legal-reasons"><h3>render-unavailable-for-legal-reasons</h3><div class="usage"><code>(render-unavailable-for-legal-reasons)</code><code>(render-unavailable-for-legal-reasons req)</code></div><div class="doc"><div class="markdown"><p>Renders 451 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L467">view source</a></div></div><div class="public anchor" id="var-render-unordered-collection"><h3>render-unordered-collection</h3><div class="usage"><code>(render-unordered-collection)</code><code>(render-unordered-collection req)</code></div><div class="doc"><div class="markdown"><p>Renders 425 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L419">view source</a></div></div><div class="public anchor" id="var-render-unprocessable-entity"><h3>render-unprocessable-entity</h3><div class="usage"><code>(render-unprocessable-entity)</code><code>(render-unprocessable-entity req)</code></div><div class="doc"><div class="markdown"><p>Renders 422 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L395">view source</a></div></div><div class="public anchor" id="var-render-unsupported-media-type"><h3>render-unsupported-media-type</h3><div class="usage"><code>(render-unsupported-media-type)</code><code>(render-unsupported-media-type req)</code></div><div class="doc"><div class="markdown"><p>Renders 415 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L359">view source</a></div></div><div class="public anchor" id="var-render-upgrade-required"><h3>render-upgrade-required</h3><div class="usage"><code>(render-upgrade-required)</code><code>(render-upgrade-required req)</code></div><div class="doc"><div class="markdown"><p>Renders 426 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L431">view source</a></div></div><div class="public anchor" id="var-render-variant-also-negotiates"><h3>render-variant-also-negotiates</h3><div class="usage"><code>(render-variant-also-negotiates)</code><code>(render-variant-also-negotiates req)</code></div><div class="doc"><div class="markdown"><p>Renders 506 response with possible body taken from a request map (under the <code>:response/body</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L509">view source</a></div></div><div class="public anchor" id="var-response"><h3>response</h3><h4 class="type">macro</h4><div class="usage"><code>(response req & code)</code></div><div class="doc"><div class="markdown"><p>Creates a response block. If the given <code>req</code> is already a response then it is simply returned. Otherwise the expressions from <code>code</code> are evaluated.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L920">view source</a></div></div><div class="public anchor" id="var-response.3F"><h3>response?</h3><div class="usage"><code>(response? req)</code></div><div class="doc"><div class="markdown"><p>Returns <code>true</code> if the <code>req</code> context map is already an API response.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L128">view source</a></div></div><div class="public anchor" id="var-role-required.21"><h3>role-required!</h3><div class="usage"><code>(role-required! req role)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L1757">view source</a></div></div><div class="public anchor" id="var-roles-for-context"><h3>roles-for-context</h3><div class="usage"><code>(roles-for-context req user-id context)</code><code>(roles-for-context req context)</code><code>(roles-for-context req)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L1768">view source</a></div></div><div class="public anchor" id="var-roles-for-contexts"><h3>roles-for-contexts</h3><div class="usage"><code>(roles-for-contexts req user-id)</code><code>(roles-for-contexts req)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L1778">view source</a></div></div><div class="public anchor" id="var-roles-matrix"><h3>roles-matrix</h3><div class="usage"><code>(roles-matrix req)</code><code>(roles-matrix req opts)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L1796">view source</a></div></div><div class="public anchor" id="var-roles-tabler"><h3>roles-tabler</h3><div class="usage"><code>(roles-tabler req)</code><code>(roles-tabler {{:keys [global-context], :or {global-context :!}} :roles/config, :as req} {:keys [user-id effective? include-global? include-self? present-label missing-label global-label global-marker global-present-label context-label contexts-labeler], :or {present-label "YES", missing-label "—", global-label "global", context-label "Context", contexts-labeler default-contexts-labeler, include-global? (not effective?), include-self? false}, :as opts})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L1840">view source</a></div></div><div class="public anchor" id="var-router-match.3F"><h3>router-match?</h3><div class="usage"><code>(router-match? v)</code></div><div class="doc"><div class="markdown"><p>Returns true if the given argument is Reitit’s Match object.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L101">view source</a></div></div><div class="public anchor" id="var-see-other"><h3>see-other</h3><div class="usage"><code>(see-other)</code><code>(see-other req)</code><code>(see-other url)</code><code>(see-other req url)</code><code>(see-other req name-or-path)</code><code>(see-other req name-or-path path-params)</code><code>(see-other req name-or-path path-params query-params)</code><code>(see-other req name-or-path lang)</code><code>(see-other req name-or-path lang path-params)</code><code>(see-other req name-or-path lang path-params query-params)</code><code>(see-other req name-or-path lang path-params query-params & more)</code></div><div class="doc"><div class="markdown"><p>Uses the page function to calculate the destination path on a basis of page name (identifier) or a path (a string) and performs a redirect with code 303 to it using <code>resp/see-other</code>. If the language is given it uses the <code>localized-page</code> function. If there is no language given but the page identified by its name requires a language parameter to be set, it will be obtained from the given request map (under the key <code>:language/str</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L1361">view source</a></div></div><div class="public anchor" id="var-session-status"><h3>session-status</h3><div class="usage"><code>(session-status smap)</code></div><div class="doc"><div class="markdown"><p>Returns session status for the given session map <code>smap</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L885">view source</a></div></div><div class="public anchor" id="var-slash-redir"><h3>slash-redir</h3><div class="usage"><code>(slash-redir req)</code></div><div class="doc"><div class="markdown"><p>Redirects to a slash-trailed version of the same URI. If the URI already has a slash, it returns a req.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L1451">view source</a></div></div><div class="public anchor" id="var-soft-lock-passed"><h3>soft-lock-passed</h3><div class="usage"><code>(soft-lock-passed user time)</code></div><div class="doc"><div class="markdown"><p>Returns the time duration between soft lock and the given moment. If the duration is zero or negative, it returns nil.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L1480">view source</a></div></div><div class="public anchor" id="var-soft-lock-remains"><h3>soft-lock-remains</h3><div class="usage"><code>(soft-lock-remains lock-passed auth-config-or-lw)</code><code>(soft-lock-remains user auth-config-or-lw time)</code></div><div class="doc"><div class="markdown"><p>Returns the amount of time left before reaching lock-wait. If the amount is negative or zero, it returns nil. Does not connect to a database.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L1517">view source</a></div></div><div class="public anchor" id="var-soft-lock-time"><h3>soft-lock-time</h3><div class="usage"><code>(soft-lock-time user)</code></div><div class="doc"><div class="markdown"><p>Gets a soft lock time for the given user specified by a map having :soft-locked key.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L1474">view source</a></div></div><div class="public anchor" id="var-soft-locked.3F"><h3>soft-locked?</h3><div class="usage"><code>(soft-locked? lock-passed auth-config-or-lw)</code><code>(soft-locked? user auth-config-or-lw time)</code></div><div class="doc"><div class="markdown"><p>Returns true if the given user account is soft-locked (the time amount which passed from the lock till the given time is lesser than the soft lock wait configuration option). Does not connect to a database.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L1503">view source</a></div></div><div class="public anchor" id="var-split-query-params"><h3>split-query-params</h3><div class="usage"><code>(split-query-params path)</code></div><div class="doc"><div class="markdown"><p>Splits path into 3 string components: path, location and query params. Returns a vector.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L289">view source</a></div></div><div class="public anchor" id="var-split-query-params-simple"><h3>split-query-params-simple</h3><div class="usage"><code>(split-query-params-simple path)</code></div><div class="doc"><div class="markdown"><p>Splits path into 2 components: path string and location / query params string. Returns a sequence.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L283">view source</a></div></div><div class="public anchor" id="var-strictly-localized-page"><h3>strictly-localized-page</h3><div class="usage"><code>(strictly-localized-page req)</code><code>(strictly-localized-page req name-or-path)</code><code>(strictly-localized-page req name-or-path lang)</code><code>(strictly-localized-page req name-or-path lang params)</code><code>(strictly-localized-page req name-or-path lang params query-params)</code><code>(strictly-localized-page name-or-path lang params query-params router lang-param)</code></div><div class="doc"><div class="markdown"><p>Same as <code>localized-page</code> with <code>lang-required?</code> always set to <code>true</code>, <code>name-path-fallback?</code> set to <code>false</code>, and with less arities supported. When the language version of a page identified by its name is not present it will return <code>nil</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L716">view source</a></div></div><div class="public anchor" id="var-template-path"><h3>template-path</h3><div class="usage"><code>(template-path match params)</code><code>(template-path match params query-params)</code><code>(template-path path template params _)</code></div><div class="doc"><div class="markdown"><p>Replaces parameters in the given path using a template.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L348">view source</a></div></div><div class="public anchor" id="var-temporary-redirect"><h3>temporary-redirect</h3><div class="usage"><code>(temporary-redirect)</code><code>(temporary-redirect req)</code><code>(temporary-redirect url)</code><code>(temporary-redirect req url)</code><code>(temporary-redirect req name-or-path)</code><code>(temporary-redirect req name-or-path path-params)</code><code>(temporary-redirect req name-or-path path-params query-params)</code><code>(temporary-redirect req name-or-path lang)</code><code>(temporary-redirect req name-or-path lang path-params)</code><code>(temporary-redirect req name-or-path lang path-params query-params)</code><code>(temporary-redirect req name-or-path lang path-params query-params & more)</code></div><div class="doc"><div class="markdown"><p>Uses the page function to calculate the destination path on a basis of page name (identifier) or a path (a string) and performs a redirect with code 307 to it using <code>resp/temporary-redirect</code>. If the language is given it uses the <code>localized-page</code> function. If there is no language given but the page identified by its name requires a language parameter to be set, it will be obtained from the given request map (under the key <code>:language/str</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L1363">view source</a></div></div><div class="public anchor" id="var-update-body"><h3>update-body</h3><div class="usage"><code>(update-body req)</code><code>(update-body req f)</code><code>(update-body req f a)</code><code>(update-body req f a b)</code><code>(update-body req f a b c)</code><code>(update-body req f a b c d)</code><code>(update-body req f a b c d & more)</code></div><div class="doc"><div class="markdown"><p>Updates the <code>:response/body</code> in a request map <code>req</code> with a result of calling the function <code>f</code> on the previous value and optional arguments. Uses <code>io.randomseed.utils.map/qassoc</code>. Returns updated <code>req</code> with a map under <code>:response/body</code> key.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api.clj#L937">view source</a></div></div><div class="public anchor" id="var-with-role-only.21"><h3>with-role-only!</h3><h4 class="type">macro</h4><div class="usage"><code>(with-role-only! req role & body)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/common.clj#L1763">view source</a></div></div></div></body></html>