Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
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 #
Instances
Show JsonSource Source # | |
Defined in Conftrack.Source.Aeson showsPrec :: Int -> JsonSource -> ShowS # show :: JsonSource -> String # showList :: [JsonSource] -> ShowS # | |
ConfigSource JsonSource Source # | |
Defined in Conftrack.Source.Aeson type SourceState JsonSource Source # 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 |