Packages

p

io.fintrospect

parameters

package parameters

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. All

Type Members

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

    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

    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]
  4. trait BodyParameter extends Parameter
  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

    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. trait Composite [T] extends Mandatory[Request, T] with HasParameters with Rebindable[Request, T, Binding]

    A composite allows for a single object to be extracted from many request parameters.

    A composite allows for a single object to be extracted from many request parameters. Validation is applied to all of the parts before being passed to a user implemented service. Extend this to provide custom extraction for composite objects.

  7. abstract class ExtractableFormFile [Bind, Out] extends Parameter with Bindable[Bind, FormFileBinding] with FormField[Bind]
  8. abstract class ExtractableParameter [Raw, Wrapper, Bndg <: Binding, Bind, Out] extends Parameter with Bindable[Bind, Bndg]
  9. case class ExtractedRouteRequest (request: Request, contents: Map[Any, Extraction[Any]]) extends RequestProxy with Product with Serializable
  10. 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

    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.

  11. trait FormElementBinding extends (Form) ⇒ Form
  12. trait FormField [T] extends BodyParameter
  13. class FormFieldBinding extends RequestBinding with FormElementBinding
  14. sealed trait FormFieldExtractor extends AnyRef
  15. class FormFileBinding extends RequestBinding with FormElementBinding
  16. sealed trait FormValidator extends AnyRef

    A strategy for validating the fields in a form

  17. trait HasParameters extends Iterable[Parameter]
  18. trait HeaderParameter [T] extends Parameter with Rebindable[Message, T, RequestBinding]
  19. case class InMemoryMultiPartFile (filename: String, content: Buf, contentType: Option[String] = None) extends MultiPartFile with Product with Serializable

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

  20. trait Mandatory [-From, T] extends Retrieval[From, T] with Extractor[From, T]
  21. trait MandatoryParameter [From, T, Bnd <: Binding] extends Mandatory[From, T] with Parameter with Rebindable[From, T, Bnd]
  22. abstract class MultiMandatoryFormFile extends ExtractableFormFile[Seq[MultiPartFile], Seq[MultiPartFile]]
  23. abstract class MultiMandatoryParameter [T, From, B <: Binding] extends ExtractableParameter[T, From, B, Seq[T], Seq[T]]
  24. abstract class MultiOptionalFormFile extends ExtractableFormFile[Seq[MultiPartFile], Option[Seq[MultiPartFile]]]
  25. abstract class MultiOptionalParameter [T, From, B <: Binding] extends ExtractableParameter[T, From, B, Seq[T], Option[Seq[T]]]
  26. trait MultiParameters [P[_], R[_]] extends AnyRef

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

  27. sealed trait MultiPartFile extends AnyRef
  28. case class MultiPartFormBody (formContents: Seq[FormField[_] with Extractor[Form, _]], validator: FormValidator, extractor: FormFieldExtractor) extends Body[Form] with Product with Serializable
  29. case class OnDiskMultiPartFile (filename: String, content: File, contentType: Option[String] = None) extends MultiPartFile with Product with Serializable

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

  30. trait Optional [-From, T] extends Retrieval[From, Option[T]] with Extractor[From, Option[T]]
  31. trait OptionalParameter [From, T, Bnd <: Binding] extends Optional[From, T] with Parameter with Rebindable[From, T, Bnd]
  32. sealed class ParamType extends AnyRef

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

  33. trait Parameter extends HasParameters

    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)

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

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

  35. case class ParameterSpec [T] extends Product with Serializable

    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

    returns

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

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

    Prototype functions for creating parameters of various types.

  37. trait PathBindable [T] extends Bindable[T, PathBinding]
  38. class PathBinding extends Binding
  39. abstract class PathParameter [T] extends Parameter with Iterable[PathParameter[_]]
  40. class QueryBinding extends Binding
  41. trait QueryParameter [T] extends Parameter with Rebindable[Request, T, QueryBinding]
  42. trait Rebindable [-From, T, +B <: Binding] extends Bindable[T, B]

    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.

  43. class RequestBinding extends Binding
  44. trait Retrieval [-From, T] extends AnyRef

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

  45. abstract class SingleMandatoryFormFile extends ExtractableFormFile[MultiPartFile, MultiPartFile]
  46. abstract class SingleMandatoryParameter [T, From, B <: Binding] extends ExtractableParameter[T, From, B, T, T]
  47. abstract class SingleOptionalFormFile extends ExtractableFormFile[MultiPartFile, Option[MultiPartFile]]
  48. abstract class SingleOptionalParameter [T, From, B <: Binding] extends ExtractableParameter[T, From, B, T, Option[T]]
  49. case class UniBody [T](inDescription: String, spec: BodySpec[T], theExample: Option[T]) extends Body[T] with Product with Serializable

    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

    spec

    the specification of this body type

    theExample

    an example object of this body

  50. case class UrlEncodedFormBody (formContents: Seq[FormField[_] with Extractor[Form, _]], validator: FormValidator, extractor: FormFieldExtractor) extends Body[Form] with Product with Serializable
  51. trait Value [T] extends Any
  52. class WebFormValidator extends FormValidator

    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
  2. object Body

    Factory methods for various supported HTTP body types.

  3. object BodySpec extends Serializable
  4. object BooleanParamType extends ParamType
  5. object FileParamType extends ParamType
  6. object Form extends Serializable
  7. object FormField
  8. object FormFile
  9. object Header

    Parameters which are bound to request/response headers

  10. object HeaderExtractAndRebind extends ParameterExtractAndBind[Message, String, RequestBinding]
  11. object IntegerParamType extends ParamType
  12. object MultiPartFile
  13. object NullParamType extends ParamType
  14. object NumberParamType extends ParamType
  15. object ObjectParamType extends ParamType
  16. object ParameterSpec extends Serializable

    Predefined ParameterSpec instances for common types.

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

  17. object Path extends Parameters[PathParameter, PathBindable]

    Parameters which are bound to the path segments of a URL

  18. object Query

    Parameters which are bound to the query part of a URL

  19. object QueryExtractAndRebind extends ParameterExtractAndBind[Request, String, QueryBinding]
  20. object StrictFormFieldExtractor extends FormFieldExtractor
  21. object StrictFormValidator extends FormValidator

    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.

  22. object StringParamType extends ParamType
  23. object StringValidations

    Reusable validation functions for parameter and body types

  24. object WebFormFieldExtractor extends FormFieldExtractor

Ungrouped