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. trait 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](contentType: ContentType, paramType: ParamType, 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 deserialised body

    contentType

    The HTTP content type header value

    paramType

    How the body is represented when documenting APIs.

    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 ExtractedRouteRequest(request: Request, contents: Map[Any, Extraction[Any]]) extends RequestProxy with Product with Serializable

    Permalink
  7. case class Form(fields: Map[String, Seq[String]] = Map.empty, files: Map[String, Seq[MultiPartFile]] = Map.empty, errors: Seq[ExtractionError] = Nil) extends 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.

  8. trait FormElementBinding extends (Form) ⇒ Form

    Permalink
  9. trait FormField[T] extends BodyParameter

    Permalink
  10. class FormFieldBinding extends RequestBinding with FormElementBinding

    Permalink
  11. sealed trait FormFieldExtractor extends AnyRef

    Permalink
  12. class FormFileBinding extends RequestBinding with FormElementBinding

    Permalink
  13. sealed trait FormValidator extends AnyRef

    Permalink

    A strategy for validating the fields in a form

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

    Permalink
  15. case class InMemoryMultiPartFile(filename: String, content: Buf, contentType: Option[String] = None) extends MultiPartFile with Product with Serializable

    Permalink

    This is a multipart form file element that is under the max memory limit, and thus has been kept

  16. trait LengthValidations[T <: AnyRef { def isEmpty(): Boolean }] extends AnyRef

    Permalink

    Reusable validation functions for parameter and body types

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

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

    Permalink
  19. abstract class MultiFile extends Parameter with Bindable[Seq[MultiPartFile], FormFileBinding] with FormField[Seq[MultiPartFile]]

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

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

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

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

    Permalink

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

  24. sealed trait MultiPartFile extends AnyRef

    Permalink
  25. class MultiPartFormBody extends Body[Form]

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

    Permalink
  27. case class OnDiskMultiPartFile(filename: String, content: File, contentType: Option[String] = None) extends MultiPartFile with Product with Serializable

    Permalink

    This is a multipart form file element that is over the max memory limit, and thus has been stored on disk temporarily

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

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

    Permalink
  30. sealed class ParamType extends AnyRef

    Permalink

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

  31. 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)

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

    Permalink

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

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

    Permalink

    Spec required to marshal and unmarshal a parameter of a custom type

    Spec required to marshal and unmarshal a parameter of a custom type

    T

    the type of the deserialised parameter

    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

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

    Permalink

    Prototype functions for creating parameters of various types.

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

    Permalink
  36. class PathBinding extends Binding

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

    Permalink
  38. class QueryBinding extends Binding

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

    Permalink
  40. 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.

  41. class RequestBinding extends Binding

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

    Permalink

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

  43. abstract class SingleFile extends Parameter with Bindable[MultiPartFile, FormFileBinding] with FormField[MultiPartFile]

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

    Permalink
  45. 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

  46. class UrlEncodedFormBody extends Body[Form]

    Permalink
  47. trait Value[T] extends Any

    Permalink
  48. class WebFormValidator extends FormValidator

    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 FileParamType extends ParamType

    Permalink
  6. object Form extends Serializable

    Permalink
  7. object FormField

    Permalink
  8. object Header

    Permalink

    Parameters which are bound to request/response headers

  9. object HeaderExtractAndRebind extends ParameterExtractAndBind[Message, String, RequestBinding]

    Permalink
  10. object IntegerParamType extends ParamType

    Permalink
  11. object MultiPartFile

    Permalink
  12. object NullParamType extends ParamType

    Permalink
  13. object NumberParamType extends ParamType

    Permalink
  14. object ObjectParamType extends ParamType

    Permalink
  15. object ParameterSpec extends Serializable

    Permalink

    Predefined ParameterSpec instances for common types.

    Predefined ParameterSpec instances for common types. These are mappable to custom types, so start with these.

  16. object Path extends Parameters[PathParameter, PathBindable]

    Permalink

    Parameters which are bound to the path segments of a URL

  17. object Query

    Permalink

    Parameters which are bound to the query part of a URL

  18. object QueryExtractAndRebind extends ParameterExtractAndBind[Request, String, QueryBinding]

    Permalink
  19. object StrictFormFieldExtractor extends FormFieldExtractor

    Permalink
  20. object StrictFormValidator extends FormValidator

    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.

  21. object StringParamType extends ParamType

    Permalink
  22. object StringValidations extends LengthValidations[String]

    Permalink
  23. object WebFormFieldExtractor extends FormFieldExtractor

    Permalink

Ungrouped