Package

io.fintrospect

parameters

Permalink

package parameters

Visibility
  1. Public
  2. All

Type Members

  1. trait Bindable[-T, +B <: Binding] extends AnyRef

    Permalink

    Allows binding of a value to an entity (eg.

    Allows binding of a value to an entity (eg. query/header/field...)

  2. sealed trait Binding extends AnyRef

    Permalink

    Represents the binding of a parameter to it's value in a particular context

  3. abstract class Body[T] extends Iterable[BodyParameter] with Mandatory[Message, T] with Rebindable[Message, T, RequestBinding]

    Permalink
  4. trait BodyParameter extends Parameter

    Permalink
  5. case class BodySpec[T](description: Option[String], contentType: ContentType, deserialize: (Buf) ⇒ T, serialize: (T) ⇒ Buf = (s: T) => Buf.Utf8(s.toString)) extends Product with Serializable

    Permalink

    Spec required to marshall a body of a custom type

    Spec required to marshall a body of a custom type

    T

    the type of the parameter

    description

    Description to be used in the documentation

    contentType

    The HTTP content type header value

    deserialize

    function to take the input string from the request and attempt to construct a deserialized instance. Exceptions are automatically caught and translated into the appropriate result, so just concentrate on the Happy-path case

    serialize

    function to take the input type and serialize it to a string to be represented in the request

  6. case class Form(fields: Map[String, Set[String]], errors: Seq[ExtractionError] = Nil) extends Iterable[(String, Set[String])] with Product with Serializable

    Permalink

    The body entity of a encoded HTML form.

    The body entity of a encoded HTML form. Basically a wrapper for Form construction and field extraction.

  7. class FormBody extends Body[Form]

    Permalink
  8. trait FormCodec[T] extends AnyRef

    Permalink

    Represents different strategies for decoding and encoding HTML forms.

  9. trait FormField[T] extends BodyParameter

    Permalink
  10. class FormFieldBinding extends RequestBinding

    Permalink
  11. trait HeaderParameter[T] extends Parameter with Rebindable[Message, T, RequestBinding]

    Permalink
  12. trait Mandatory[-From, T] extends Retrieval[From, T] with Extractor[From, T]

    Permalink
  13. trait MandatoryParameter[From, T, Bnd <: Binding] extends Mandatory[From, T] with ExtractableParameter[From, T] with Rebindable[From, T, Bnd]

    Permalink
  14. abstract class MultiFormField[T] extends MultiParameter[T, Form, FormFieldBinding] with FormField[Seq[T]]

    Permalink
  15. abstract class MultiHeaderParameter[T] extends MultiParameter[T, Message, RequestBinding] with HeaderParameter[Seq[T]]

    Permalink
  16. abstract class MultiParameter[T, From, B <: Binding] extends Parameter with Bindable[Seq[T], B]

    Permalink
  17. trait MultiParameters[P[_], R[_]] extends AnyRef

    Permalink

    Support for parameters which can have more than one value (e.g query parameters or forms)

  18. abstract class MultiQueryParameter[T] extends MultiParameter[T, Request, QueryBinding] with QueryParameter[Seq[T]]

    Permalink
  19. trait Optional[-From, T] extends Retrieval[From, Option[T]] with Extractor[From, T]

    Permalink
  20. trait OptionalParameter[From, T, Bnd <: Binding] extends Optional[From, T] with ExtractableParameter[From, T] with Rebindable[From, T, Bnd]

    Permalink
  21. sealed class ParamType extends AnyRef

    Permalink

    How a parameter is represented in the HTTP message (JSON type)

  22. trait Parameter extends AnyRef

    Permalink

    A parameter is a name-value pair which can be encoded into an HTTP message.

    A parameter is a name-value pair which can be encoded into an HTTP message. Sub-types represent the various places in which values are encoded (eg. header/form/query/path)

  23. trait ParameterExtractAndBind[From, B <: Binding] extends AnyRef

    Permalink

    Parameter location specific utility functions to assist with extraction and binding of values

  24. case class ParameterSpec[T](name: String, description: Option[String] = None, paramType: ParamType, deserialize: (String) ⇒ T, serialize: (T) ⇒ String = (s: T) => s.toString) extends Product with Serializable

    Permalink

    Spec required to marshall and demarshall a parameter of a custom type

    Spec required to marshall and demarshall a parameter of a custom type

    T

    the type of the parameter

    description

    optional description of the parameter (for use in description endpoints)

    paramType

    The parameter type to be used in the documentation. For custom types, this is usually ObjectParamType (for JSON) or StringParamType

    deserialize

    function to take the input string from the request and attempt to construct a deserialized instance of T. Exceptions are automatically caught and translated into the appropriate result, so just concentrate on the Happy-path case

    serialize

    function to take the input type and serialize it to a string to be represented in the request

    returns

    a parameter for retrieving a value of type [T] from the request

  25. trait ParameterSpecSupplier[T] extends AnyRef

    Permalink

    By implementing ParameterSpecSupplier[T], we can declare parameters using a shorthand: eg.

    By implementing ParameterSpecSupplier[T], we can declare parameters using a shorthand: eg. Path(HipsterBeardStyle)

  26. trait Parameters[P[_], R[_]] extends AnyRef

    Permalink

    Prototype functions for creating parameters of various types.

  27. trait PathBindable[T] extends Bindable[T, PathBinding]

    Permalink
  28. class PathBinding extends Binding

    Permalink
  29. abstract class PathParameter[T] extends Parameter with Iterable[PathParameter[_]]

    Permalink
  30. class QueryBinding extends Binding

    Permalink
  31. trait QueryParameter[T] extends Parameter with Rebindable[Request, T, QueryBinding]

    Permalink
  32. trait Rebindable[-From, T, +B <: Binding] extends Bindable[T, B]

    Permalink

    Used to transparently copy the value out of an incoming request (or form etc..) and into an outgoing one.

    Used to transparently copy the value out of an incoming request (or form etc..) and into an outgoing one. Useful when chaining requests together.

  33. class RequestBinding extends Binding

    Permalink
  34. trait Retrieval[-From, T] extends AnyRef

    Permalink

    Represents the ability to retrieve a value from an enclosing object (request/form etc..)

  35. abstract class SingleParameter[T, From, B <: Binding] extends Parameter with Bindable[T, B]

    Permalink
  36. class StrictFormCodec extends FormCodec[Form]

    Permalink

    Strict Forms fail when failing even a single field fails.

    Strict Forms fail when failing even a single field fails. This form is used for non-web forms (where the posted form is merely an url-encoded set of form parameters) and will auto-reject requests with a BadRequest.

  37. sealed trait StringValidation extends (String) ⇒ String

    Permalink
  38. class UniBody[T] extends Body[T]

    Permalink

    Represents a single entity which makes up the entirety of an HTTP message body.

    Represents a single entity which makes up the entirety of an HTTP message body.

    T

    the type of the request when it has been deserialized from the request

  39. class WebFormCodec extends FormCodec[Form]

    Permalink

    Web-forms are a less harsh version of forms, which report both a collection of received fields and a set of invalid fields.

    Web-forms are a less harsh version of forms, which report both a collection of received fields and a set of invalid fields. This form-type is to be used for web forms (where feedback is desirable and the user can be redirected back to the form page). As such, extracting an invalid webform from a request will not fail unless the body encoding itself is invalid.

Value Members

  1. object ArrayParamType extends ParamType

    Permalink
  2. object Body

    Permalink

    Factory methods for various supported HTTP body types.

  3. object BodySpec extends Serializable

    Permalink
  4. object BooleanParamType extends ParamType

    Permalink
  5. object Form extends Serializable

    Permalink
  6. object FormField

    Permalink
  7. object Header

    Permalink

    Parameters which are bound to request/response headers

  8. object HeaderExtractAndRebind extends ParameterExtractAndBind[Message, RequestBinding]

    Permalink
  9. object IntegerParamType extends ParamType

    Permalink
  10. object NullParamType extends ParamType

    Permalink
  11. object NumberParamType extends ParamType

    Permalink
  12. object ObjectParamType extends ParamType

    Permalink
  13. object ParameterSpec extends Serializable

    Permalink

    Predefined ParameterSpec instances for common types

  14. object Path extends Parameters[PathParameter, PathBindable]

    Permalink

    Parameters which are bound to the path segments of a URL

  15. object Query

    Permalink

    Parameters which are bound to the query part of a URL

  16. object QueryExtractAndRebind extends ParameterExtractAndBind[Request, QueryBinding]

    Permalink
  17. object StringParamType extends ParamType

    Permalink
  18. object StringValidation

    Permalink

Ungrouped