io

finch

package finch

* Hi! I'm Finch.io - a super-tiny library atop of Finagle that makes the development of RESTFul API services more pleasant and slick.

I'm trying to follow the principles of my elder brother and keep the things as composable as possible.

(a) In order to mark the difference between filters and facets and show the direction of a data-flow, the facets are composed by ! operator within a reversed order:

val s = service ! facetA ! facetB

Note: facets don't change the request type.

(b) Endpoints might be treated as partial functions over the routes, so they may be composed together with orElse operator:

val r = endpointA orElse endpointB

(d) Endpoints may also be composed with filters by using the ! operator in a familiar way:

val r = authorize ! endpoint

Note: authorize changes the request type.

(e) Finagle filters may also be composed with ! operator:

val f = filterA ! filterB ! filterC

Have fun writing a reusable and scalable code with me!

- https://github.com/finagle/finch - http://vkostyukov.ru

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. finch
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. implicit final class AnyOps[A] extends AnyVal

    Alters any object within a toFuture method.

    Alters any object within a toFuture method.

    A

    an object type

  2. trait Endpoint[Req <: HttpRequest, Rep] extends AnyRef

    A REST API endpoint that primary defines a route and might be converted into a finagled service with toService method.

    A REST API endpoint that primary defines a route and might be converted into a finagled service with toService method.

    Rep

    a response type

  3. implicit final class FilterOps[ReqIn <: HttpRequest, ReqOut <: HttpRequest, RepIn, RepOut] extends AnyVal

    Alters underlying filter within afterThat methods composing a filter with a given endpoint or withing a next filter.

  4. type HttpRequest = Request

  5. type HttpResponse = Response

  6. implicit class ServiceOps[Req <: HttpRequest, RepIn] extends AnyRef

    Alters underlying service within afterThat method composing a service with a given filter.

    Alters underlying service within afterThat method composing a service with a given filter.

    RepIn

    a input response type

  7. implicit final class ThrowableOps extends AnyVal

    Alters any throwable with a toFutureException method.

Value Members

  1. object Endpoint

    A companion object for Endpoint

  2. package auth

  3. implicit def futureToService[Req, Rep](future: Future[Rep]): Service[Req, Rep]

    Allow for the creation of Endpoints without an explict service

    Allow for the creation of Endpoints without an explict service

    Endpoint {
      Get -> Root / "hello" => Ok("world").toFuture
    }
    future

    The future to implicitly convert.

    returns

    The service generated by ignoring the Req and returning the Future[Rep]

  4. package json

  5. package request

  6. package response

Inherited from AnyRef

Inherited from Any

Ungrouped