configuration-tools-0.3.1: Tools for specifying and parsing configurations

CopyrightCopyright © 2015 PivotCloud Inc.
LicenseMIT
MaintainerLars Kuhtz <lkuhtz@pivotmail.com>
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Configuration.Utils.Internal.ConfigFileReader

Contents

Description

 

Synopsis

Documentation

parseConfigFiles Source #

Arguments

:: (ConfigFileParser m, FromJSON (a -> a)) 
=> ConfigFilesConfig 
-> a

default configuration value

-> [ConfigFile]

list of configuration file paths

-> m a 

readConfigFile Source #

Arguments

:: (ConfigFileParser m, FromJSON (a -> a)) 
=> ConfigFilesConfig 
-> ConfigFile

file path

-> m (a -> a) 

data ConfigFileFormat Source #

Constructors

Yaml 
Json 
Other 

Instances

Bounded ConfigFileFormat Source # 
Enum ConfigFileFormat Source # 
Eq ConfigFileFormat Source # 
Ord ConfigFileFormat Source # 
Read ConfigFileFormat Source # 
Show ConfigFileFormat Source # 
Generic ConfigFileFormat Source # 
NFData ConfigFileFormat Source # 

Methods

rnf :: ConfigFileFormat -> () #

type Rep ConfigFileFormat Source # 
type Rep ConfigFileFormat = D1 * (MetaData "ConfigFileFormat" "Configuration.Utils.Internal.ConfigFileReader" "configuration-tools-0.3.1-8wR8yVunqu93Hzhyjf0M27" False) ((:+:) * (C1 * (MetaCons "Yaml" PrefixI False) (U1 *)) ((:+:) * (C1 * (MetaCons "Json" PrefixI False) (U1 *)) (C1 * (MetaCons "Other" PrefixI False) (U1 *))))

Local Config Files

loadLocal Source #

Arguments

:: (Functor m, MonadIO m, MonadError Text m, FromJSON (a -> a)) 
=> ConfigFile

file path

-> m (a -> a) 

Remote Config Files

loadRemote Source #

Arguments

:: (ConfigFileParser m, FromJSON (a -> a)) 
=> ConfigFilesConfig 
-> ConfigFile

URL

-> m (a -> a) 

jsonMimeType :: IsString s => [s] Source #

Defined in RFC 4627

contentType Source #

Arguments

:: ByteString

value of an HTTP Content-Type header

-> ConfigFileFormat