| Copyright | (c) 2019 Lucas David Traverso |
|---|---|
| License | MPL-2.0 |
| Maintainer | Lucas David Traverso <lucas6246@gmail.com> |
| Stability | stable |
| Portability | portable |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Conferer.Source.PropertiesFile
Description
Properties file source
Synopsis
- data PropertiesFileSource = PropertiesFileSource {}
- fromConfig :: Key -> SourceCreator
- fromFilePath :: FilePath -> IO Source
- fromFileContent :: FilePath -> Text -> Source
- lineToKeyValue :: Text -> Maybe (Key, Text)
Documentation
data PropertiesFileSource Source #
Source that uses a config file in config/{env}.properties and
parses it as a properties file with some.key=a value lines
Constructors
| PropertiesFileSource | |
Fields | |
Instances
| Show PropertiesFileSource Source # | |
Defined in Conferer.Source.PropertiesFile Methods showsPrec :: Int -> PropertiesFileSource -> ShowS # show :: PropertiesFileSource -> String # showList :: [PropertiesFileSource] -> ShowS # | |
| IsSource PropertiesFileSource Source # | |
Defined in Conferer.Source.PropertiesFile Methods getKeyInSource :: PropertiesFileSource -> Key -> IO (Maybe Text) Source # getSubkeysInSource :: PropertiesFileSource -> Key -> IO [Key] Source # | |
fromConfig :: Key -> SourceCreator Source #
Create a SourceCreator using getFilePathFromEnv to get the path to file
and fromFilePath
fromFilePath :: FilePath -> IO Source Source #
Create a Source reading the file and using that as a properties file, but
if the file doesn't exist do nothing.