Module
Nodetrout.Internal.Router
- Package
- purescript-nodetrout
- Repository
- nsaunders/purescript-nodetrout
This module contains the routing logic.
#Router Source
class Router layout handlers m result | layout -> handlers, layout -> result where
Routes a request using the specified layout and handlers.
Members
Instances
(Monad m, Router layout handler m result, Router otherLayout (Record otherHandlers) m result, IsSymbol name, Cons name handler otherHandlers handlers, Lacks name otherHandlers) => Router (Alt (Named name layout) otherLayout) (Record handlers) m result
(Monad m, Router layout handler m result, IsSymbol name, Cons name handler () handlers) => Router (Named name layout) (Record handlers) m result
(Monad m, Router layout handlers m result, IsSymbol segment) => Router (Sub (Lit segment) layout) handlers m result
(Monad m, Router layout handlers m result, FromPathPiece value) => Router (Sub (Capture label value) layout) (value -> handlers) m result
(Monad m, Router layout handlers m result, FromPathPiece value) => Router (Sub (CaptureAll label value) layout) (Array value -> handlers) m result
(Monad m, Router layout handlers m result, IsSymbol label, FromPathPiece value) => Router (Sub (QueryParam label value) layout) (Maybe value -> handlers) m result
(Monad m, Router layout handlers m result, IsSymbol label, FromPathPiece value) => Router (Sub (QueryParams label value) layout) (Array value -> handlers) m result
(Monad m, Router layout handlers m result, IsSymbol name, FromHeader value) => Router (Sub (Header name value) layout) (value -> handlers) m result
(Monad m, MonadAff m, Router layout handlers m result, MimeParse String contentType parsed) => Router (Sub (ReqBody parsed contentType) layout) (parsed -> handlers) m result
(Monad m, IsSymbol method, AllMimeRender body contentTypes rendered, Cons method (ExceptT HTTPError m body) handlers' handlers) => Router (Method method body contentTypes) (Record handlers) m (Tuple MediaType rendered)
(Monad m, Router layout handlers m result) => Router (Resource layout) handlers m result