ContentsIndex
Framework.Types
Synopsis
type S = String
data DBConnection = forall c . IConnection c => DBC c
type HttpRequest = Request String
type HttpResponse = Response String
type FieldValidator = HttpRequest -> String -> String -> Either String String
data HttpVar
= Str String
| POSTfile {
filename :: String
mimetype :: String
filebody :: String
}
type HttpVarsMap = Map String HttpVar
data StaticConfig = HP {
portNumber :: Int
docdir :: String
dbDriver :: String
dbPath :: String
cacheDriver :: String
cachePath :: String
sessionsDriver :: String
sessionsPath :: String
accessLogPath :: String
errorsLogPath :: String
dbpool :: MPool DBConnection
cpool :: MPool CacheConnection
logChan :: Log
errChan :: Log
config :: ConfigParser
}
data StartupConfig = StartupConfig {
dbpoolSC :: MPool DBConnection
cpoolSC :: MPool CacheConnection
logChanSC :: Log
errChanSC :: Log
configSC :: ConfigParser
}
data ActionConfig = ActionConfig {
request :: HttpRequest
httpParams :: StaticConfig
dbconnection :: DBConnection
sessionID :: SessionID
sessionMap :: SessionMap
sessionsBackend :: SessionsConnection
cacheBackend :: CacheConnection
cookiesExp :: String
dbpoolIndex :: Int
cpoolIndex :: Int
}
data UrlParam = String := String
type FormVar = UrlParam
repackHeader :: Header -> (String, String)
packParam :: (String, String) -> UrlParam
data LogItem = LogItem {
logRequest :: HttpRequest
logTime :: String
logMessage :: String
}
type Log = Chan LogItem
Documentation
type S = String
data DBConnection
Container type for any database connection
Constructors
forall c . IConnection c => DBC c
show/hide Instances
type HttpRequest = Request String
type HttpResponse = Response String
type FieldValidator = HttpRequest -> String -> String -> Either String String
Field validator takes field value and returns either error message or validated value
data HttpVar
HTTP (GET or POST) variable can contain just a string or an uploaded file.
Constructors
Str String
POSTfile
filename :: String
mimetype :: String
filebody :: String
show/hide Instances
Show HttpVar
type HttpVarsMap = Map String HttpVar
data StaticConfig
This object contains config which is common for all requests
Constructors
HP
portNumber :: IntPort number to listen
docdir :: StringStatic content directory
dbDriver :: StringDB backend name
dbPath :: StringInfo for DB backend
cacheDriver :: StringCache backend name
cachePath :: StringInfo for cache backend
sessionsDriver :: StringSessions backend name
sessionsPath :: StringInfo for sessions backend
accessLogPath :: StringPath to the access log
errorsLogPath :: StringPath to the erros log
dbpool :: MPool DBConnectionDB connections pool
cpool :: MPool CacheConnectionCache connections pool
logChan :: LogHandle to log
errChan :: LogHandle to errors log
config :: ConfigParser
show/hide Instances
data StartupConfig
Temporarly object, contains part of StaticConfig which is not read from file
Constructors
StartupConfig
dbpoolSC :: MPool DBConnectionDB connections pool
cpoolSC :: MPool CacheConnectionCache connections pool
logChanSC :: LogHandle to log
errChanSC :: LogHandle to errors log
configSC :: ConfigParser
show/hide Instances
data ActionConfig
Runtime controller action configuration
Constructors
ActionConfig
request :: HttpRequestHTTP request
httpParams :: StaticConfigStatic (global) configuration
dbconnection :: DBConnectionDB connection
sessionID :: SessionIDCurrent HTTP session ID
sessionMap :: SessionMapContains session variables
sessionsBackend :: SessionsConnectionConnection to sessions backend
cacheBackend :: CacheConnectionConnection to cache backend
cookiesExp :: StringCookies expiration date
dbpoolIndex :: IntIndex of DB connection in pool
cpoolIndex :: IntIndex of cache connection in pool
show/hide Instances
data UrlParam
Constructors
String := String
type FormVar = UrlParam
repackHeader :: Header -> (String, String)
packParam :: (String, String) -> UrlParam
data LogItem
Constructors
LogItem
logRequest :: HttpRequest
logTime :: String
logMessage :: String
type Log = Chan LogItem
Produced by Haddock version 2.4.2