Safe Haskell | None |
---|---|
Language | Haskell2010 |
- type AppT a = ReaderT AppState IO a
- type CommandHandler = StoreData -> AppT ()
- data CommandOptions = CommandOptions {}
- data Command = Command {
- _cName :: String
- _cRequired :: [String]
- _cOptional :: [String]
- _cAllowedOptions :: [String]
- _cDescription :: String
- _cHandler :: CommandHandler
- data AppState = AppState {}
- data Configuration = Configuration {}
- newtype DbConnDescriptor = DbConnDescriptor String
- databaseTypes :: [(String, String -> IO Backend)]
- envDatabaseName :: String
- envDatabaseType :: String
- envLinearMigrations :: String
- envStoreName :: String
- loadConfiguration :: Maybe FilePath -> IO (Either String Configuration)
Documentation
type CommandHandler = StoreData -> AppT () Source
The type of actions that are invoked to handle specific commands
data CommandOptions Source
CommandOptions are those options that can be specified at the command prompt to modify the behavior of a command.
A command has a name, a number of required arguments' labels, a number of optional arguments' labels, and an action to invoke.
Command | |
|
Application state which can be accessed by any command handler.
databaseTypes :: [(String, String -> IO Backend)] Source
The values of DBM_DATABASE_TYPE and their corresponding connection factory functions.
loadConfiguration :: Maybe FilePath -> IO (Either String Configuration) Source
Loads config file (falling back to default one if not specified) and then overrides configuration with an environment.