package server
Server interpreters backed by Play framework
- Alphabetic
- By Inheritance
- server
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
trait
Assets extends algebra.Assets with EndpointsWithCustomErrors
Interpreter for algebra.Assets that performs routing using Play framework
- trait BasicAuthentication extends algebra.BasicAuthentication with EndpointsWithCustomErrors
- trait BuiltInErrors extends algebra.BuiltInErrors
-
trait
ChunkedEntities extends EndpointsWithCustomErrors with algebra.ChunkedEntities
Interpreter for the algebra.ChunkedEntities algebra in the endpoints4s.play.server family.
-
trait
ChunkedJsonEntities extends ChunkedEntities with algebra.ChunkedJsonEntities with JsonEntitiesFromCodecs
Interpreter for the algebra.ChunkedJsonEntities algebra in the endpoints4s.play.server family.
-
trait
Endpoints extends algebra.Endpoints with EndpointsWithCustomErrors with BuiltInErrors
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.routescan be used to define a proper Play router as follows:val router = play.api.routing.Router.from(MyRouter.routes) -
trait
EndpointsWithCustomErrors extends algebra.EndpointsWithCustomErrors with Urls with Methods with StatusCodes
Interpreter for algebra.Endpoints that performs routing using Play framework.
-
trait
JsonEntitiesFromCodecs extends algebra.JsonEntitiesFromCodecs with EndpointsWithCustomErrors
Interpreter for algebra.JsonEntitiesFromCodecs that decodes JSON requests and encodes JSON responses.
-
trait
JsonEntitiesFromEncodersAndDecoders extends JsonEntities with EndpointsWithCustomErrors
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
OpenApidocuments into JSON entities. -
trait
JsonEntitiesFromSchemas extends algebra.JsonEntitiesFromSchemas with JsonEntitiesFromCodecs with JsonSchemas
Interpreter for algebra.JsonEntitiesFromSchemas that decodes JSON requests and encodes JSON responses.
- trait LowLevelEndpoints extends algebra.LowLevelEndpoints with Endpoints
-
trait
Methods extends algebra.Methods
algebra.Methods interpreter that decodes and encodes methods.
- trait MuxEndpoints extends algebra.MuxEndpoints with EndpointsWithCustomErrors
-
trait
MuxHandler[Req <: MuxRequest, Resp] extends AnyRef
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.- Req
Request base type
- Resp
Response base type
-
trait
MuxHandlerAsync[Req <: MuxRequest, Resp] extends AnyRef
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.- Req
Request base type
- Resp
Response base type
-
trait
PlayComponents extends AnyRef
Play components needed by the interpreter
- trait StatusCodes extends algebra.StatusCodes
-
trait
Urls extends algebra.Urls
algebra.Urls interpreter that decodes and encodes URLs.
Value Members
- object PlayComponents