Package

io.finch

route

Permalink

package route

This package contains various of functions and types that enable _router combinators_ in Finch. Finch's route.Router is an abstraction that is responsible for routing the HTTP requests using their method and path information.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. route
  2. RouterCombinators
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Type Members

  1. case class Extractor[A](name: String, f: (String) ⇒ A) extends Router[A] with Product with Serializable

    Permalink

    An universal extractor that extracts some value of type A if it's possible to fetch the value from the string.

  2. trait LowPriorityMapperConversions extends AnyRef

    Permalink
  3. trait LowPriorityPairAdjoin extends AnyRef

    Permalink
  4. trait LowPriorityToServiceInstances extends AnyRef

    Permalink
  5. trait Mapper[A] extends AnyRef

    Permalink

    A type class that allows the Router to be mapped to either A => B or A => Future[B].

  6. trait MidPriorityMapperConversions extends LowPriorityMapperConversions

    Permalink
  7. trait PairAdjoin[A, B] extends DepFn2[A, B]

    Permalink

    We need a version of shapeless.ops.adjoin.Adjoin that provides slightly different behavior in the case of singleton results (we simply return the value, not a singleton HList).

  8. case class RouteNotFound(r: String) extends Exception with Product with Serializable

    Permalink

    An exception, which is thrown by router in case of missing route r.

  9. trait Router[A] extends AnyRef

    Permalink

    A router that extracts some value of the type A from the given route.

  10. type Router0 = Router[HNil]

    Permalink
  11. type Router2[A, B] = Router[::[A, ::[B, HNil]]]

    Permalink
  12. type Router3[A, B, C] = Router[::[A, ::[B, ::[C, HNil]]]]

    Permalink
  13. trait RouterCombinators extends AnyRef

    Permalink

    A collection of Router combinators.

  14. case class TailExtractor[A](name: String, f: (String) ⇒ A) extends Router[Seq[A]] with Product with Serializable

    Permalink

    An extractor that extracts a value of type Seq[A] from the tail of the route.

  15. trait ToService[R, A] extends AnyRef

    Permalink

    Represents a conversion from a router returning a result type A to a Finagle service from a request-like type R to a com.twitter.finagle.httpx.Response.

    Represents a conversion from a router returning a result type A to a Finagle service from a request-like type R to a com.twitter.finagle.httpx.Response.

    Annotations
    @implicitNotFound( ... )
  16. type Endpoint[A, B] = Router[Service[A, B]]

    Permalink

    An alias for Router that maps route to a Service.

    An alias for Router that maps route to a Service.

    Annotations
    @deprecated
    Deprecated

    (Since version 0.8.0) Endpoint is deprecated in favor of coproduct routers

Value Members

  1. object * extends Router[HNil]

    Permalink

    A Router that skips all path parts.

  2. object / extends Router[HNil]

    Permalink

    An identity Router.

  3. object Connect extends MethodMatcher

    Permalink
  4. object Delete extends MethodMatcher

    Permalink
  5. object Get extends MethodMatcher

    Permalink
  6. object Head extends MethodMatcher

    Permalink
  7. object Mapper extends MidPriorityMapperConversions

    Permalink
  8. object Options extends MethodMatcher

    Permalink
  9. object PairAdjoin extends LowPriorityPairAdjoin

    Permalink
  10. object Patch extends MethodMatcher

    Permalink
  11. object Post extends MethodMatcher

    Permalink
  12. object Put extends MethodMatcher

    Permalink
  13. object Router

    Permalink

    Provides extension methods for Router to support coproduct and path syntax.

  14. object ToService extends LowPriorityToServiceInstances

    Permalink
  15. object Trace extends MethodMatcher

    Permalink
  16. def basicAuth[A](user: String, password: String)(r: Router[A]): Router[A]

    Permalink

    A combinator that wraps the given Router with Basic HTTP Auth, configured with credentials user and password.

    A combinator that wraps the given Router with Basic HTTP Auth, configured with credentials user and password.

    Definition Classes
    RouterCombinators
  17. object boolean extends Extractor[Boolean]

    Permalink

    A Router that extract a boolean value from the route.

  18. implicit def booleanToMatcher(b: Boolean): Router0

    Permalink
  19. object booleans extends TailExtractor[Boolean]

    Permalink

    A Router that extract a boolean tail from the route.

  20. def connect[A]: (Router[A]) ⇒ Router[A]

    Permalink

    A combinator that wraps the given Router with additional check of the HTTP method.

    A combinator that wraps the given Router with additional check of the HTTP method. The resulting Router succeeds on the request only if its method is CONNECT and the underlying router succeeds on it.

    Definition Classes
    RouterCombinators
  21. def delete[A]: (Router[A]) ⇒ Router[A]

    Permalink

    A combinator that wraps the given Router with additional check of the HTTP method.

    A combinator that wraps the given Router with additional check of the HTTP method. The resulting Router succeeds on the request only if its method is DELETE and the underlying router succeeds on it.

    Definition Classes
    RouterCombinators
  22. def get[A]: (Router[A]) ⇒ Router[A]

    Permalink

    A combinator that wraps the given Router with additional check of the HTTP method.

    A combinator that wraps the given Router with additional check of the HTTP method. The resulting Router succeeds on the request only if its method is GET and the underlying router succeeds on it.

    Definition Classes
    RouterCombinators
  23. def head[A]: (Router[A]) ⇒ Router[A]

    Permalink

    A combinator that wraps the given Router with additional check of the HTTP method.

    A combinator that wraps the given Router with additional check of the HTTP method. The resulting Router succeeds on the request only if its method is HEAD and the underlying router succeeds on it.

    Definition Classes
    RouterCombinators
  24. object int extends Extractor[Int]

    Permalink

    A Router that extract an integer value from the route.

  25. implicit def intToMatcher(i: Int): Router0

    Permalink
  26. object ints extends TailExtractor[Int]

    Permalink

    A Router that extract an integer tail from the route.

  27. object long extends Extractor[Long]

    Permalink

    A Router that extract a long value from the route.

  28. object longs extends TailExtractor[Long]

    Permalink

    A Router that extract a long tail from the route.

  29. def options[A]: (Router[A]) ⇒ Router[A]

    Permalink

    A combinator that wraps the given Router with additional check of the HTTP method.

    A combinator that wraps the given Router with additional check of the HTTP method. The resulting Router succeeds on the request only if its method is OPTIONS and the underlying router succeeds on it.

    Definition Classes
    RouterCombinators
  30. def patch[A]: (Router[A]) ⇒ Router[A]

    Permalink

    A combinator that wraps the given Router with additional check of the HTTP method.

    A combinator that wraps the given Router with additional check of the HTTP method. The resulting Router succeeds on the request only if its method is PATCH and the underlying router succeeds on it.

    Definition Classes
    RouterCombinators
  31. def post[A]: (Router[A]) ⇒ Router[A]

    Permalink

    A combinator that wraps the given Router with additional check of the HTTP method.

    A combinator that wraps the given Router with additional check of the HTTP method. The resulting Router succeeds on the request only if its method is POST and the underlying router succeeds on it.

    Definition Classes
    RouterCombinators
  32. def put[A]: (Router[A]) ⇒ Router[A]

    Permalink

    A combinator that wraps the given Router with additional check of the HTTP method.

    A combinator that wraps the given Router with additional check of the HTTP method. The resulting Router succeeds on the request only if its method is PUT and the underlying router succeeds on it.

    Definition Classes
    RouterCombinators
  33. object string extends Extractor[String]

    Permalink

    A Router that extract a string value from the route.

  34. implicit def stringToMatcher(s: String): Router0

    Permalink
  35. object strings extends TailExtractor[String]

    Permalink

    A Router that extract a string tail from the route.

  36. def trace[A]: (Router[A]) ⇒ Router[A]

    Permalink

    A combinator that wraps the given Router with additional check of the HTTP method.

    A combinator that wraps the given Router with additional check of the HTTP method. The resulting Router succeeds on the request only if its method is TRACE and the underlying router succeeds on it.

    Definition Classes
    RouterCombinators

Inherited from RouterCombinators

Inherited from AnyRef

Inherited from Any

Ungrouped