macchiato.middleware

validate

(validate handler-middleware {:keys [id required], :as middleware-meta})
middleware metadata can contain the following keys
:id - id of the middleware function
:required - a collection of the ids of middleware functions it requires to be present

validate-handler

(validate-handler handler)

wrap

(wrap handler middleware-fn)(wrap handler middleware-fn opts)

wrap-middleware

(wrap-middleware handler & middleware)