Safe Haskell | None |
---|---|
Language | Haskell2010 |
- crash :: FActionError -> FAction a
- fActionServantErr :: ActionError FActionError -> IO ServantErr
- type FSession = Session IO () FrontendSessionData
- type FSessionMap = Key FSession -> Maybe FSession
- type FSessionStore = SessionStore IO () FrontendSessionData
- type FServantSession = SSession IO () FrontendSessionData
- setCookie :: SetCookie
- cookieName :: SBS
- cookieNameValid :: SBS -> Bool
- thentosSessionMiddleware :: IO (Middleware, Key FSession)
- serveFAction :: forall api. (HasServer api, Enter (ServerT api FAction) (FAction :~> ExceptT ServantErr IO) (Server api)) => Proxy api -> ServerT api FAction -> ActionState -> IO Application
- enterFAction :: ActionState -> Key FSession -> FSessionMap -> FAction :~> ExceptT ServantErr IO
- cookieToFSession :: IO (Maybe FrontendSessionData) -> FAction ()
- cookieFromFSession :: (FrontendSessionData -> IO ()) -> FAction ()
- getFrontendCfg :: FAction HttpConfig
errors
crash :: FActionError -> FAction a
middleware
type FSession = Session IO () FrontendSessionData
type FSessionMap = Key FSession -> Maybe FSession
type FSessionStore = SessionStore IO () FrontendSessionData
type FServantSession = SSession IO () FrontendSessionData
setCookie :: SetCookie
cookieName :: SBS
cookieNameValid :: SBS -> Bool
thentosSessionMiddleware :: IO (Middleware, Key FSession)
frontend action monad
serveFAction :: forall api. (HasServer api, Enter (ServerT api FAction) (FAction :~> ExceptT ServantErr IO) (Server api)) => Proxy api -> ServerT api FAction -> ActionState -> IO Application
enterFAction :: ActionState -> Key FSession -> FSessionMap -> FAction :~> ExceptT ServantErr IO
cookieToFSession :: IO (Maybe FrontendSessionData) -> FAction ()
Write FrontendSessionData
from the servant-session state to FAction
state. If there is no
state, do nothing.
cookieFromFSession :: (FrontendSessionData -> IO ()) -> FAction ()
Read FrontendSessionData
from FAction
and write back into servant-session state.