| Safe Haskell | Safe-Inferred |
|---|---|
| Language | GHC2021 |
Conftrack.Source.Aeson
Description
Functions for producing sources reading from json strings or files, using the aeson library.
Synopsis
- mkJsonSource :: Value -> SomeSource
- mkJsonSourceWith :: Text -> Value -> SomeSource
- mkJsonFileSource :: OsPath -> IO (Maybe SomeSource)
- data JsonSource = JsonSource {}
Documentation
mkJsonSource :: Value -> SomeSource Source #
Make a source from an aeson value
mkJsonSourceWith :: Text -> Value -> SomeSource Source #
same as mkJsonSource, but with an additional description to be shown
in output of printConfigOrigins.
mkJsonFileSource :: OsPath -> IO (Maybe SomeSource) Source #
Make a source from a json file.
data JsonSource Source #
Constructors
| JsonSource | |
Fields | |
Instances
| Show JsonSource Source # | |
Defined in Conftrack.Source.Aeson Methods showsPrec :: Int -> JsonSource -> ShowS # show :: JsonSource -> String # showList :: [JsonSource] -> ShowS # | |
| ConfigSource JsonSource Source # | |
Defined in Conftrack.Source.Aeson Associated Types type SourceState JsonSource Source # Methods fetchValue :: Key -> JsonSource -> StateT (SourceState JsonSource) IO (Either ConfigError (Value, Text)) Source # leftovers :: JsonSource -> StateT (SourceState JsonSource) IO (Maybe [Key]) Source # | |
| type SourceState JsonSource Source # | |
Defined in Conftrack.Source.Aeson | |