Packages

package server

Interpreters producing an http4s server

Source
package.scala
Linear Supertypes
Content Hierarchy

Type Members

  1. trait Assets extends algebra.Assets with EndpointsWithCustomErrors
  2. trait BasicAuthentication extends EndpointsWithCustomErrors with algebra.BasicAuthentication

  3. trait BuiltInErrors extends algebra.BuiltInErrors

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

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

    Interpreter for algebra.EndpointsWithCustomErrors based on http4s.

  6. trait JsonEntitiesFromCodecs extends algebra.JsonEntitiesFromCodecs with EndpointsWithCustomErrors

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

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

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

  8. trait Methods extends algebra.Methods

    algebra.Methods interpreter that decodes and encodes methods.

  9. trait StatusCodes extends algebra.StatusCodes

    algebra.StatusCodes interpreter that decodes and encodes methods.

  10. trait Urls extends algebra.Urls with StatusCodes

    algebra.Urls interpreter that decodes and encodes URLs.

Inherited from AnyRef

Inherited from Any

interpreters

Ungrouped