package server
Content Hierarchy
Type Members
- trait BasicAuthentication extends EndpointsWithCustomErrors with algebra.BasicAuthentication
- trait BuiltInErrors extends algebra.BuiltInErrors
- abstract class Endpoints[F[_]] extends algebra.Endpoints with EndpointsWithCustomErrors with BuiltInErrors
Interpreter for algebra.Endpoints based on http4s.
Interpreter for algebra.Endpoints based on http4s. It uses algebra.BuiltInErrors to model client and server errors.
Consider the following endpoint definition:
trait MyEndpoints extends algebra.Endpoints with algebra.JsonEntitiesFromSchemas { val inc = endpoint(get(path / "inc" /? qs[Int]("x")), ok(jsonResponse[Int])) }
You can get an http4s service for it as follow:
object MyService extends endpoints.http4s.server.Endpoints[IO] with endpoints.http4s.server.JsonEntitiesFromSchemas with MyEndpoints { val service: org.http4s.HttpRoutes[IO] = HttpRoutes.of( routesFromEndpoints( inc.implementedBy(x => x + 1) ) ) }
- F
Effect type
- trait EndpointsWithCustomErrors extends algebra.EndpointsWithCustomErrors with Methods with Urls
Interpreter for algebra.EndpointsWithCustomErrors based on http4s.
- trait JsonEntitiesFromCodecs extends algebra.JsonEntitiesFromCodecs with EndpointsWithCustomErrors
Interpreter for algebra.JsonEntitiesFromCodecs that decodes JSON requests and encodes JSON responses.
- trait JsonEntitiesFromSchemas extends algebra.JsonEntitiesFromSchemas with JsonEntitiesFromCodecs with JsonSchemas
Interpreter for algebra.JsonEntitiesFromSchemas that decodes JSON requests and encodes JSON responses.
- trait Methods extends algebra.Methods
algebra.Methods interpreter that decodes and encodes methods.
- trait StatusCodes extends algebra.StatusCodes
algebra.StatusCodes interpreter that decodes and encodes methods.
- trait Urls extends algebra.Urls with StatusCodes
algebra.Urls interpreter that decodes and encodes URLs.