Module
Payload.Server.Routable
- Package
- purescript-payload
- Repository
- hoodunit/purescript-payload
#Routable Source
class Routable routesSpec guardsSpec handlers guards | routesSpec guardsSpec -> handlers, guardsSpec -> guards where
Members
mkRouter :: Spec { guards :: guardsSpec, routes :: routesSpec } -> { guards :: guards, handlers :: handlers } -> Either String RoutingTrie
Instances
(Union rootSpec DefaultParentRoute mergedSpec, Nub mergedSpec rootSpecWithDefaults, TypeEquals (Record rootSpecWithDefaults) { guards :: Guards rootGuards, params :: Record rootParams | childRoutes }, RowToList childRoutes childRoutesList, RoutableList childRoutesList "" rootParams rootGuards guardsSpec handlers guards) => Routable (Record rootSpec) (Record guardsSpec) handlers guards
#RoutableList Source
class RoutableList (routesSpecList :: RowList Type) (basePath :: Symbol) (baseParams :: Row Type) (baseGuards :: GuardList) (guardsSpec :: Row Type) handlers guards | routesSpecList guardsSpec -> handlers, guardsSpec -> guards where
Members
mkRouterList :: Proxy routesSpecList -> Proxy basePath -> Proxy (Record baseParams) -> Guards baseGuards -> Proxy (Record guardsSpec) -> handlers -> guards -> RoutingTrie -> Either String RoutingTrie
Instances
RoutableList Nil basePath baseParams baseGuards guardsSpec handlers guards
(IsSymbol routeName, IsSymbol path, IsSymbol method, Union spec DefaultServerRouteSpec mergedSpec, Nub mergedSpec specWithDefaults, Handleable (Route method path (Record specWithDefaults)) handler basePath baseParams baseGuards guardsSpec (Record guards), RoutableList remRoutes basePath baseParams baseGuards guardsSpec (Record handlers) (Record guards), Cons routeName handler h' handlers, Append basePath path fullPath, ParseUrl fullPath urlParts, ToSegments urlParts) => RoutableList (Cons routeName (Route method path (Record spec)) remRoutes) basePath baseParams baseGuards guardsSpec (Record handlers) (Record guards)
(IsSymbol parentName, IsSymbol basePath, IsSymbol path, DecodeUrl path parentParams, Union parentSpec DefaultParentRoute mergedSpec, Nub mergedSpec parentSpecWithDefaults, TypeEquals (Record parentSpecWithDefaults) { guards :: Guards parentGuards, params :: Record parentParams | childRoutes }, Union baseParams parentParams childParams, Append baseGuards parentGuards childGuards, Cons parentName (Record childHandlers) handlers' handlers, RowToList childRoutes childRoutesList, Append basePath path childBasePath, RoutableList childRoutesList childBasePath childParams childGuards guardsSpec (Record childHandlers) (Record guards), RoutableList remRoutes basePath baseParams baseGuards guardsSpec (Record handlers) (Record guards)) => RoutableList (Cons parentName (Routes path (Record parentSpec)) remRoutes) basePath baseParams baseGuards guardsSpec (Record handlers) (Record guards)
#HandlerEntry Source
type HandlerEntry = { handler :: RequestUrl -> Request -> Response -> Aff Outcome, route :: List Segment }
- Modules
- Payload.
Client - Payload.
Client. ClientApi - Payload.
Client. DecodeResponse - Payload.
Client. EncodeBody - Payload.
Client. EncodeParam - Payload.
Client. Internal. EncodeUri - Payload.
Client. Internal. Query - Payload.
Client. Internal. Url - Payload.
Client. Options - Payload.
Client. QueryParams - Payload.
Client. Queryable - Payload.
Client. Response - Payload.
ContentType - Payload.
Debug - Payload.
Headers - Payload.
Internal. QueryParsing - Payload.
Internal. Route - Payload.
Internal. UrlParsing - Payload.
Internal. Utils - Payload.
ResponseTypes - Payload.
Server - Payload.
Server. Cookies - Payload.
Server. DecodeBody - Payload.
Server. Guards - Payload.
Server. Handleable - Payload.
Server. Handlers - Payload.
Server. Internal. GuardParsing - Payload.
Server. Internal. MimeTypes - Payload.
Server. Internal. OmitEmpty - Payload.
Server. Internal. Query - Payload.
Server. Internal. Querystring - Payload.
Server. Internal. Request - Payload.
Server. Internal. ServerResponse - Payload.
Server. Internal. Trie - Payload.
Server. Internal. Url - Payload.
Server. Internal. UrlString - Payload.
Server. Params - Payload.
Server. Path - Payload.
Server. QueryParams - Payload.
Server. Response - Payload.
Server. Routable - Payload.
Server. Status - Payload.
Spec - Payload.
TypeErrors