conferer-1.1.0.0: Configuration management library
Copyright(c) 2019 Lucas David Traverso
LicenseMPL-2.0
MaintainerLucas David Traverso <lucas6246@gmail.com>
Stabilitystable
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Conferer.Source.PropertiesFile

Description

Properties file source

Synopsis

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

fromConfig :: Key -> SourceCreator Source #

Create a SourceCreator using getFilePathFromEnv to get the path to file and fromFilePath

fromFilePath :: FilePath -> SourceCreator Source #

Create a SourceCreator reading the file and using that as a properties file, but if the file doesn't exist do nothing.

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.

fromFileContent :: FilePath -> Text -> Source Source #

Create a Source using some content as a properties file

lineToKeyValue :: Text -> Maybe (Key, Text) Source #

Transform a line into a key/value pair (or not)