Liking cljdoc? Tell your friends :D

ensorcel.conjure


appclj

(app spellbook opts & services)

Creates a full ring application with default wrappers given a spellbook and conjured services

Creates a full ring application with default wrappers given a spellbook and conjured services
sourceraw docstring

arg-countclj

(arg-count f)
source

assemble-callcljs

(assemble-call path-fn body-fn method)
source

body-fncljs

(body-fn path query-args args)
source

call->cljs

(call-> {call-fn :call-fn args :args headers :headers spec :spec} & thens)

Calls the endpoint, and if the response is successful, passes the parsed response through to the supplied functions one after the other

Calls the endpoint, and if the response is successful, passes the parsed
response through to the supplied functions one after the other
sourceraw docstring

clientcljs

(client {services :services :as spellbook} service-name & {:as opts})

Create a REST client for a particular service from a spellbook

Create a REST client for a particular service from a spellbook
sourceraw docstring

construct-inputclj

(construct-input {:keys [params body]} input-spec)

Given a request and an input spec, coerces the components to the correct types and then validates that everything looks as expected.

Given a request and an input spec, coerces the components to the correct types
and then validates that everything looks as expected.
sourceraw docstring

construct-optionsclj

(construct-options endpoints)

Creates all required options for given paths and methods

Creates all required options for given paths and methods
sourceraw docstring

correct-methodclj

(correct-method method)
source

default-optsclj

source

endpointclj/s≠

clj
(endpoint impls [endpoint {:keys [path method] :as spec}])

Creates a bidi endpoint from the given impls and an endpoint specification

Creates a bidi endpoint from the given impls and an endpoint specification
cljs
(endpoint base-url {:keys [path method args query returns] :as spec})
source (clj)source (cljs)raw docstring

extractcljs

(extract spec thens response)
source

format-pathcljs

(format-path values [f & fragments])
source

inject-tokencljs

(inject-token token client)
source

method-dispatchclj

(method-dispatch [path endpoints])
source

path-fncljs

(path-fn base-path path query-args)
source

ping-endpointcljs

(ping-endpoint host port version-str)
source

ping-serviceclj

(ping-service)

ping ping ping ping

ping ping ping ping
sourceraw docstring

query-fncljs

(query-fn query-args args)
source

rootclj

(root {version :version} {:keys [include-version?]} services)
source

serviceclj

(service {services :services :as spellbook} service-name & impls)

Creates a bidi service from the given impls and spellbook

Creates a bidi service from the given impls and spellbook
sourceraw docstring

stringifyclj

(stringify x response-type)
source

urlifycljs

(urlify value)
source

validateclj

(validate received expected raise!)

Validates that a received payload matches the expected schema. Raises <raise!> if not.

Validates that a received payload matches the expected schema.
Raises <raise!> if not.
sourceraw docstring

version-endpointcljs

(version-endpoint host port version-str)
source

version-serviceclj

(version-service {version :version})

version version version version

version version version version
sourceraw docstring

wrapcljs

(wrap endpoints)
source

wrap-endpointclj

(wrap-endpoint {:keys [args returns response headers] :or {response ok}} f)

Wraps a given endpoint implementation in the gubbins for a ring request Different outcomes for different arity implementions: 0 arity -> just calls the function 1 arity -> provides a parameter map from the request body and url 2 arity -> provides a parameter map and an options map containing things like cookies etc. Also validates that the inputs and outputs match the specification in the spellbook

Wraps a given endpoint implementation in the gubbins for a ring request
Different outcomes for different arity implementions:
  0 arity -> just calls the function
  1 arity -> provides a parameter map from the request body and url
  2 arity -> provides a parameter map and an options map containing things like cookies etc.
Also validates that the inputs and outputs match the specification in the spellbook
sourceraw docstring

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

× close