Package

org.http4s

rho

Permalink

package rho

Linear Supertypes
ResultSyntaxInstances, Http4s, Http4sSyntax, MessageSyntax, CaseInsensitiveStringSyntax, Http4sFunctions, UriFunctions, QValueFunctions, Http4sInstances, StatusInstances, MethodInstances, QValueInstances, CharsetRangeInstances, EntityEncoderInstances, EntityEncoderInstances0, HttpVersionInstances, EntityDecoderInstances, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. rho
  2. ResultSyntaxInstances
  3. Http4s
  4. Http4sSyntax
  5. MessageSyntax
  6. CaseInsensitiveStringSyntax
  7. Http4sFunctions
  8. UriFunctions
  9. QValueFunctions
  10. Http4sInstances
  11. StatusInstances
  12. MethodInstances
  13. QValueInstances
  14. CharsetRangeInstances
  15. EntityEncoderInstances
  16. EntityEncoderInstances0
  17. HttpVersionInstances
  18. EntityDecoderInstances
  19. AnyRef
  20. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Type Members

  1. case class Action[T <: HList](resultInfo: Set[ResultInfo], responseEncodings: Set[MediaType], act: (Request, T) ⇒ Task[Response]) extends Product with Serializable

    Permalink

    Encapsulation of metadata and a result generator

    Encapsulation of metadata and a result generator

    T

    The type of HList required to execute the Action.

    resultInfo

    Information about the status and type the Action will produce.

    responseEncodings

    Encodings that the response supports.

    act

    Function of Request and the HList to a Task[Response]

  2. case class CodecRouter[T <: HList, R](router: Router[T], decoder: EntityDecoder[R])(implicit t: scala.reflect.api.JavaUniverse.TypeTag[R]) extends HeaderAppendable[T] with RouteExecutable[::[R, T]] with RoutingEntity[::[R, T]] with Decodable[T, R] with Product with Serializable

    Permalink
  3. trait CompileService[RouteType] extends AnyRef

    Permalink

    This trait serves to transform a RhoRoute into an RouteType This can be a stateful operation, storing the action for later execution or any other type of compilation phase.

  4. trait Decodable[T <: HList, R] extends AnyRef

    Permalink

    Type that can accept a decoder.

    Type that can accept a decoder.

    A subtype of Decodable can accept an EntityDecoder for extracting a message from the Request body.

  5. final class PathBuilder[T <: HList] extends RouteExecutable[T] with Decodable[T, Nothing] with HeaderAppendable[T] with RoutePrependable[PathBuilder[T]] with UriConvertible

    Permalink

    Fully functional path building

  6. case class QueryBuilder[T <: HList](method: Method, path: PathRule, rules: RequestRule) extends RouteExecutable[T] with HeaderAppendable[T] with UriConvertible with RoutePrependable[QueryBuilder[T]] with Product with Serializable

    Permalink

    Typed builder of query rules

    Typed builder of query rules

    The QueryBuilder represents a builder for routes that already have a defined method and path. It can accumulate query rules and mount decoders.

    T

    The HList representation of the types the route expects to extract from a Request.

    method

    Request method to match.

    path

    Path rules to execute.

    rules

    Accumulated RequestRule's.

  7. final case class RequestLineBuilder[T <: HList](path: PathRule, rules: RequestRule) extends TypedBuilder[T] with RoutePrependable[RequestLineBuilder[T]] with UriConvertible with Product with Serializable

    Permalink

    DSL construct for building query rules without a known Method

    DSL construct for building query rules without a known Method

    The RequestLineBuilder doesn't know about header rules or the method.

    T

    The HList representation of the values to be extracted from the Request.

  8. sealed case class Result[+CONTINUE, +SWITCHINGPROTOCOLS, +PROCESSING, +OK, +CREATED, +ACCEPTED, +NONAUTHORITATIVEINFORMATION, +NOCONTENT, +RESETCONTENT, +PARTIALCONTENT, +MULTISTATUS, +ALREADYREPORTED, +IMUSED, +MULTIPLECHOICES, +MOVEDPERMANENTLY, +FOUND, +SEEOTHER, +NOTMODIFIED, +USEPROXY, +TEMPORARYREDIRECT, +PERMANENTREDIRECT, +BADREQUEST, +UNAUTHORIZED, +PAYMENTREQUIRED, +FORBIDDEN, +NOTFOUND, +METHODNOTALLOWED, +NOTACCEPTABLE, +PROXYAUTHENTICATIONREQUIRED, +REQUESTTIMEOUT, +CONFLICT, +GONE, +LENGTHREQUIRED, +PRECONDITIONFAILED, +PAYLOADTOOLARGE, +URITOOLONG, +UNSUPPORTEDMEDIATYPE, +RANGENOTSATISFIABLE, +EXPECTATIONFAILED, +UNPROCESSABLEENTITY, +LOCKED, +FAILEDDEPENDENCY, +UPGRADEREQUIRED, +PRECONDITIONREQUIRED, +TOOMANYREQUESTS, +REQUESTHEADERFIELDSTOOLARGE, +INTERNALSERVERERROR, +NOTIMPLEMENTED, +BADGATEWAY, +SERVICEUNAVAILABLE, +GATEWAYTIMEOUT, +HTTPVERSIONNOTSUPPORTED, +VARIANTALSONEGOTIATES, +INSUFFICIENTSTORAGE, +LOOPDETECTED, +NOTEXTENDED, +NETWORKAUTHENTICATIONREQUIRED](resp: Response) extends Product with Serializable

    Permalink

    A helper for capturing the result types and status codes from routes

  9. implicit class ResultSyntax[T >: TopResult <: BaseResult] extends ResponseOps

    Permalink
    Definition Classes
    ResultSyntaxInstances
  10. trait ResultSyntaxInstances extends AnyRef

    Permalink
  11. type RhoMiddleware = (Seq[RhoRoute[_ <: HList]]) ⇒ Seq[RhoRoute[_ <: HList]]

    Permalink
  12. final case class RhoRoute[T <: HList](router: RoutingEntity[T], action: Action[T]) extends RoutePrependable[RhoRoute[T]] with Product with Serializable

    Permalink

    A type to bundle everything needed to define a route

  13. class RhoService extends MethodAliases with ResponseGeneratorInstances with RoutePrependable[RhoService]

    Permalink

    Constructor class for defining routes

    Constructor class for defining routes

    The RhoService provides a convenient way to define routes in a style similar to scalatra etc by providing implicit conversions and an implicit CompileService inside the constructor.

    val srvc = new RhoService {
      POST / "foo" / pathVar[Int] +? param[String]("param") |>> { (p1: Int, param: String) =>
        Ok("success")
      }
    }
  14. trait RouteExecutable[T <: HList] extends TypedBuilder[T]

    Permalink

    Object which can be compiled into a complete route The RouteExecutable is a complete set of HTTP method, path, query, and headers needed for a compiler to generate a complete route description.

    Object which can be compiled into a complete route The RouteExecutable is a complete set of HTTP method, path, query, and headers needed for a compiler to generate a complete route description.

    T

    The HList representation of the types the route expects to extract from a Request.

  15. trait RoutePrependable[T <: RoutePrependable[T]] extends AnyRef

    Permalink

    Types that extends this trait can be prepended with noncapturing paths

  16. case class Router[T <: HList](method: Method, path: PathRule, rules: RequestRule) extends RouteExecutable[T] with HeaderAppendable[T] with RoutingEntity[T] with Decodable[T, Nothing] with RoutePrependable[Router[T]] with Product with Serializable

    Permalink

    Provides the operations for generating a router

    Provides the operations for generating a router

    T

    cumulative type of the required method for executing the router

    method

    request methods to match

    path

    path matching stack

    rules

    header validation stack

  17. sealed trait RoutingEntity[T <: HList] extends AnyRef

    Permalink
  18. implicit class TaskResultSyntax[T >: TopResult <: BaseResult] extends ResponseOps

    Permalink
    Definition Classes
    ResultSyntaxInstances
  19. trait TypedBuilder[T <: HList] extends UriConvertible

    Permalink

    A typed shell which represents the requirements of the route

    A typed shell which represents the requirements of the route

    T

    The HList representation of the values to be extracted from the Request.

  20. trait UriConvertible extends AnyRef

    Permalink

    Defines a type that is convertible into an Uri or UriTemplate

Value Members

  1. def *: CaptureTail.type

    Permalink
  2. implicit val CharacterSetOrder: Order[CharsetRange]

    Permalink
    Definition Classes
    CharsetRangeInstances
  3. implicit val CharsetShow: Show[Charset]

    Permalink
    Definition Classes
    CharsetRangeInstances
  4. object CompileService

    Permalink
  5. implicit val HttpVersionOrder: Order[HttpVersion]

    Permalink
    Definition Classes
    HttpVersionInstances
  6. implicit val HttpVersionShow: Show[HttpVersion]

    Permalink
    Definition Classes
    HttpVersionInstances
  7. implicit val MethodInstances: Show[Method] with Equal[Method]

    Permalink
    Definition Classes
    MethodInstances
  8. val PathEmpty: PathRule

    Permalink
  9. object Result extends Serializable

    Permalink
  10. object RhoRoute extends Serializable

    Permalink
  11. object RuleExecutor

    Permalink
  12. implicit val StatusOrder: Order[Status]

    Permalink
    Definition Classes
    StatusInstances
  13. implicit val StatusShow: Show[Status]

    Permalink
    Definition Classes
    StatusInstances
  14. implicit def ToCaseInsensitiveStringSyntax(cs: CharSequence): CaseInsensitiveStringOps

    Permalink
    Definition Classes
    CaseInsensitiveStringSyntax
  15. object UriConvertible

    Permalink
  16. def binFile(file: File): EntityDecoder[File]

    Permalink
    Definition Classes
    EntityDecoderInstances
  17. implicit val binary: EntityDecoder[ByteVector]

    Permalink
    Definition Classes
    EntityDecoderInstances
  18. package bits

    Permalink
  19. implicit val byteArrayEncoder: EntityEncoder[Array[Byte]]

    Permalink
    Definition Classes
    EntityEncoderInstances
  20. implicit val byteBufferEncoder: EntityEncoder[ByteBuffer]

    Permalink
    Definition Classes
    EntityEncoderInstances
  21. implicit val byteEncoder: EntityEncoder[Byte]

    Permalink
    Definition Classes
    EntityEncoderInstances
  22. implicit val byteVectorEncoder: EntityEncoder[ByteVector]

    Permalink
    Definition Classes
    EntityEncoderInstances
  23. def capture[H <: Extractable](key: H): TypedHeader[::[rho.capture.H.HeaderT, HNil]]

    Permalink

    requires the header and will pull this header from the pile and put it into the function args stack

  24. def captureMap[H <: Extractable, R](key: H)(f: (rho.captureMap.H.HeaderT) ⇒ R): TypedHeader[::[R, HNil]]

    Permalink

    Capture a specific header and map its value

    Capture a specific header and map its value

    key

    HeaderKey used to identify the header to capture

    f

    mapping function

  25. def captureMapR[H <: Extractable, R](key: H, default: Option[Task[BaseResult]] = None)(f: (rho.captureMapR.H.HeaderT) ⇒ \/[Task[BaseResult], R]): TypedHeader[::[R, HNil]]

    Permalink

    Capture a specific header and map its value with an optional default

    Capture a specific header and map its value with an optional default

    key

    HeaderKey used to identify the header to capture

    default

    optional default for the case of a missing header

    f

    mapping function

  26. implicit def charArrayEncoder(implicit charset: Charset): EntityEncoder[Array[Char]]

    Permalink
    Definition Classes
    EntityEncoderInstances
  27. implicit val charEncoder: EntityEncoder[Char]

    Permalink
    Definition Classes
    EntityEncoderInstances
  28. implicit def charSequenceEncoder[A <: CharSequence](implicit charset: Charset): EntityEncoder[CharSequence]

    Permalink
    Definition Classes
    EntityEncoderInstances
  29. def chunkedEncoder[A](f: (A) ⇒ Channel[Task, Int, ByteVector], chunkSize: Int): EntityEncoder[A]

    Permalink
    Definition Classes
    EntityEncoderInstances
  30. object dsl extends MethodAliases with ResponseGeneratorInstances

    Permalink
  31. implicit val entityEncoderContravariant: Contravariant[EntityEncoder]

    Permalink
    Definition Classes
    EntityEncoderInstances
  32. def error[T](t: Throwable): EntityDecoder[T]

    Permalink
    Definition Classes
    EntityDecoderInstances
  33. def exists(header: Extractable): TypedHeader[HNil]

    Permalink

    Requires that the header exists

    Requires that the header exists

    header

    HeaderKey that identifies the header which is required

  34. def existsAnd[H <: Extractable](header: H)(f: (rho.existsAnd.H.HeaderT) ⇒ Boolean): TypedHeader[HNil]

    Permalink

    Requires that the header exists and satisfies the condition

    Requires that the header exists and satisfies the condition

    header

    HeaderKey that identifies the header to capture and parse

    f

    predicate function where a return value of false signals an invalid header and aborts evaluation with a _BadRequest_ response.

  35. def existsAndR[H <: Extractable](header: H)(f: (rho.existsAndR.H.HeaderT) ⇒ Option[Task[BaseResult]]): TypedHeader[HNil]

    Permalink

    Check that the header exists and satisfies the condition

    Check that the header exists and satisfies the condition

    header

    HeaderKey that identifies the header to capture and parse

    f

    function that evaluates the header and returns a Some(Response) to immediately send back to the user or None to continue evaluation.

  36. implicit val fileEncoder: EntityEncoder[File]

    Permalink
    Definition Classes
    EntityEncoderInstances
  37. implicit val filePathEncoder: EntityEncoder[Path]

    Permalink
    Definition Classes
    EntityEncoderInstances
  38. implicit def futureEncoder[A](implicit W: EntityEncoder[A], ec: ExecutionContext): EntityEncoder[Future[A]]

    Permalink
    Definition Classes
    EntityEncoderInstances0
  39. def genericHeaderCapture[R](f: (Headers) ⇒ ResultResponse[R]): TypedHeader[::[R, HNil]]

    Permalink

    Create a header capture rule using the Request's Headers

    Create a header capture rule using the Request's Headers

    f

    function generating the result or failure

  40. def genericQueryCapture[R](f: (Query) ⇒ ResultResponse[R]): TypedQuery[::[R, HNil]]

    Permalink

    Create a query capture rule using the Request's Uri

    Create a query capture rule using the Request's Uri

    f

    function generating the result or failure

  41. def genericRequestHeaderCapture[R](f: (Request) ⇒ ResultResponse[R]): TypedHeader[::[R, HNil]]

    Permalink

    Create a header capture rule using the Request

    Create a header capture rule using the Request

    In general, this function should be avoided for most cases because it has access to the entire Request which allows it to modify the Request body which should be avoided.

    f

    function generating the result or failure

  42. def genericRequestQueryCapture[R](f: (Request) ⇒ ResultResponse[R]): TypedQuery[::[R, HNil]]

    Permalink

    Create a query capture rule using the Request

    Create a query capture rule using the Request

    In general, this function should be avoided for most cases because it has access to the entire Request which allows it to modify the Request body which should be avoided.

    f

    function generating the result or failure

  43. implicit def inputStreamEncoder[A <: InputStream]: EntityEncoder[A]

    Permalink
    Definition Classes
    EntityEncoderInstances
  44. implicit def method(m: Method): PathBuilder[HNil]

    Permalink
  45. implicit def multipart: EntityDecoder[Multipart]

    Permalink
    Definition Classes
    EntityDecoderInstances
  46. implicit val multipartEncoder: EntityEncoder[Multipart]

    Permalink
    Definition Classes
    EntityEncoderInstances
  47. implicit def naturalTransformationEncoder[F[_], A](implicit N: ~>[F, Task], W: EntityEncoder[A]): EntityEncoder[F[A]]

    Permalink
    Definition Classes
    EntityEncoderInstances0
  48. def param[T](name: String, default: T, validate: (T) ⇒ Boolean)(implicit parser: QueryParser[T], m: scala.reflect.api.JavaUniverse.TypeTag[T]): TypedQuery[::[T, HNil]]

    Permalink

    Define a query parameter that will be validated with the predicate

    Define a query parameter that will be validated with the predicate

    Failure of the predicate results in a '403: BadRequest' response.

  49. def param[T](name: String, validate: (T) ⇒ Boolean)(implicit parser: QueryParser[T], m: scala.reflect.api.JavaUniverse.TypeTag[T]): TypedQuery[::[T, HNil]]

    Permalink

    Define a query parameter that will be validated with the predicate

    Define a query parameter that will be validated with the predicate

    Failure of the predicate results in a '403: BadRequest' response.

  50. def param[T](name: String, default: T)(implicit parser: QueryParser[T], m: scala.reflect.api.JavaUniverse.TypeTag[T]): TypedQuery[::[T, HNil]]

    Permalink

    Define a query parameter with a default value

  51. def param[T](name: String)(implicit parser: QueryParser[T], m: scala.reflect.api.JavaUniverse.TypeTag[T]): TypedQuery[::[T, HNil]]

    Permalink

    Defines a parameter in query string that should be bound to a route definition.

    Defines a parameter in query string that should be bound to a route definition.

    name

    name of the parameter in query

  52. def paramR[T](name: String, default: T, validate: (T) ⇒ Option[Task[BaseResult]])(implicit parser: QueryParser[T], m: scala.reflect.api.JavaUniverse.TypeTag[T]): TypedQuery[::[T, HNil]]

    Permalink

    Defines a parameter in query string that should be bound to a route definition.

  53. def paramR[T](name: String, validate: (T) ⇒ Option[Task[BaseResult]])(implicit parser: QueryParser[T], m: scala.reflect.api.JavaUniverse.TypeTag[T]): TypedQuery[::[T, HNil]]

    Permalink

    Defines a parameter in query string that should be bound to a route definition.

  54. implicit def pathMatch(s: Symbol): TypedPath[::[String, HNil]]

    Permalink
  55. implicit def pathMatch(s: String): TypedPath[HNil]

    Permalink
  56. def pathVar[T](id: String)(implicit parser: StringParser[T], m: scala.reflect.api.JavaUniverse.TypeTag[T]): TypedPath[::[T, HNil]]

    Permalink

    Defines a path variable of a URI that should be bound to a route definition

  57. def pathVar[T](implicit parser: StringParser[T], m: scala.reflect.api.JavaUniverse.TypeTag[T]): TypedPath[::[T, HNil]]

    Permalink

    Defines a path variable of a URI that should be bound to a route definition

  58. implicit def process0Encoder[A](implicit W: EntityEncoder[A]): EntityEncoder[Process0[A]]

    Permalink
    Definition Classes
    EntityEncoderInstances0
  59. macro def q(d: Double): QValue

    Permalink
    Definition Classes
    QValueFunctions
  60. implicit val qValueOrder: Order[QValue]

    Permalink
    Definition Classes
    QValueInstances
  61. implicit val qValueShow: Show[QValue]

    Permalink
    Definition Classes
    QValueInstances
  62. implicit def readerEncoder[A <: Reader](implicit charset: Charset): EntityEncoder[A]

    Permalink
    Definition Classes
    EntityEncoderInstances
  63. implicit def requestSyntax(req: Task[Request]): TaskRequestOps

    Permalink
    Definition Classes
    MessageSyntax
  64. def resolve(base: Uri, reference: Uri): Uri

    Permalink
    Definition Classes
    UriFunctions
  65. implicit def responseSyntax(resp: Task[Response]): TaskResponseOps

    Permalink
    Definition Classes
    MessageSyntax
  66. def root(): TypedPath[HNil]

    Permalink

    Helper to be able to define a path with one level only.

    Helper to be able to define a path with one level only.

    val hello = Root / "hello"
  67. def showEncoder[A](implicit charset: Charset, show: Show[A]): EntityEncoder[A]

    Permalink
    Definition Classes
    EntityEncoderInstances0
  68. implicit def sourceEncoder[A](implicit W: EntityEncoder[A]): EntityEncoder[Process[Task, A]]

    Permalink
    Definition Classes
    EntityEncoderInstances0
  69. implicit def stringEncoder(implicit charset: Charset): EntityEncoder[String]

    Permalink
    Definition Classes
    EntityEncoderInstances
  70. implicit def taskEncoder[A](implicit W: EntityEncoder[A]): EntityEncoder[Task[A]]

    Permalink
    Definition Classes
    EntityEncoderInstances
  71. implicit def text(implicit defaultCharset: Charset): EntityDecoder[String]

    Permalink
    Definition Classes
    EntityDecoderInstances
  72. def textFile(file: File): EntityDecoder[File]

    Permalink
    Definition Classes
    EntityDecoderInstances
  73. macro def uri(s: String): Uri

    Permalink
    Definition Classes
    UriFunctions

Inherited from ResultSyntaxInstances

Inherited from Http4s

Inherited from Http4sSyntax

Inherited from MessageSyntax

Inherited from CaseInsensitiveStringSyntax

Inherited from Http4sFunctions

Inherited from UriFunctions

Inherited from QValueFunctions

Inherited from Http4sInstances

Inherited from StatusInstances

Inherited from MethodInstances

Inherited from QValueInstances

Inherited from CharsetRangeInstances

Inherited from EntityEncoderInstances

Inherited from EntityEncoderInstances0

Inherited from HttpVersionInstances

Inherited from EntityDecoderInstances

Inherited from AnyRef

Inherited from Any

Ungrouped