Liking cljdoc? Tell your friends :D

calfpath.internal


as-uri-template

(as-uri-template uri-pattern-or-template)
source

assoc-path-params

(assoc-path-params request params-key params-map)
source

assoc-uri-match-end-index

(assoc-uri-match-end-index request end-index)
source

build-routes-index

(build-routes-index
  context
  routes
  {:keys [index-key uri-key method-key],
   :or {index-key :id, uri-key :uri, method-key :method},
   :as options})

Given a collection of routes, index them returning a map {:id the-route}.

Given a collection of routes, index them returning a map {:id the-route}.
sourceraw docstring

dassoc

(dassoc a k v)

Direct assoc

Direct assoc
sourceraw docstring

default-separator

source

dispatch-expr-generic

(dispatch-expr-generic routes
                       matcher-syms
                       handler-syms
                       request-sym
                       invoke-sym)

Generic (fallback) match

Generic (fallback) match
sourceraw docstring

dispatch-expr-methods

(dispatch-expr-methods routes
                       matcher-syms
                       handler-syms
                       request-sym
                       invoke-sym
                       {:keys [method-key], :as options})

Bulk methods match

Bulk methods match
sourceraw docstring

dropper

(dropper n)
source

expected

(expected expectation found)
(expected pred expectation found)
source

find-discriminator-tokens

(find-discriminator-tokens routes-uri-tokens)
source

find-prefix-tokens

(find-prefix-tokens routes-uri-tokens)

Given routes with URI-patterns, find the common (non empty) prefix URI pattern tokens.

Given routes with URI-patterns, find the common (non empty) prefix URI pattern tokens.
sourceraw docstring

find-prefix-tokens-pair

(find-prefix-tokens-pair routes-uri-tokens)

Given routes with URI-patterns, find the common (non empty) prefix URI pattern tokens and balance tokens.

Given routes with URI-patterns, find the common (non empty) prefix URI pattern tokens and balance tokens.
sourceraw docstring

full-match

(full-match params)
source

FULL-MATCH-INDEX

source

FULL-MATCH-NO-PARAMS

source

full-match-uri-string

(full-match-uri-string uri begin-index string-token)
source

full-match-uri-string*

(full-match-uri-string* uri begin-index string-token)
source

get-uri-match-end-index

(get-uri-match-end-index request)
source

invoke

(invoke f)
(invoke f x)
(invoke f x y)
(invoke f x y & args)

Invoke first arg as a function on remaing args.

Invoke first arg as a function on remaing args.
sourceraw docstring

make-dispatcher-expr

(make-dispatcher-expr routes
                      matcher-syms
                      handler-syms
                      request-sym
                      invoke-sym
                      options)

Emit code that matches route and invokes handler

Emit code that matches route and invokes handler
sourceraw docstring

match-urimacro

(match-uri uri begin-index pattern-tokens attempt-partial-match?)
(match-uri uri
           begin-index
           pattern-tokens
           attempt-partial-match?
           params-map)

Match given URI string against URI pattern, returning a vector [params-map ^int end-index] on success, and nil on no match.

Argument Description
uri the URI string to match
begin-index index in the URI string to start matching at
pattern-tokens URI pattern tokens to match against
attempt-partial-match? flag to indicate whether to attempt partial-match
Match given URI string against URI pattern, returning a vector `[params-map ^int end-index]` on success,
and `nil` on no match.

| Argument               | Description                                       |
|------------------------|---------------------------------------------------|
| uri                    | the URI string to match                           |
| begin-index            | index in the URI string to start matching at      |
| pattern-tokens         | URI pattern tokens to match against               |
| attempt-partial-match? | flag to indicate whether to attempt partial-match |
sourceraw docstring

match-uri*

(match-uri* uri
            begin-index
            pattern-tokens
            attempt-partial-match?
            params-map)
source

method-dispatchmacro

(method-dispatch method-keyword request expr)
(method-dispatch method-keyword request expr default-expr)
source

NO-MATCH-INDEX

source

NO-PARAMS

source

parse-uri-template

(parse-uri-template marker-char pattern)

Given a URI pattern string, e.g. '/user/:id/profile/:descriptor/' parse it and return a vector of alternating string and keyword tokens, e.g. ['/user/' :id '/profile/' :descriptor '/']. The marker char is typically ':'.

Given a URI pattern string, e.g. '/user/:id/profile/:descriptor/' parse it and return a vector of alternating string
and keyword tokens, e.g. ['/user/' :id '/profile/' :descriptor '/']. The marker char is typically ':'.
sourceraw docstring

partial-match

(partial-match end-index)
(partial-match params end-index)
source

partial-match-uri-string

(partial-match-uri-string uri begin-index string-token)
source

split-routes-having-uri

(split-routes-having-uri routes uri-key)

Given mixed routes (vector), split into those having distinct routes and those that don't.

Given mixed routes (vector), split into those having distinct routes and those that don't.
sourceraw docstring

strip-partial-marker

(strip-partial-marker x)
source

tidyfy

(tidyfy routes-with-uri tidy-threshold uri-key)
source

tidyfy-all

(tidyfy-all routes tidy-threshold uri-key)
source

tokenize-routes-uris

(tokenize-routes-uris routes-with-uri uri-key)

Given routes with URI patterns, tokenize them as vectors.

Given routes with URI patterns, tokenize them as vectors.
sourceraw docstring

uri-match-end-index

source

valid-method-keys

source

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

× close