configuration-tools-0.4.0: 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 # 
Instance details

Defined in Configuration.Utils.Internal.ConfigFileReader

Enum ConfigFileFormat Source # 
Instance details

Defined in Configuration.Utils.Internal.ConfigFileReader

Eq ConfigFileFormat Source # 
Instance details

Defined in Configuration.Utils.Internal.ConfigFileReader

Ord ConfigFileFormat Source # 
Instance details

Defined in Configuration.Utils.Internal.ConfigFileReader

Read ConfigFileFormat Source # 
Instance details

Defined in Configuration.Utils.Internal.ConfigFileReader

Show ConfigFileFormat Source # 
Instance details

Defined in Configuration.Utils.Internal.ConfigFileReader

Generic ConfigFileFormat Source # 
Instance details

Defined in Configuration.Utils.Internal.ConfigFileReader

Associated Types

type Rep ConfigFileFormat :: * -> * #

NFData ConfigFileFormat Source # 
Instance details

Defined in Configuration.Utils.Internal.ConfigFileReader

Methods

rnf :: ConfigFileFormat -> () #

type Rep ConfigFileFormat Source # 
Instance details

Defined in Configuration.Utils.Internal.ConfigFileReader

type Rep ConfigFileFormat = D1 (MetaData "ConfigFileFormat" "Configuration.Utils.Internal.ConfigFileReader" "configuration-tools-0.4.0-DZaNaq4TXbY1TtDx3wtQyK" 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