Implicit conversion that adds convenience methods to endpoint for optional values.
Implicit conversion that allows to call as[A]
on any Endpoint[String]
to perform a type
conversion based on an implicit DecodeEntity[A]
which must be in scope.
Implicit conversion that allows to call as[A]
on any Endpoint[String]
to perform a type
conversion based on an implicit DecodeEntity[A]
which must be in scope.
The resulting endpoint will fail when type conversion fails.
Implicit conversion that allows to call as[A]
on any Endpoint[NonEmptyList[String]]
to perform a
type conversion based on an implicit Decode[A]
which must be in scope.
Implicit conversion that allows to call as[A]
on any Endpoint[NonEmptyList[String]]
to perform a
type conversion based on an implicit Decode[A]
which must be in scope.
The resulting endpoint will fail when type conversion fails on one
or more of the elements in the NonEmptyList
. It will succeed if type conversion succeeds for all elements.
Implicit conversion that allows to call as[A]
on any Endpoint[Option[String]]
to perform a
type conversion based on an implicit DecodeRequest[A]
which must be in scope.
Implicit conversion that allows to call as[A]
on any Endpoint[Option[String]]
to perform a
type conversion based on an implicit DecodeRequest[A]
which must be in scope.
The resulting endpoint will fail when the result is non-empty and type conversion fails. It will succeed if the result is empty or type conversion succeeds.
Implicit conversion that allows to call as[A]
on any Endpoint[Seq[String]]
to perform a
type conversion based on an implicit DecodeRequest[A]
which must be in scope.
Implicit conversion that allows to call as[A]
on any Endpoint[Seq[String]]
to perform a
type conversion based on an implicit DecodeRequest[A]
which must be in scope.
The resulting endpoint will fail when the result is non-empty and type conversion fails on one
or more of the elements in the Seq
. It will succeed if the result is empty or type conversion
succeeds for all elements.
Creates an Endpoint that always matches and returns a given value (evaluated eagerly).
Generically derive a very basic instance of Endpoint for a given type A
.
Creates an empty Endpoint (an endpoint that never matches) for a given type.
Creates an Endpoint that always matches and returns a given value (evaluated lazily).
Creates an Endpoint that always matches and returns a given value (evaluated lazily).
This might be useful for wrapping functions returning arbitrary value within Endpoint context.
Example: the following endpoint will recompute a random integer on each request.
val nextInt: Endpoint[Int] = Endpoint.lift(scala.util.random.nextInt)
Creates an Endpoint that always matches and returns a given Future
(evaluated lazily).
Creates an Endpoint that always matches and returns a given Future[Output]
(evaluated lazily).
Creates an Endpoint that always matches and returns a given Output
(evaluated lazily).
Provides extension methods for Endpoint to support coproduct and path syntax.