Liking cljdoc? Tell your friends :D

sweet-tooth.endpoint.liberator


->ctxclj

(->ctx x k)

Make it easy to thread data into liberator context

Make it easy to thread data into liberator context
raw docstring

assoc-userclj

(assoc-user ctx user-key)

authclj


auth-idclj

(auth-id {:keys [auth-id-key] :as ctx})

Retrieve the ID of authenticated user. Assumes :auth-id-key is in the ctx

Retrieve the ID of authenticated user. Assumes `:auth-id-key` is in
the ctx
raw docstring

auth-withclj

(auth-with & fns)

If any auth function authenticates the context, return true. Used to e.g. auth by ownership or adminship

If any auth function authenticates the context, return true. Used
to e.g. auth by ownership or adminship
raw docstring

authenticated?clj

(authenticated? ctx)

To use with liberator's :authorized? decision

To use with liberator's :authorized? decision
raw docstring

authentication-errorclj


authorization-errorclj


decision-defaultsclj

A 'base' set of liberator resource decisions for list, create, show, update, and delete

A 'base' set of liberator resource decisions for list, create,
show, update, and delete
raw docstring

endpointclj

(endpoint route decisions & [initial-context])

error-responseclj

(error-response status errors)

For cases where the error happens before the request gets to liberator

For cases where the error happens before the request gets to liberator
raw docstring

errorsclj


errors-mapclj

(errors-map errors)

Add errors to context, setting media-type in case liberator doesn't get to that decision

Add errors to context, setting media-type in case liberator doesn't
get to that decision
raw docstring

exists-fnclj

(exists-fn ent-fn)

Given a function to retrieve a record, store it under :record in the context if it exists

Given a function to retrieve a record, store it under `:record` in the
context if it exists
raw docstring

get-ctxclj

(get-ctx path)

html-resourceclj

(html-resource path)

Serve resource at path as html

Serve resource at `path` as html
raw docstring

initialize-decisionsclj

(initialize-decisions decisions context-initializer)

paramsclj


recordclj


resource-routeclj

A function that takes a path and decision spec and produces compojure endpoint

A function that takes a path and decision spec and produces
compojure endpoint
raw docstring

transit-responseclj

(transit-response payload & [opts])

validatorcljmacro

(validator validation)
(validator ctx-sym validation)

Used in invalid? which is why truth values are reversed

Used in invalid? which is why truth values are reversed
raw docstring

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

× close