Copyright | (c) CNRS 2017-Present |
---|---|
License | AGPL + CECILL v3 |
Maintainer | team@gargantext.org |
Stability | experimental |
Portability | POSIX |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Main (RESTful) API of the instance Gargantext.
The Garg-API is typed to derive the documentation, the mock and tests.
This API is indeed typed in order to be able to derive both the server and the client sides.
The Garg-API-Monad enables: - Security (WIP) - Features (WIP) - Database connection (long term) - In Memory stack management (short term) - Logs (WIP)
Thanks to Yann Esposito for our discussions at the start and to Nicolas Pouillard (who mainly made it).
Synopsis
- startGargantext :: Mode -> PortNumber -> FilePath -> IO ()
- portRouteInfo :: PortNumber -> IO ()
- stopGargantext :: [ThreadId] -> IO ()
- schedulePeriodicActions :: CmdCommon env => env -> IO [ThreadId]
- fireWall :: Applicative f => Request -> FireWall -> f Bool
- makeGargMiddleware :: CORSSettings -> Mode -> IO Middleware
- makeApp :: Env -> IO Application
- api :: Proxy API
- apiWithEkg :: Proxy (EkgAPI :<|> API)
- apiGarg :: Proxy GargAPI
Documentation
startGargantext :: Mode -> PortNumber -> FilePath -> IO () #
startGargantext takes as parameters port number and Ini file.
portRouteInfo :: PortNumber -> IO () #
stopGargantext :: [ThreadId] -> IO () #
Stops the gargantext server and cancels all the periodic actions scheduled to run up to that point. TODO clean this Monad condition (more generic) ?
schedulePeriodicActions :: CmdCommon env => env -> IO [ThreadId] #
Schedules all sorts of useful periodic actions to be run while the server is alive accepting requests.
makeGargMiddleware :: CORSSettings -> Mode -> IO Middleware #
makeApp :: Env -> IO Application #
API Global
apiWithEkg :: Proxy (EkgAPI :<|> API) #