Packages

package server

Content Hierarchy

Type Members

  1. trait BasicAuthentication extends EndpointsWithCustomErrors with algebra.BasicAuthentication

  2. trait BuiltInErrors extends algebra.BuiltInErrors

  3. 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

  4. trait EndpointsWithCustomErrors extends algebra.EndpointsWithCustomErrors with Methods with Urls

    Interpreter for algebra.EndpointsWithCustomErrors based on http4s.

  5. trait JsonEntitiesFromCodecs extends algebra.JsonEntitiesFromCodecs with EndpointsWithCustomErrors

    Interpreter for algebra.JsonEntitiesFromCodecs that decodes JSON requests and encodes JSON responses.

  6. trait JsonEntitiesFromSchemas extends algebra.JsonEntitiesFromSchemas with JsonEntitiesFromCodecs with JsonSchemas

    Interpreter for algebra.JsonEntitiesFromSchemas that decodes JSON requests and encodes JSON responses.

  7. trait Methods extends algebra.Methods

    algebra.Methods interpreter that decodes and encodes methods.

  8. trait StatusCodes extends algebra.StatusCodes

    algebra.StatusCodes interpreter that decodes and encodes methods.

  9. trait Urls extends algebra.Urls with StatusCodes

    algebra.Urls interpreter that decodes and encodes URLs.

interpreters

Ungrouped