Liking cljdoc? Tell your friends :D

sweet-tooth.endpoint.module.liberator-reitit-router

Module for creating a ring router (a function that receives a ring requests and dispatches to a handler function based on the request's URL). It ties together the sugar for defining reitit routes and liberator handlers.

The module uses routes produced by sweet-tooth.endpoint.routes.reitit/expand-routes. These routes contain metadata that allow the module to look up vars that define liberator handlers. The module is responsible for associating routes with handlers.

The module is also responsible for adding each handler's configuration to the system's integrant configuration, reducing boilerplate for the developer.

We derive handler keys from ::handler. We then define ig/init-key methods for those keywords, where the method returns a handler function.

This module serves Sweet Tooth's goal of reducing the boilerplate required to get a system running, reducing the potential for errors and allowing the developer to focus on what's unique to their application.

Module for creating a ring router (a function that receives a ring
requests and dispatches to a handler function based on the request's
URL). It ties together the sugar for defining reitit routes and
liberator handlers.

The module uses routes produced by
`sweet-tooth.endpoint.routes.reitit/expand-routes`. These routes
contain metadata that allow the module to look up vars that define
liberator handlers. The module is responsible for associating routes
with handlers.

The module is also responsible for adding each handler's
configuration to the system's integrant configuration, reducing
boilerplate for the developer.

We derive handler keys from `::handler`. We then define
`ig/init-key` methods for those keywords, where the method returns a
handler function.

This module serves Sweet Tooth's goal of reducing the boilerplate
required to get a system running, reducing the potential for errors
and allowing the developer to focus on what's unique to their
application.
raw docstring

add-handler-defaultsclj

(add-handler-defaults route)

Compose configuration used for handler components, used to create liberator handlers

Compose configuration used for handler components, used to create
liberator handlers
sourceraw docstring

add-route-defaultsclj

(add-route-defaults route)

Compose the final route passed to reitit/router

Compose the final route passed to reitit/router
sourceraw docstring

add-route-handler-to-configclj

(add-route-handler-to-config config [_ route-opts])
source

liberator-resourcesclj

(liberator-resources
  {:keys [decisions ctx :sweet-tooth.endpoint.routes.reitit/type
          :sweet-tooth.endpoint.module.liberator-reitit-router/path]
   :as endpoint-opts})

Return liberator resource handler for a route type

Return liberator resource handler for a route type
sourceraw docstring

ns-route?clj

(ns-route? route)

differentiate 'normal' routes from those generated by err/expand-routes

differentiate 'normal' routes from those generated by
`err/expand-routes`
sourceraw docstring

update-opts-if-ns-routecljmacro

(update-opts-if-ns-route route f & args)
source

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

× close