Module
Payload.Handleable
- Package
- purescript-payload
- Repository
- hoodunit/purescript-payload
#Handleable Source
class Handleable route handler (basePath :: Symbol) (baseParams :: Row Type) (baseGuards :: GuardList) (guardsSpec :: Row Type) guards | route -> handler where
Members
handle :: SProxy basePath -> Proxy (Record baseParams) -> Guards baseGuards -> GuardTypes (Record guardsSpec) -> route -> handler -> guards -> RequestUrl -> Request -> Response -> Result RawResponse
Instances
(TypeEquals (Record route) { body :: body, guards :: Guards guardNames, params :: Record params, response :: res | r }, IsSymbol path, Append "POST " fullPath docRoute, ToSpecResponse docRoute handlerRes res, EncodeResponse res, Append basePath path fullPath, FromData body, Union baseParams params fullUrlParams, Union fullUrlParams query fullParams, DecodeUrl fullPath fullUrlParams, DecodeQuery fullPath query, ParseUrl fullPath urlParts, ToSegments urlParts, Union fullParams (body :: body) payload', Union payload' routeGuardSpec payload, Append baseGuards guardNames fullGuards, RunGuards fullGuards guardsSpec allGuards () routeGuardSpec) => Handleable (Route "POST" path (Record route)) (Record payload -> Aff handlerRes) basePath baseParams baseGuards guardsSpec (Record allGuards)
(TypeEquals (Record route) { guards :: Guards guardNames, params :: Record params, query :: Record query, response :: res | r }, IsSymbol path, Append "GET " fullPath docRoute, ToSpecResponse docRoute handlerRes res, EncodeResponse res, Append basePath path fullPath, Union baseParams params fullUrlParams, Union fullUrlParams query fullParams, DecodeUrl fullPath fullUrlParams, DecodeQuery fullPath query, ParseUrl fullPath urlParts, ToSegments urlParts, Union fullParams routeGuardSpec payload, Append baseGuards guardNames fullGuards, RunGuards fullGuards guardsSpec allGuards () routeGuardSpec) => Handleable (Route "GET" path (Record route)) (Record payload -> Aff handlerRes) basePath baseParams baseGuards guardsSpec (Record allGuards)
(TypeEquals (Record route) { guards :: Guards guardNames, params :: Record params, query :: Record query, response :: res | r }, IsSymbol path, Append basePath path fullPath, Append "HEAD " fullPath docRoute, ToSpecResponse docRoute handlerRes res, EncodeResponse res, Union baseParams params fullUrlParams, Union fullUrlParams query fullParams, DecodeUrl fullPath fullUrlParams, DecodeQuery fullPath query, ParseUrl fullPath urlParts, ToSegments urlParts, Union fullParams routeGuardSpec payload, Append baseGuards guardNames fullGuards, RunGuards fullGuards guardsSpec allGuards () routeGuardSpec) => Handleable (Route "HEAD" path (Record route)) (Record payload -> Aff handlerRes) basePath baseParams baseGuards guardsSpec (Record allGuards)
(TypeEquals (Record route) { body :: body, guards :: Guards guardNames, params :: Record params, response :: res | r }, IsSymbol path, Append "PUT " fullPath docRoute, ToSpecResponse docRoute handlerRes res, EncodeResponse res, Append basePath path fullPath, FromData body, Union baseParams params fullUrlParams, Union fullUrlParams query fullParams, DecodeUrl fullPath fullUrlParams, DecodeQuery fullPath query, ParseUrl fullPath urlParts, ToSegments urlParts, Union fullParams (body :: body) payload', Union payload' routeGuardSpec payload, Append baseGuards guardNames fullGuards, RunGuards fullGuards guardsSpec allGuards () routeGuardSpec) => Handleable (Route "PUT" path (Record route)) (Record payload -> Aff handlerRes) basePath baseParams baseGuards guardsSpec (Record allGuards)
(TypeEquals (Record route) { guards :: Guards guardNames, params :: Record params, response :: res | r }, IsSymbol path, Append "DELETE " fullPath docRoute, ToSpecResponse docRoute handlerRes res, EncodeResponse res, Append basePath path fullPath, Union baseParams params fullUrlParams, Union fullUrlParams query fullParams, DecodeUrl fullPath fullUrlParams, DecodeQuery fullPath query, ParseUrl fullPath urlParts, ToSegments urlParts, Union fullParams routeGuardSpec payload, Append baseGuards guardNames fullGuards, RunGuards fullGuards guardsSpec allGuards () routeGuardSpec) => Handleable (Route "DELETE" path (Record route)) (Record payload -> Aff handlerRes) basePath baseParams baseGuards guardsSpec (Record allGuards)
#MethodHandler Source
type MethodHandler = RequestUrl -> Request -> Response -> Result RawResponse
- Modules
- Payload.
Client. Client - Payload.
Client. FromResponse - Payload.
ContentType - Payload.
Cookies - Payload.
FromData - Payload.
Guards - Payload.
Handleable - Payload.
Handlers - Payload.
Headers - Payload.
Internal. GuardParsing - Payload.
Internal. MimeTypes - Payload.
Internal. Query - Payload.
Internal. QueryParsing - Payload.
Internal. Querystring. Qs - Payload.
Internal. Request - Payload.
Internal. Route - Payload.
Internal. ServerResponse - Payload.
Internal. Trie - Payload.
Internal. TypeErrors - Payload.
Internal. Url - Payload.
Internal. UrlParsing - Payload.
Internal. UrlString - Payload.
Internal. Utils - Payload.
Params - Payload.
Path - Payload.
QueryParams - Payload.
Response - Payload.
Routable - Payload.
Server - Payload.
Spec - Payload.
Status