endpoints4s.play.server

Server interpreters backed by Play framework

Attributes

Members list

Type members

Classlikes

trait Assets extends Assets, EndpointsWithCustomErrors

Interpreter for algebra.Assets that performs routing using Play framework

Interpreter for algebra.Assets that performs routing using Play framework

Attributes

Supertypes
trait StatusCodes
trait Methods
trait Urls
trait Assets
trait EndpointsWithCustomErrors
trait Errors
trait Responses
trait StatusCodes
trait Requests
trait SemigroupalSyntax
trait Methods
trait Urls
trait PartialInvariantFunctorSyntax
trait InvariantFunctorSyntax
class Object
trait Matchable
class Any
Show all
trait BasicAuthentication extends BasicAuthentication, EndpointsWithCustomErrors

Attributes

Supertypes
trait StatusCodes
trait Methods
trait Urls
trait BasicAuthentication
trait EndpointsWithCustomErrors
trait Errors
trait Responses
trait StatusCodes
trait Requests
trait SemigroupalSyntax
trait Methods
trait Urls
trait PartialInvariantFunctorSyntax
trait InvariantFunctorSyntax
class Object
trait Matchable
class Any
Show all
trait BuiltInErrors extends BuiltInErrors

Attributes

Supertypes
trait BuiltInErrors
trait Errors
class Object
trait Matchable
class Any
Known subtypes
Self type
trait ChunkedEntities extends EndpointsWithCustomErrors, ChunkedEntities

Interpreter for the algebra.ChunkedEntities algebra in the endpoints4s.play.server family.

Interpreter for the algebra.ChunkedEntities algebra in the endpoints4s.play.server family.

Attributes

Supertypes
trait ChunkedEntities
trait ChunkedResponseEntities
trait ChunkedRequestEntities
trait Chunks
trait StatusCodes
trait Methods
trait Urls
trait EndpointsWithCustomErrors
trait Errors
trait Responses
trait StatusCodes
trait Requests
trait SemigroupalSyntax
trait Methods
trait Urls
trait PartialInvariantFunctorSyntax
trait InvariantFunctorSyntax
class Object
trait Matchable
class Any
Show all
Known subtypes
trait ChunkedJsonEntities extends ChunkedEntities, ChunkedJsonEntities, JsonEntitiesFromCodecs

Interpreter for the algebra.ChunkedJsonEntities algebra in the endpoints4s.play.server family.

Interpreter for the algebra.ChunkedJsonEntities algebra in the endpoints4s.play.server family.

Attributes

Supertypes
trait JsonEntitiesFromCodecs
trait ChunkedJsonEntities
trait ChunkedJsonResponseEntities
trait ChunkedJsonRequestEntities
trait Framing
trait JsonCodecs
trait JsonEntities
trait ChunkedEntities
trait ChunkedResponseEntities
trait ChunkedRequestEntities
trait Chunks
trait StatusCodes
trait Methods
trait Urls
trait EndpointsWithCustomErrors
trait Errors
trait Responses
trait StatusCodes
trait Requests
trait SemigroupalSyntax
trait Methods
trait Urls
trait PartialInvariantFunctorSyntax
trait InvariantFunctorSyntax
class Object
trait Matchable
class Any
Show all

Interpreter for algebra.Endpoints that performs routing using Play framework, and uses algebra.BuiltInErrors to model client and server errors.

Interpreter for algebra.Endpoints that performs routing using Play framework, and uses algebra.BuiltInErrors to model client and server errors.

Consider the following endpoints definition:

 trait MyEndpoints extends algebra.Endpoints with algebra.JsonEntities {
   val inc = endpoint(get(path / "inc" ? qs[Int]("x")), jsonResponse[Int])
 }

You can get a router for them as follows:

 object MyRouter extends MyEndpoints with play.server.Endpoints with play.server.JsonEntities {

   val routes = routesFromEndpoints(
     inc.implementedBy(x => x + 1)
   )

 }

Then MyRouter.routes can be used to define a proper Play router as follows:

 val router = play.api.routing.Router.from(MyRouter.routes)

Attributes

Supertypes
trait StatusCodes
trait Methods
trait Urls
trait Endpoints
trait BuiltInErrors
trait EndpointsWithCustomErrors
trait Errors
trait Responses
trait StatusCodes
trait Requests
trait SemigroupalSyntax
trait Methods
trait Urls
trait PartialInvariantFunctorSyntax
trait InvariantFunctorSyntax
class Object
trait Matchable
class Any
Show all
Known subtypes
trait EndpointsWithCustomErrors extends EndpointsWithCustomErrors, Urls, Methods, StatusCodes

Interpreter for algebra.Endpoints that performs routing using Play framework.

Interpreter for algebra.Endpoints that performs routing using Play framework.

Attributes

Supertypes
trait StatusCodes
trait Methods
trait Urls
trait EndpointsWithCustomErrors
trait Errors
trait Responses
trait StatusCodes
trait Requests
trait SemigroupalSyntax
trait Methods
trait Urls
trait PartialInvariantFunctorSyntax
trait InvariantFunctorSyntax
class Object
trait Matchable
class Any
Show all
Known subtypes
trait JsonEntitiesFromCodecs extends JsonEntitiesFromCodecs, EndpointsWithCustomErrors

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

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

Attributes

Supertypes
trait StatusCodes
trait Methods
trait Urls
trait JsonEntitiesFromCodecs
trait JsonCodecs
trait JsonEntities
trait EndpointsWithCustomErrors
trait Errors
trait Responses
trait StatusCodes
trait Requests
trait SemigroupalSyntax
trait Methods
trait Urls
trait PartialInvariantFunctorSyntax
trait InvariantFunctorSyntax
class Object
trait Matchable
class Any
Show all
Known subtypes

Interpreter for algebra.JsonEntities that decodes JSON entities with a endpoints4s.Decoder and encodes JSON entities with an endpoints4s.Encoder.

Interpreter for algebra.JsonEntities that decodes JSON entities with a endpoints4s.Decoder and encodes JSON entities with an endpoints4s.Encoder.

The difference with JsonEntitiesFromCodecs is that you don’t need bidirectional codecs: you only need an encoder to build responses, or a decoder to decode requests.

It is especially useful to encode OpenApi documents into JSON entities.

Attributes

Supertypes
trait StatusCodes
trait Methods
trait Urls
trait JsonEntities
trait EndpointsWithCustomErrors
trait Errors
trait Responses
trait StatusCodes
trait Requests
trait SemigroupalSyntax
trait Methods
trait Urls
trait PartialInvariantFunctorSyntax
trait InvariantFunctorSyntax
class Object
trait Matchable
class Any
Show all
trait JsonEntitiesFromSchemas extends JsonEntitiesFromSchemas, JsonEntitiesFromCodecs, JsonSchemas

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

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

Attributes

Supertypes
trait JsonSchemas
trait TuplesSchemas
trait NoDocsJsonSchemas
trait StatusCodes
trait Methods
trait Urls
trait JsonEntitiesFromCodecs
trait JsonEntitiesFromSchemas
trait JsonSchemas
trait TuplesSchemas
trait JsonCodecs
trait JsonEntities
trait EndpointsWithCustomErrors
trait Errors
trait Responses
trait StatusCodes
trait Requests
trait SemigroupalSyntax
trait Methods
trait Urls
trait PartialInvariantFunctorSyntax
trait InvariantFunctorSyntax
class Object
trait Matchable
class Any
Show all
trait LowLevelEndpoints extends LowLevelEndpoints, Endpoints

Attributes

Supertypes
trait Endpoints
trait StatusCodes
trait Methods
trait Urls
trait Endpoints
trait BuiltInErrors
trait LowLevelEndpoints
trait EndpointsWithCustomErrors
trait Errors
trait Responses
trait StatusCodes
trait Requests
trait SemigroupalSyntax
trait Methods
trait Urls
trait PartialInvariantFunctorSyntax
trait InvariantFunctorSyntax
class Object
trait Matchable
class Any
Show all
trait Methods extends Methods

algebra.Methods interpreter that decodes and encodes methods.

algebra.Methods interpreter that decodes and encodes methods.

Attributes

Supertypes
trait Methods
class Object
trait Matchable
class Any
Known subtypes
trait MuxEndpoints extends MuxEndpoints, EndpointsWithCustomErrors

Attributes

Supertypes
trait StatusCodes
trait Methods
trait Urls
trait MuxEndpoints
trait EndpointsWithCustomErrors
trait Errors
trait Responses
trait StatusCodes
trait Requests
trait SemigroupalSyntax
trait Methods
trait Urls
trait PartialInvariantFunctorSyntax
trait InvariantFunctorSyntax
class Object
trait Matchable
class Any
Show all
trait MuxHandler[Req <: MuxRequest, Resp]

A function whose return type depends on the type of the given req.

A function whose return type depends on the type of the given req.

Type parameters

Req

Request base type

Resp

Response base type

Attributes

Supertypes
class Object
trait Matchable
class Any
trait MuxHandlerAsync[Req <: MuxRequest, Resp]

A function whose return type depends on the type of the given req.

A function whose return type depends on the type of the given req.

Type parameters

Req

Request base type

Resp

Response base type

Attributes

Supertypes
class Object
trait Matchable
class Any

Play components needed by the interpreter

Play components needed by the interpreter

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
trait StatusCodes extends StatusCodes

Attributes

Supertypes
trait StatusCodes
class Object
trait Matchable
class Any
Known subtypes
trait Urls extends Urls

algebra.Urls interpreter that decodes and encodes URLs.

algebra.Urls interpreter that decodes and encodes URLs.

Attributes

Supertypes
trait Urls
trait PartialInvariantFunctorSyntax
trait InvariantFunctorSyntax
class Object
trait Matchable
class Any
Show all
Known subtypes
Self type