io.pedestal.http.route.prefix-tree

->Node

(->Node wild? catch-all? segment param payload children)
Positional factory function for class io.pedestal.http.route.prefix_tree.Node.

->Payload

(->Payload routes)
Positional factory function for class io.pedestal.http.route.prefix_tree.Payload.

->PrefixTreeRouter

(->PrefixTreeRouter routes tree)
Positional factory function for class io.pedestal.http.route.prefix_tree.PrefixTreeRouter.

add-satisfies-constraints?

(add-satisfies-constraints? {:keys [query-constraints path-constraints], :as route})
Given a route, add a function of the request which returns true if
the request satisfies all path and query constraints.

contains-wilds?

(contains-wilds? path-spec)
Return true if the given path-spec contains any wildcard params or
catch-alls.

create-payload-fn

(create-payload-fn routes)
Given a sequence of routes, return a function of a request which
will return a matching route. When the returned function is called
we already know that the path matches. The function only considers
method, host, scheme and port and will return the most specific
match.

insert

(insert node path-spec o)
Given a tree node, a path-spec and a payload object, return a new
tree with payload inserted.

lookup

(lookup node path)
Given a tree node and request path, find a matching leaf node and
return the path params and payload or return nil if no match is
found. Returns a map with :path-params and :payload keys.

map->Node

(map->Node m__6522__auto__)
Factory function for class io.pedestal.http.route.prefix_tree.Node, taking a map of keywords to field values.

map->Payload

(map->Payload m__6522__auto__)
Factory function for class io.pedestal.http.route.prefix_tree.Payload, taking a map of keywords to field values.

map->PrefixTreeRouter

(map->PrefixTreeRouter m__6522__auto__)
Factory function for class io.pedestal.http.route.prefix_tree.PrefixTreeRouter, taking a map of keywords to field values.

partition-wilds

(partition-wilds path-spec)
Given a path-spec string, return a seq of strings with wildcards
and catch-alls separated into their own strings. Eats the forward
slash following a wildcard.

router

(router routes)
Given a sequence of routes, return a router which satisfies the
io.pedestal.http.route.router/Router protocol.