cask.router

package cask.router

Members list

Concise view

Type members

Classlikes

trait ArgReader[I, +T, -C]

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait FormReader[T]
trait JsReader[T]
class ParamReader[T]
class NilParam[T]
object CookieParam.type
object FormDataParam.type
object HttpExchangeParam.type
object RequestParam.type
class SimpleParam[T]
object BooleanParam.type
object ByteParam.type
object DoubleParam.type
object FloatParam.type
object IntParam.type
object LongParam.type
object ShortParam.type
object StringParam.type
class NoOpParser[Input, T]
case class ArgSig[I, -T, +V, -C](name: String, typeString: String, doc: Option[String], default: Option[T => V])(implicit reads: ArgReader[I, V, C])

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

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

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
trait Decorator[OuterReturned, InnerReturned, Input] extends Annotation

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.

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 to wrapFunction, which takes a Map representing any additional argument lists (if any).

Attributes

Companion:
object
Graph
Supertypes
class Annotation
class Object
trait Matchable
class Any
Known subtypes
trait Endpoint[OuterReturned, InnerReturned, Input]
class websocket
trait HttpEndpoint[InnerReturned, Input]
class delete
class get
class options
class patch
class post
class put
class route
class getJson
class postForm
class postJson
object Decorator

Attributes

Companion:
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
trait Endpoint[OuterReturned, InnerReturned, Input] extends Decorator[OuterReturned, InnerReturned, Input]

An HttpEndpoint that may return something else than a HTTP response, e.g. a websocket endpoint which may instead return a websocket event handler

An HttpEndpoint that may return something else than a HTTP response, e.g. a websocket endpoint which may instead return a websocket event handler

Attributes

Graph
Supertypes
trait Decorator[OuterReturned, InnerReturned, Input]
class Annotation
class Object
trait Matchable
class Any
Known subtypes
class websocket
trait HttpEndpoint[InnerReturned, Input]
class delete
class get
class options
class patch
class post
class put
class route
class getJson
class postForm
class postJson
case class EndpointMetadata[T](decorators: Seq[Decorator[_, _, _]], endpoint: Endpoint[_, _, _], entryPoint: EntryPoint[T, _])

Attributes

Companion:
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Attributes

Companion:
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
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])

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.

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.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
trait HttpEndpoint[InnerReturned, Input] extends Endpoint[Raw, InnerReturned, Input]

Annotates a Cask endpoint that returns a HTTP Response; similar to a RawDecorator but with additional metadata and capabilities.

Annotates a Cask endpoint that returns a HTTP Response; similar to a RawDecorator but with additional metadata and capabilities.

Attributes

Graph
Supertypes
trait Endpoint[Raw, InnerReturned, Input]
trait Decorator[Raw, InnerReturned, Input]
class Annotation
class Object
trait Matchable
class Any
Known subtypes
class delete
class get
class options
class patch
class post
class put
class route
class getJson
class postForm
class postJson
object Macros

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Macros.type
class NoOpParser[Input, T] extends ArgReader[Input, T, Request]

Attributes

Companion:
object
Graph
Supertypes
trait ArgReader[Input, T, Request]
class Object
trait Matchable
class Any
object NoOpParser

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
trait RawDecorator extends Decorator[Raw, 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.

A RawDecorator is a decorator that operates on the raw request and response stream, before and after the primary Endpoint does it's job.

Attributes

Graph
Supertypes
trait Decorator[Raw, Raw, Any]
class Annotation
class Object
trait Matchable
class Any
sealed trait Result[+T]

Represents what comes out of an attempt to invoke an EntryPoint. Could succeed with a value, but could fail in many different ways.

Represents what comes out of an attempt to invoke an EntryPoint. Could succeed with a value, but could fail in many different ways.

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Result

Attributes

Companion:
trait
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Result.type
case class RoutesEndpointsMetadata[T](value: Seq[EndpointMetadata[T]])

Attributes

Companion:
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Attributes

Companion:
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
object Runtime

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Runtime.type
class doc(s: String) extends StaticAnnotation

Attributes

Graph
Supertypes
trait StaticAnnotation
class Annotation
class Object
trait Matchable
class Any