snap-configuration-utilities-0.1.0.0: Methods to manipulate Configurator objects for Snap & Snaplets

Safe HaskellNone
LanguageHaskell2010

Snap.Utilities.Configuration

Synopsis

Documentation

cfgLookup :: Text -> (Value -> a) -> [ConfigPair] -> Maybe a Source

Look up a value.

cfgLookupWithDefault :: Text -> a -> (Value -> a) -> [ConfigPair] -> a Source

Look up a value and fall back to a default.

stringValue :: Value -> String Source

Show a Configurator value as a String.

listValue :: Value -> [String] Source

Show a Configurator value as a list.

keyPre :: Text -> [Text] Source

Get the prefix for a AuthDomain key.

rebaseKey :: ConfigPair -> ConfigPair Source

Reduce an AuthDomain key down to its last element.

groupName :: [ConfigPair] -> String Source

Get a name for a group of items. Has to drop 1 because the first item is always the type of group.

extractGroups :: (ConfigPair -> Bool) -> Config -> IO [[ConfigPair]] Source

withValidGroup :: String -> (String -> String -> [ConfigPair] -> a) -> [ConfigPair] -> a Source