Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- 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 {}
- makeParameters :: Configuration -> Backend -> ExecutableParameters
- data ExecutableParameters = ExecutableParameters {}
- envDatabaseName :: 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.
data Configuration Source #
Loading the configuration from a file or having it specified via environment |variables results in a value of type Configuration.
Instances
Show Configuration Source # | |
Defined in Moo.Core showsPrec :: Int -> Configuration -> ShowS # show :: Configuration -> String # showList :: [Configuration] -> ShowS # |
data ExecutableParameters Source #
A value of type ExecutableParameters is what a moo executable (moo-postgresql, |moo-mysql, etc.) pass to the core package when they want to execute a |command.
Instances
Show ExecutableParameters Source # | |
Defined in Moo.Core showsPrec :: Int -> ExecutableParameters -> ShowS # show :: ExecutableParameters -> String # showList :: [ExecutableParameters] -> ShowS # |
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.