boots-web-0.2.0.1: Factory for quickly building a web application

Copyright2019 Daniel YU
LicenseMIT
Maintainerleptonyu@gmail.com
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Boots.Factory.Endpoint

Description

This module provide supports for endpoints.

Synopsis

Documentation

buildEndpoints Source #

Arguments

:: (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.

registerEndpoint Source #

Arguments

:: (HasSwagger api, HasServer api context, HasWeb context env, MonadIO n, MonadMask n) 
=> Text

Endpoint name, used for path, endpoints:name.

-> Proxy context

Context proxy.

-> Proxy api

Api proxy.

-> ServerT api (App (AppEnv 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.

endpointHealth :: (HasWeb context env, MonadMask n, MonadIO n) => Proxy context -> Factory n (WebEnv env context) () Source #

Register health endpoint.

endpointMetrics :: (HasWeb context env, MonadMask n, MonadIO n) => Proxy context -> Factory n (WebEnv env context) () Source #

Register metrics endpoint.