Liking cljdoc? Tell your friends :D

coast.core


action-forclj

(action-for v)

Generates a form action based on http method

Generates a form action based on http method
sourceraw docstring

bad-requestclj

source

coerce-paramsclj

(coerce-params val)
source

(cookie-store)
(cookie-store options)

Creates an encrypted cookie storage engine. Accepts the following options:

:key - The secret key to encrypt the session cookie. Must be exactly 16 bytes If no key is provided then a random key will be generated. Note that in that case a server restart will invalidate all existing session cookies.

Creates an encrypted cookie storage engine. Accepts the following options:

:key - The secret key to encrypt the session cookie. Must be exactly 16 bytes
       If no key is provided then a random key will be generated. Note that in
       that case a server restart will invalidate all existing session
       cookies.
sourceraw docstring

csrfclj

(csrf)
(csrf attrs)
source

current-userclj

(current-user request)
source

deleteclj

source

dev?clj

source

envclj

A map of environment variables.

A map of environment variables.
sourceraw docstring

forbiddenclj

source

form-forclj

(form-for v & content)
source

getclj

source

htmlcljmacro

(html options & content)

Render Clojure data structures to a string of HTML.

Render Clojure data structures to a string of HTML.
sourceraw docstring

html5cljmacro

(html5 options & contents)

Create a HTML5 document with the supplied contents.

Create a HTML5 document with the supplied contents.
sourceraw docstring

include-cssclj

(include-css & styles)

Include a list of external stylesheet files.

Include a list of external stylesheet files.
sourceraw docstring

include-jsclj

(include-js & scripts)

Include a list of external javascript files.

Include a list of external javascript files.
sourceraw docstring

internal-server-errorclj

source

(link-to s v)
(link-to s v params)
source

map-valsclj

(map-vals f m)
source

match-routesclj

(match-routes routes)
source

not-foundclj

source

nowclj

(now)
source

okclj

source

parse-intclj

(parse-int s)
source

patchclj

source

pluralclj

(plural s)
source

postclj

source

printerrclj

(printerr header body)
source

prod?clj

source

putclj

source

queryclj

(query k)
(query k m)
source

query!clj

(query! k)
(query! k m)
source

redirectclj

(redirect url)
(redirect url flash)
source

resourceclj

(resource routes & ks)

Creates a set of seven functions that map to a conventional set of named functions. Generates routes that look like this:

[[:get '/resources resources/index] [:get '/resources/:id resources/show] [:get '/resources/fresh resources/fresh] ; this is 'fresh' not 'new' because new is reserved [:get '/resources/:id/edit resources/edit] [:post '/resources resources/create] [:put '/resources/:id resources/change] ; this is 'change' not 'update' because update is in clojure.core [:delete '/resources/:id resources/delete]]

Examples:

(resource :items) (resource :items :only [:create :delete]) (resource :items :sub-items :only [:index :create]) (resource :items :except [:index])

Creates a set of seven functions that map to a conventional set of named functions.
Generates routes that look like this:

[[:get    '/resources          resources/index]
 [:get    '/resources/:id      resources/show]
 [:get    '/resources/fresh    resources/fresh] ; this is 'fresh' not 'new' because new is reserved
 [:get    '/resources/:id/edit resources/edit]
 [:post   '/resources          resources/create]
 [:put    '/resources/:id      resources/change] ; this is 'change' not 'update' because update is in clojure.core
 [:delete '/resources/:id      resources/delete]]

Examples:

(resource :items)
(resource :items :only [:create :delete])
(resource :items :sub-items :only [:index :create])
(resource :items :except [:index])
sourceraw docstring

restartclj

(restart)
source

route-not-foundclj

(route-not-found routes f)
source

singularclj

(singular s)
source

site-defaultsclj

A default configuration for a browser-accessible website, based on current best practice.

A default configuration for a browser-accessible website, based on current
best practice.
sourceraw docstring

start-serverclj

(start-server app)
(start-server app opts)
source

stopclj

(stop)
source

test?clj

source

throw+clj

(throw+ m)
source

transact!cljmacro

(transact! f)
source

try!cljmacro

(try! fn)
source

try+cljmacro

(try+ fn)
source

unauthorizedclj

source

unique-index-error?clj

(unique-index-error? error)
source

url-forclj

(url-for v)

Generates a url based on http method, route syntax and params

Generates a url based on http method, route syntax and params
sourceraw docstring

uuidclj

(uuid)
(uuid s)
source

validateclj

(validate m validations)
source

wrap-coast-defaultsclj

(wrap-coast-defaults handler)
(wrap-coast-defaults handler opts)
source

wrap-coerce-paramsclj

(wrap-coerce-params handler)
source

wrap-defaultsclj

(wrap-defaults handler config)

Wraps a handler in default Ring middleware, as specified by the supplied configuration map.

See: api-defaults site-defaults secure-api-defaults secure-site-defaults

Wraps a handler in default Ring middleware, as specified by the supplied
configuration map.

See: api-defaults
     site-defaults
     secure-api-defaults
     secure-site-defaults
sourceraw docstring

wrap-exceptionsclj

(wrap-exceptions handler
                 &
                 [{:keys [app-namespaces skip-prone? print-stacktraces?]
                   :or {print-stacktraces? true}
                   :as opts}])

Let Prone handle exeptions instead of Ring. This way, instead of a centered stack trace, errors will give you a nice interactive page where you can browse data, filter the stack trace and generally get a good grip of what is happening.

Optionally, supply a opts map to specify namespaces to include, a predicate function to exclude certain requests from prone, and a boolean value to silence printing of exception stacktraces e.g.:

=> (wrap-exceptions handler {:app-namespaces ['your-ns-1 'my.ns.to-show] :skip-prone? (fn [req] (not-browser? req) :print-stacktraces? false})

Let Prone handle exeptions instead of Ring. This way, instead of a centered
stack trace, errors will give you a nice interactive page where you can browse
data, filter the stack trace and generally get a good grip of what is
happening.

Optionally, supply a opts map to specify namespaces to include,
a predicate function to exclude certain requests from prone, and a boolean
value to silence printing of exception stacktraces e.g.:

=> (wrap-exceptions handler {:app-namespaces ['your-ns-1 'my.ns.to-show]
                             :skip-prone? (fn [req] (not-browser? req)
                             :print-stacktraces? false})
sourceraw docstring

wrap-flashclj

(wrap-flash handler)

If a :flash key is set on the response by the handler, a :flash key with the same value will be set on the next request that shares the same session. This is useful for small messages that persist across redirects.

If a :flash key is set on the response by the handler, a :flash key with
the same value will be set on the next request that shares the same session.
This is useful for small messages that persist across redirects.
sourceraw docstring

wrap-ifclj

(wrap-if handler pred wrapper & args)
source

wrap-layoutclj

(wrap-layout handler layout)
source

wrap-match-routesclj

(wrap-match-routes arg)
source

wrap-resourceclj

(wrap-resource handler root-path)
(wrap-resource handler root-path options)

Middleware that first checks to see whether the request map matches a static resource. If it does, the resource is returned in a response map, otherwise the request map is passed onto the handler. The root-path argument will be added to the beginning of the resource path.

Accepts the following options:

:loader - resolve the resource using this class loader :allow-symlinks? - allow symlinks that lead to paths outside the root classpath directories (defaults to false)

Middleware that first checks to see whether the request map matches a static
resource. If it does, the resource is returned in a response map, otherwise
the request map is passed onto the handler. The root-path argument will be
added to the beginning of the resource path.

Accepts the following options:

:loader          - resolve the resource using this class loader
:allow-symlinks? - allow symlinks that lead to paths outside the root
                   classpath directories (defaults to false)
sourceraw docstring

wrap-routes-withclj

(wrap-routes-with routes middleware)
source

wrap-with-loggerclj

(wrap-with-logger handler)
source

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

× close