Packages

  • package root
    Definition Classes
    root
  • package org
    Definition Classes
    root
  • package coursera
    Definition Classes
    org
  • package naptime
    Definition Classes
    coursera
  • package access
    Definition Classes
    naptime
  • package actions
    Definition Classes
    naptime
  • package ari

    This ari defines the key abstractions for automatic resource inclusion as well as GraphQL.

    This ari defines the key abstractions for automatic resource inclusion as well as GraphQL.

    The system is split up into 3 distinct layers:

    +---------------------------------------------------------------------+
    |                       Presentation Layer                            |
    |           GraphQL            |            Naptime HTTP              |
    +------------------------------+--------------------------------------+
    |                                                                     |
    |                      Inclusion Engine                               |
    |                                                                     |
    +---------------------------------------------------------------------+
    |                        Data fetching                                |
    |         Local execution      |           remote execution           |
    +=====================================================================+
    |                                                                     |
    |                   Unmodified Naptime APIs                           |
    |                                                                     |
    +---------------------------------------------------------------------+

    A request enters the system via the presentation layer (typically parsed from the network). The presentation layer constructs a org.coursera.naptime.ari.Request and passes that to engine. The engine performs a number of validations against the schema, and then makes a number of requests to to the Data Fetching layer to assemble all of the (available) data required to construct a response. This is passed back to the presentation layer, which constructs a response to be sent out on the wire.

    The API between the presentation layer and the inclusion engine is the org.coursera.naptime.ari.EngineApi

    The API between the inclusion engine and the data fetching layer is defined by org.coursera.naptime.ari.FetcherApi.

    BEWARE: This code is currently in a high state of flux. Do not depend upon it unless you are prepared for breakages!

    Definition Classes
    naptime
  • package exceptions
    Definition Classes
    naptime
  • package path
    Definition Classes
    naptime
  • package resources
    Definition Classes
    naptime
  • package router2
    Definition Classes
    naptime
  • AttributesProvider
  • CollectionResourceRouter
  • CourierQueryParsers
  • MacroImpls
  • NaptimePlayRouter
  • NestingCollectionResourceRouter
  • ResourceRouter
  • ResourceRouterBuilder
  • RouteAction
  • Router
  • package schema
    Definition Classes
    naptime

package router2

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. router2
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. class MacroImpls extends AnyRef

    A macro bundle that builds ResourceRouterBuilders specialized to particular types.

  2. case class NaptimePlayRouter(naptimeRoutes: NaptimeRoutes, prefix: String) extends play.api.routing.Router with StrictLogging with Product with Serializable

    Handles routing for Naptime resources in an idiomatic fashion for Play projects.

    Handles routing for Naptime resources in an idiomatic fashion for Play projects.

    To use this router, include in your routes file something like:

    # Include Naptime resources
    ->    /api                  org.coursera.naptime.router2.PlayNaptimeRouter

    Requests matching the prefix for naptime resources will then be routed appropriately.

    naptimeRoutes

    Collects the common data structures useful for request routing, including the router builders, as well as the routers themselves.

    prefix

    The prefix path under which the resources should be served (in the example above: /api).

    Annotations
    @Singleton()
  3. class NestingCollectionResourceRouter[CollectionResourceType <: CollectionResource[_, _, _]] extends ResourceRouter with StrictLogging
  4. trait ResourceRouter extends AnyRef

    The core interface for the router.

    The core interface for the router. Implement this interface in order to be able to route your requests.

    Note: typically, a macro implements these functions for individual resources by subclassing one of the types below.

  5. trait ResourceRouterBuilder extends AnyRef

    Use me to build a router that can be used to route requests.

  6. trait RouteAction extends EssentialAction with Handler
  7. class Router extends AnyRef

    The macro-based router for Naptime.

    The macro-based router for Naptime. This should be instantiated in the Play! application's Global and hooked into the Global's onRouteRequest method.

Value Members

  1. object AttributesProvider extends StrictLogging
  2. object CollectionResourceRouter
  3. object CourierQueryParsers extends StrictLogging
  4. object NestingCollectionResourceRouter
  5. object Router

Inherited from AnyRef

Inherited from Any

Ungrouped