Trait

endpoints.play.routing

Assets

Related Doc: package routing

Permalink

trait Assets extends algebra.Assets with Endpoints

Interpreter for algebra.Assets that performs routing using Play framework

Source
Assets.scala
Linear Supertypes
Endpoints, Methods, Urls, algebra.Assets, algebra.Endpoints, algebra.Methods, algebra.Urls, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Assets
  2. Endpoints
  3. Methods
  4. Urls
  5. Assets
  6. Endpoints
  7. Methods
  8. Urls
  9. AnyRef
  10. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. implicit final class ApplicativeMapSyntax[F[_], A] extends AnyRef

    Permalink
    Definition Classes
    Urls
  2. case class AssetPath(path: Seq[String], digest: String, name: String) extends Product with Serializable

    Permalink

    // foo/bar/baz-123abc
    AssetPath("foo" :: "bar" :: Nil, "123abc", "baz")
  3. case class AssetRequest(assetPath: AssetPath, isGzipSupported: Boolean) extends Product with Serializable

    Permalink

    assetPath

    Path of the requested asset

    isGzipSupported

    Whether the client supports gzip encoding or not

  4. sealed trait AssetResponse extends AnyRef

    Permalink

    An AssetResponse is either NotFound (if the asset has not been found on the server) or Found otherwise.

  5. case class Endpoint[A, B](request: Request[A], response: Response[B]) extends Product with Serializable

    Permalink

    Concrete representation of an Endpoint for routing purpose.

    Concrete representation of an Endpoint for routing purpose.

    Definition Classes
    Endpoints
  6. case class EndpointWithHandler[A, B](endpoint: Endpoint[A, B], service: (A) ⇒ Future[B]) extends ToPlayHandler with Product with Serializable

    Permalink

    An endpoint from which we can get a Play request handler.

    An endpoint from which we can get a Play request handler.

    Definition Classes
    Endpoints
  7. case class Found(data: Source[ByteString, _], contentLength: Option[Long], contentType: Option[String], isGzipped: Boolean) extends AssetResponse with Product with Serializable

    Permalink

    data

    Asset content

    contentLength

    Size, if known

    contentType

    Content type, if known

    isGzipped

    Whether data contains the gzipped version of the asset

  8. case class Method(value: String) extends Product with Serializable

    Permalink
    Definition Classes
    Methods
  9. class MuxEndpoint[Req <: MuxRequest, Resp, Transport] extends AnyRef

    Permalink
    Definition Classes
    Endpoints
  10. trait Path[A] extends PathOps[A] with Url[A]

    Permalink
    Definition Classes
    Urls
  11. trait PathOps[A] extends AnyRef

    Permalink
    Definition Classes
    Urls
  12. trait QueryString[A] extends QueryStringOps[A]

    Permalink

    Query string encoding and decoding

    Query string encoding and decoding

    Definition Classes
    Urls
  13. trait QueryStringOps[A] extends AnyRef

    Permalink
    Definition Classes
    Urls
  14. trait QueryStringParam[A] extends AnyRef

    Permalink
    Definition Classes
    Urls
  15. trait Request[A] extends AnyRef

    Permalink

    An HTTP request.

    An HTTP request.

    Has an instance of InvariantFunctor.

    Definition Classes
    Endpoints
  16. type RequestEntity[A] = BodyParser[A]

    Permalink

    Decodes a request entity

    Decodes a request entity

    Definition Classes
    Endpoints → Endpoints
  17. type RequestExtractor[A] = (RequestHeader) ⇒ Option[A]

    Permalink

    Convenient type alias modeling the extraction of an A information from request headers.

    Convenient type alias modeling the extraction of an A information from request headers.

    This type has an instance of Applicative.

    Definition Classes
    Urls
  18. type RequestHeaders[A] = (Headers) ⇒ Either[Result, A]

    Permalink

    An attempt to extract an A from a request headers.

    An attempt to extract an A from a request headers.

    Models failure by returning a Left(result). That makes it possible to early return an HTTP response if a header is wrong (e.g. if an authentication information is missing)

    Definition Classes
    Endpoints → Endpoints
  19. type Response[A] = (A) ⇒ Result

    Permalink

    Turns the A information into a proper Play Result

    Turns the A information into a proper Play Result

    Definition Classes
    Endpoints → Endpoints
  20. trait Segment[A] extends AnyRef

    Permalink

    Defines how to decode and encode path segments

    Defines how to decode and encode path segments

    Definition Classes
    Urls
  21. trait ToPlayHandler extends AnyRef

    Permalink

    Something that can be used as a Play request handler

    Something that can be used as a Play request handler

    Definition Classes
    Endpoints
  22. trait Url[A] extends AnyRef

    Permalink
    Definition Classes
    Urls
  23. trait UrlAndHeaders[A] extends AnyRef

    Permalink

    The URL and HTTP headers of a request.

    The URL and HTTP headers of a request.

    Definition Classes
    Endpoints

Abstract Value Members

  1. abstract def digests: Map[String, String]

    Permalink
    Definition Classes
    Assets

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def Delete: Method

    Permalink
    Definition Classes
    Methods → Methods
  5. def Get: Method

    Permalink
    Definition Classes
    Methods → Methods
  6. object NotFound extends AssetResponse with Product with Serializable

    Permalink
  7. def Post: Method

    Permalink
    Definition Classes
    Methods → Methods
  8. def Put: Method

    Permalink
    Definition Classes
    Methods → Methods
  9. implicit lazy val applicativeRequestExtractor: Applicative[RequestExtractor]

    Permalink
    Definition Classes
    Urls
  10. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  11. def asset(path: String, name: String): AssetRequest

    Permalink

    Convenient constructor for building an asset from its name and path, without providing its digest.

    Convenient constructor for building an asset from its name and path, without providing its digest.

    Useful for reverse routing:

    myAssetsEndpoint.call(asset("foo/bar", "baz"))
    path

    Asset path (no leading nor trailing slash)

    name

    Asset name

    returns

    An AssetRequest describing the asset. Throws an exception if there is no digest for name.

  12. def asset(name: String): AssetRequest

    Permalink

    Convenient constructor for building an asset from its name, without providing its digest.

    Convenient constructor for building an asset from its name, without providing its digest.

    Useful for reverse routing:

    myAssetsEndpoint.call(asset("baz"))
    name

    Asset name

    returns

    An AssetRequest describing the asset. There is no path prefixing the name. Throws an exception if there is no digest for name.

  13. lazy val assetSegments: Path[AssetPath]

    Permalink

    Decodes and encodes an AssetPath into a URL path.

    Decodes and encodes an AssetPath into a URL path.

    Definition Classes
    Assets → Assets
  14. def assetsEndpoint(url: Url[AssetPath]): Endpoint[AssetRequest, AssetResponse]

    Permalink

    An endpoint for serving assets.

    An endpoint for serving assets.

    url

    URL description

    returns

    An HTTP endpoint serving assets

    Definition Classes
    Assets → Assets
  15. def assetsResources(pathPrefix: Option[String] = None): (AssetRequest) ⇒ AssetResponse

    Permalink

    pathPrefix

    Prefix to use to look up the resources in the classpath. You most probably never want to publish all your classpath resources.

    returns

    A function that, given an AssetRequest, builds an AssetResponse by looking for the requested asset in the classpath resources.

  16. def chainPaths[A, B](first: Path[A], second: Path[B])(implicit tupler: Tupler[A, B]): Path[Out]

    Permalink
    Definition Classes
    Urls → Urls
  17. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. def combineQueryStrings[A, B](first: QueryString[A], second: QueryString[B])(implicit tupler: Tupler[A, B]): QueryString[Out]

    Permalink
    Definition Classes
    Urls → Urls
  19. lazy val emptyHeaders: RequestHeaders[Unit]

    Permalink

    Always succeeds in extracting no information from the headers

    Always succeeds in extracting no information from the headers

    Definition Classes
    Endpoints → Endpoints
  20. lazy val emptyRequest: BodyParser[Unit]

    Permalink
    Definition Classes
    Endpoints → Endpoints
  21. lazy val emptyResponse: Response[Unit]

    Permalink

    A successful HTTP response (status code 200) with no entity

    A successful HTTP response (status code 200) with no entity

    Definition Classes
    Endpoints → Endpoints
  22. def endpoint[A, B](request: Request[A], response: Response[B]): Endpoint[A, B]

    Permalink
    Definition Classes
    Endpoints → Endpoints
  23. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  24. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  25. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  26. implicit lazy val functorRequestExtractor: Functor[RequestExtractor]

    Permalink
    Definition Classes
    Urls
  27. final def get[A, B](url: Url[A], headers: RequestHeaders[B])(implicit tuplerAC: Tupler[A, B]): Request[Out]

    Permalink
    Definition Classes
    Endpoints
  28. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  29. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  30. lazy val htmlResponse: Response[Html]

    Permalink

    A successful HTTP response (status code 200) with an HTML entity

    A successful HTTP response (status code 200) with an HTML entity

    Definition Classes
    Endpoints
  31. implicit def intQueryString: QueryStringParam[Int]

    Permalink
    Definition Classes
    Urls → Urls
  32. implicit def intSegment: Segment[Int]

    Permalink
    Definition Classes
    Urls → Urls
  33. implicit lazy val invariantFunctorRequest: InvariantFunctor[Request]

    Permalink
    Definition Classes
    Endpoints
  34. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  35. implicit def longQueryString: QueryStringParam[Long]

    Permalink
    Definition Classes
    Urls → Urls
  36. implicit def longSegment: Segment[Long]

    Permalink
    Definition Classes
    Urls → Urls
  37. def muxEndpoint[Req <: MuxRequest, Resp, Transport](request: Request[Transport], response: (Transport) ⇒ Result): MuxEndpoint[Req, Resp, Transport]

    Permalink
    Definition Classes
    Endpoints → Endpoints
  38. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  39. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  40. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  41. def optQs[A](name: String)(implicit value: QueryStringParam[A]): QueryString[Option[A]]

    Permalink
    Definition Classes
    Urls → Urls
  42. val path: Path[Unit]

    Permalink
    Definition Classes
    Urls
  43. final def post[A, B, C, AB](url: Url[A], entity: RequestEntity[B], headers: RequestHeaders[C])(implicit tuplerAB: Tupler.Aux[A, B, AB], tuplerABC: Tupler[AB, C]): Request[Out]

    Permalink
    Definition Classes
    Endpoints
  44. def qs[A](name: String)(implicit value: QueryStringParam[A]): QueryString[A]

    Permalink
    Definition Classes
    Urls → Urls
  45. def request[A, B, C, AB](method: Method, url: Url[A], entity: RequestEntity[B], headers: RequestHeaders[C])(implicit tuplerAB: Tupler.Aux[A, B, AB], tuplerABC: Tupler[AB, C]): Request[Out]

    Permalink

    Decodes a request that uses the POST HTTP verb.

    Decodes a request that uses the POST HTTP verb.

    url

    Request URL

    entity

    Request entity

    headers

    Request headers

    Definition Classes
    Endpoints → Endpoints
  46. def routesFromEndpoints(endpoints: ToPlayHandler*): PartialFunction[RequestHeader, Handler]

    Permalink

    Builds a Play router out of endpoint definitions.

    Builds a Play router out of endpoint definitions.

    val routes = routesFromEndpoints(
      inc.implementedBy(x => x + 1)
    )
    Definition Classes
    Endpoints
  47. def segment[A](implicit A: Segment[A]): Path[A]

    Permalink
    Definition Classes
    Urls → Urls
  48. def staticPathSegment(segment: String): Path[Unit]

    Permalink
    Definition Classes
    Urls → Urls
  49. implicit def stringQueryString: QueryStringParam[String]

    Permalink
    Definition Classes
    Urls → Urls
  50. implicit def stringSegment: Segment[String]

    Permalink
    Definition Classes
    Urls → Urls
  51. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  52. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  53. def urlWithQueryString[A, B](path: Path[A], qs: QueryString[B])(implicit tupler: Tupler[A, B]): Url[Out]

    Permalink
    Definition Classes
    Urls → Urls
  54. val utf8Name: String

    Permalink
    Definition Classes
    Urls
  55. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  56. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  57. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Endpoints

Inherited from Methods

Inherited from Urls

Inherited from algebra.Assets

Inherited from algebra.Endpoints

Inherited from algebra.Methods

Inherited from algebra.Urls

Inherited from AnyRef

Inherited from Any

Ungrouped