Safe Haskell | None |
---|
Web server for the metadata daemon.
Synopsis
- type MetaM = Snap ()
- data MetaMExc = MetaMExc String
- throwError :: MonadBase IO m => String -> m a
- split :: String -> [String]
- lookupInstanceParams :: MonadBase IO m => String -> Map String b -> m b
- error404 :: MetaM
- error405 :: [Method] -> MetaM
- maybeResult :: MonadBase IO m => Result t -> (t -> m a) -> m a
- serveOsParams :: String -> Map String JSValue -> MetaM
- serveOsPackage :: String -> Map String JSValue -> String -> MetaM
- serveOsScript :: String -> Map String JSValue -> String -> MetaM
- handleMetadata :: MVar InstanceParams -> Method -> String -> String -> String -> MetaM
- routeMetadata :: MVar InstanceParams -> MetaM
- defaultHttpConf :: DaemonOptions -> FilePath -> FilePath -> Config Snap ()
- start :: DaemonOptions -> MVar InstanceParams -> IO ()
Documentation
throwError :: MonadBase IO m => String -> m a Source #
lookupInstanceParams :: MonadBase IO m => String -> Map String b -> m b Source #
error405 :: [Method] -> MetaM Source #
The 405 "method not allowed error", including the list of allowed methods.
maybeResult :: MonadBase IO m => Result t -> (t -> m a) -> m a Source #
serveOsParams :: String -> Map String JSValue -> MetaM Source #
serveOsPackage :: String -> Map String JSValue -> String -> MetaM Source #
serveOsScript :: String -> Map String JSValue -> String -> MetaM Source #
handleMetadata :: MVar InstanceParams -> Method -> String -> String -> String -> MetaM Source #
routeMetadata :: MVar InstanceParams -> MetaM Source #
defaultHttpConf :: DaemonOptions -> FilePath -> FilePath -> Config Snap () Source #
start :: DaemonOptions -> MVar InstanceParams -> IO () Source #