Copyright | Dennis Gosnell 2017 |
---|---|
License | BSD3 |
Maintainer | Dennis Gosnell (cdep.illabout@gmail.com) |
Stability | experimental |
Portability | unknown |
Safe Haskell | None |
Language | Haskell2010 |
Documentation
methodRouter :: forall ctypes a es env. (AllCTRender ctypes (Envelope es a), AllErrStatus es) => Method -> Status -> Proxy ctypes -> Delayed env (Handler (Envelope es a)) -> Router' env (Request -> (RouteResult Response -> IO ResponseReceived) -> IO ResponseReceived) Source #
acceptCheck :: AllMime list => Proxy list -> ByteString -> DelayedIO () Source #
getErrStatus :: AllErrStatus es => OpenUnion es -> Status Source #
processMethodRouter :: Maybe (ByteString, ByteString) -> Status -> Method -> Maybe [(HeaderName, ByteString)] -> Request -> RouteResult Response Source #
Orphan instances
HasServer (Throwing '[e] :> api) context => HasServer (Throws e :> api :: Type) context Source # | |
HasServer (VerbWithErr method status ctypes ('[] :: [Type]) a) context => HasServer (NoThrow :> Verb method status ctypes a :: Type) context Source # | When |
route :: Proxy (NoThrow :> Verb method status ctypes a) -> Context context -> Delayed env (Server (NoThrow :> Verb method status ctypes a)) -> Router env # hoistServerWithContext :: Proxy (NoThrow :> Verb method status ctypes a) -> Proxy context -> (forall x. m x -> n x) -> ServerT (NoThrow :> Verb method status ctypes a) m -> ServerT (NoThrow :> Verb method status ctypes a) n # | |
HasServer (api :> (NoThrow :> apis)) context => HasServer (NoThrow :> (api :> apis) :: Type) context Source # | When |
route :: Proxy (NoThrow :> (api :> apis)) -> Context context -> Delayed env (Server (NoThrow :> (api :> apis))) -> Router env # hoistServerWithContext :: Proxy (NoThrow :> (api :> apis)) -> Proxy context -> (forall x. m x -> n x) -> ServerT (NoThrow :> (api :> apis)) m -> ServerT (NoThrow :> (api :> apis)) n # | |
HasServer ((NoThrow :> api1) :<|> (NoThrow :> api2)) context => HasServer (NoThrow :> (api1 :<|> api2) :: Type) context Source # | When |
route :: Proxy (NoThrow :> (api1 :<|> api2)) -> Context context -> Delayed env (Server (NoThrow :> (api1 :<|> api2))) -> Router env # hoistServerWithContext :: Proxy (NoThrow :> (api1 :<|> api2)) -> Proxy context -> (forall x. m x -> n x) -> ServerT (NoThrow :> (api1 :<|> api2)) m -> ServerT (NoThrow :> (api1 :<|> api2)) n # | |
HasServer (ThrowingNonterminal (Throwing es :> (api :> apis))) context => HasServer (Throwing es :> (api :> apis) :: Type) context Source # | When a |
route :: Proxy (Throwing es :> (api :> apis)) -> Context context -> Delayed env (Server (Throwing es :> (api :> apis))) -> Router env # hoistServerWithContext :: Proxy (Throwing es :> (api :> apis)) -> Proxy context -> (forall x. m x -> n x) -> ServerT (Throwing es :> (api :> apis)) m -> ServerT (Throwing es :> (api :> apis)) n # | |
HasServer ((Throwing es :> api1) :<|> (Throwing es :> api2)) context => HasServer (Throwing es :> (api1 :<|> api2) :: Type) context Source # | When |
route :: Proxy (Throwing es :> (api1 :<|> api2)) -> Context context -> Delayed env (Server (Throwing es :> (api1 :<|> api2))) -> Router env # hoistServerWithContext :: Proxy (Throwing es :> (api1 :<|> api2)) -> Proxy context -> (forall x. m x -> n x) -> ServerT (Throwing es :> (api1 :<|> api2)) m -> ServerT (Throwing es :> (api1 :<|> api2)) n # | |
HasServer (VerbWithErr method status ctypes es a) context => HasServer (Throwing es :> Verb method status ctypes a :: Type) context Source # | When |
route :: Proxy (Throwing es :> Verb method status ctypes a) -> Context context -> Delayed env (Server (Throwing es :> Verb method status ctypes a)) -> Router env # hoistServerWithContext :: Proxy (Throwing es :> Verb method status ctypes a) -> Proxy context -> (forall x. m x -> n x) -> ServerT (Throwing es :> Verb method status ctypes a) m -> ServerT (Throwing es :> Verb method status ctypes a) n # | |
(AllCTRender ctypes (Envelope es a), AllErrStatus es, KnownNat successStatus, ReflectMethod method) => HasServer (VerbWithErr method successStatus ctypes es a :: Type) context Source # | |
type ServerT (VerbWithErr method successStatus ctypes es a) m # route :: Proxy (VerbWithErr method successStatus ctypes es a) -> Context context -> Delayed env (Server (VerbWithErr method successStatus ctypes es a)) -> Router env # hoistServerWithContext :: Proxy (VerbWithErr method successStatus ctypes es a) -> Proxy context -> (forall x. m x -> n x) -> ServerT (VerbWithErr method successStatus ctypes es a) m -> ServerT (VerbWithErr method successStatus ctypes es a) n # |