stratosphere-0.1.4: EDSL for AWS CloudFormation

Safe HaskellNone
LanguageHaskell2010

Stratosphere.Helpers

Synopsis

Documentation

maybeField :: ToJSON a => Text -> Maybe a -> Maybe (Text, Value) Source #

Might create an aeson pair from a Maybe value.

prefixNamer :: String -> Name -> [Name] -> Name -> [DefName] Source #

Similar to camelCaseNamer, except we specify the prefix exactly. We use this because camelCaseNamer is terrible with names that start in all caps, like EC2. We would like to start the field names with "ec2...", but camelCaseNamer wants "eC2...".

modTemplateJSONField :: String -> String Source #

Used for the JSON instances in Template. It is put here because it must be in a separate module.

class NamedItem a where Source #

This class defines items with names in them. It is used to extract the name from JSON fields so we can get an Object with the names as keys instead of just an array.

Minimal complete definition

itemName, nameToJSON, nameParseJSON