JackRose-0.8: Spaced repetition web server

Copyright(c) Michael Mounteney, 2016
LicenseBSD 3 clause
Maintainerthe project name, all lower case, at landcroft dot com
Stabilityexperimental
Portabilityundefined
Safe HaskellNone
LanguageHaskell2010

JRState

Description

 

Synopsis

Documentation

type PostgresConnPool = Map PostgresConnection (Int, Connection) Source #

All external data references to one server (various tables) share one connection object. This structure manages it.

type DataSchemes = Map DataSourceId DataDescriptor Source #

Each data source has a corresponding in-memory structure, corresponding to a file handle, database connection etc.

type UserConfig = Map Text (UserId, [UserDeckCpt]) Source #

The key of the map is Text because the security subsystem returns a user id, which is Text. TODO: plumb Yesod.Auth to return a numeric id. instead.

data JRState Source #

The foundation object

Constructors

JRState 

Fields

Instances

data Route JRState 
data Route JRState
type YesodPersistBackend JRState 
type YesodPersistBackend JRState = SqlBackend
type AuthId JRState 
type AuthId JRState = Username

runFilteredLoggingT :: MonadIO m => JRState -> LoggingT m a -> m a Source #

Run logging at the user-specified level of detail.

getPostgresConnPool :: JRState -> IO PostgresConnPool Source #

Get the Postgres connection pool map

getDataSchemes :: JRState -> IO DataSchemes Source #

Get the data source handle map

getUserConfig :: JRState -> IO UserConfig Source #

Get the user configuration map