Copyright | 2019 Daniel YU |
---|---|
License | MIT |
Maintainer | leptonyu@gmail.com |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
This module provide supports for endpoints.
Synopsis
- buildEndpoints :: forall context env n. (HasWeb context env, MonadMask n, MonadIO n) => Proxy context -> Proxy env -> Factory n (WebEnv env context) ()
- registerEndpoint :: forall context env api n. (HasSwagger api, HasServer api context, HasWeb context env, MonadIO n, MonadMask n) => Text -> Proxy context -> Proxy api -> ServerT api (App env) -> Factory n (WebEnv env context) ()
- endpointInfo :: (HasWeb context env, MonadMask n, MonadIO n) => Proxy context -> Factory n (WebEnv env context) ()
- endpointLogger :: (HasWeb context env, MonadMask n, MonadIO n) => Proxy context -> Factory n (WebEnv env context) ()
- endpointRefresh :: (HasWeb context env, MonadMask n, MonadIO n) => Proxy context -> Factory n (WebEnv env context) ()
- endpointHealth :: (HasWeb context env, MonadMask n, MonadIO n) => Proxy context -> Factory n (WebEnv env context) ()
- endpointMetrics :: (HasWeb context env, MonadMask n, MonadIO n) => Proxy context -> Factory n (WebEnv env context) ()
Documentation
:: (HasWeb context env, MonadMask n, MonadIO n) | |
=> Proxy context | Context proxy. |
-> Proxy env | Environment proxy. |
-> Factory n (WebEnv env context) () |
Register all endpoints provided by this package.
:: (HasSwagger api, HasServer api context, HasWeb context env, MonadIO n, MonadMask n) | |
=> Text | Endpoint name, used for path, |
-> Proxy context | Context proxy. |
-> Proxy api | Api proxy. |
-> ServerT api (App env) | Api server. |
-> Factory n (WebEnv env context) () |
Register endpoint, use this function to create custom endpoints.
endpointInfo :: (HasWeb context env, MonadMask n, MonadIO n) => Proxy context -> Factory n (WebEnv env context) () Source #
Register info endpoint.
endpointLogger :: (HasWeb context env, MonadMask n, MonadIO n) => Proxy context -> Factory n (WebEnv env context) () Source #
Register logger endpoint.
endpointRefresh :: (HasWeb context env, MonadMask n, MonadIO n) => Proxy context -> Factory n (WebEnv env context) () Source #
Register refresh endpoint.