package router
- Alphabetic
- Public
- All
Type Members
- trait ArgReader[I, +T, -C] extends AnyRef
-
case class
ArgSig[I, -T, +V, -C](name: String, typeString: String, doc: Option[String], default: Option[(T) ⇒ V])(implicit reads: ArgReader[I, V, C]) extends Product with Serializable
Models what is known by the router about a single argument: that it has a name, a human-readable typeString describing what the type is (just for logging and reading, not a replacement for a
TypeTag
) and possible a function that can compute its default value -
trait
Decorator[InnerReturned, Input] extends AnyRef
A Decorator allows you to annotate a function to wrap it, via
wrapFunction
.A Decorator allows you to annotate a function to wrap it, via
wrapFunction
. You can use this to perform additional validation before or after the function runs, provide an additional parameter list of params, open/commit/rollback database transactions before/after the function runs, or even retrying the wrapped function if it fails.Calls to the wrapped function are done on the
delegate
parameter passed towrapFunction
, which takes aMap
representing any additional argument lists (if any). -
trait
Endpoint[InnerReturned, Input] extends Decorator[InnerReturned, Input]
An HttpEndpoint that may return something else than a HTTP response, e.g.
An HttpEndpoint that may return something else than a HTTP response, e.g. a websocket endpoint which may instead return a websocket event handler
- case class EndpointMetadata[T](decorators: Seq[RawDecorator], endpoint: Endpoint[_, _], entryPoint: EntryPoint[T, _]) extends Product with Serializable
-
case class
EntryPoint[T, C](name: String, argSignatures: Seq[Seq[ArgSig[_, T, _, C]]], doc: Option[String], invoke0: (T, C, Seq[Map[String, Any]], Seq[Seq[ArgSig[Any, _, _, C]]]) ⇒ Result[Any]) extends Product with Serializable
What is known about a single endpoint for our routes.
What is known about a single endpoint for our routes. It has a name, argSignatures for each argument, and a macro-generated invoke0 that performs all the necessary argument parsing and de-serialization.
Realistically, you will probably spend most of your time calling invoke instead, which provides a nicer API to call it that mimmicks the API of calling a Scala method.
-
trait
HttpEndpoint[InnerReturned, Input] extends Endpoint[InnerReturned, Input]
Annotates a Cask endpoint that returns a HTTP Response; similar to a RawDecorator but with additional metadata and capabilities.
- class Macros[C <: Context] extends AnyRef
- class NoOpParser[Input, T] extends ArgReader[Input, T, model.Request]
-
trait
RawDecorator extends Decorator[Raw, Any]
A RawDecorator is a decorator that operates on the raw request and response stream, before and after the primary Endpoint does it's job.
-
sealed
trait
Result[+T] extends AnyRef
Represents what comes out of an attempt to invoke an EntryPoint.
Represents what comes out of an attempt to invoke an EntryPoint. Could succeed with a value, but could fail in many different ways.
- case class RoutesEndpointsMetadata[T](value: EndpointMetadata[T]*) extends Product with Serializable
- class doc extends Annotation with StaticAnnotation
Value Members
- object Decorator
- object NoOpParser
- object Result
- object RoutesEndpointsMetadata extends Serializable
- object Runtime