Trait

endpoints.algebra

Assets

Related Doc: package algebra

Permalink

trait Assets extends Endpoints

Describes endpoints related to static assets (e.g. medias, scripts, stylesheets, etc.)

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

Type Members

  1. abstract type AssetPath

    Permalink

    The path of the asset

  2. abstract type AssetRequest

    Permalink

    An HTTP request to retrieve an asset

  3. abstract type AssetResponse

    Permalink

    An HTTP response containing an asset

  4. abstract type Endpoint[A, B]

    Permalink

    Information carried by an HTTP endpoint

    Information carried by an HTTP endpoint

    Definition Classes
    Endpoints
  5. implicit class InvariantFunctorSyntax[A, F[_]] extends AnyRef

    Permalink
    Definition Classes
    InvariantFunctorSyntax
  6. abstract type Method

    Permalink

    HTTP Method

    HTTP Method

    Definition Classes
    Methods
  7. abstract type Path[A] <: Url[A]

    Permalink

    An URL path carrying an A information

    An URL path carrying an A information

    Definition Classes
    Urls
  8. implicit class PathOps[A] extends AnyRef

    Permalink

    Convenient methods for Paths.

    Convenient methods for Paths.

    Definition Classes
    Urls
  9. abstract type QueryString[A]

    Permalink

    A query string carrying an A information

    A query string carrying an A information

    QueryString values can be created with the qs operation, and can be combined with the & operation:

    val queryPageAndLang: QueryString[(Int, Option[String])] =
      qs[Int]("page") & qs[Option[String]]("lang")
    Definition Classes
    Urls
  10. implicit class QueryStringOps[A] extends AnyRef

    Permalink

    Provides convenient methods on QueryString.

    Provides convenient methods on QueryString.

    Definition Classes
    Urls
  11. abstract type QueryStringParam[A]

    Permalink

    A single query string parameter carrying an A information.

    A single query string parameter carrying an A information.

    Definition Classes
    Urls
  12. abstract type Request[A]

    Permalink

    Information carried by a whole request (headers and entity)

    Information carried by a whole request (headers and entity)

    Definition Classes
    Requests
  13. abstract type RequestEntity[A]

    Permalink

    Information carried by request entity

    Information carried by request entity

    Definition Classes
    Requests
  14. abstract type RequestHeaders[A]

    Permalink

    Information carried by requests’ headers

    Information carried by requests’ headers

    Definition Classes
    Requests
  15. abstract type Response[A]

    Permalink

    Information carried by a response

    Information carried by a response

    Definition Classes
    Responses
  16. implicit class ResponseExtensions[A] extends AnyRef

    Permalink

    Extensions for Response.

    Extensions for Response.

    Definition Classes
    Responses
  17. abstract type Segment[A]

    Permalink

    An URL path segment carrying an A information.

    An URL path segment carrying an A information.

    Definition Classes
    Urls
  18. implicit class SemigroupalSyntax[A, F[_]] extends AnyRef

    Permalink
    Definition Classes
    SemigroupalSyntax
  19. abstract type Url[A]

    Permalink

    An URL carrying an A information

    An URL carrying an A information

    Definition Classes
    Urls

Abstract Value Members

  1. abstract def Delete: Method

    Permalink
    Definition Classes
    Methods
  2. abstract def Get: Method

    Permalink
    Definition Classes
    Methods
  3. abstract def Options: Method

    Permalink
    Definition Classes
    Methods
  4. abstract def Patch: Method

    Permalink
    Definition Classes
    Methods
  5. abstract def Post: Method

    Permalink
    Definition Classes
    Methods
  6. abstract def Put: Method

    Permalink
    Definition Classes
    Methods
  7. abstract def assetSegments(name: String = "", docs: Documentation = None): Path[AssetPath]

    Permalink

    A Path that extracts an AssetPath from all the path segments.

    A Path that extracts an AssetPath from all the path segments.

    Consider the following definition:

    val assets = assetsEndpoint(get(path / "assets" / assetsSegments))

    Then, here is how the following requests are decoded: - /assets/foo => foo - /assets/foo/bar => foo/bar

  8. abstract def assetsEndpoint(url: Url[AssetPath], docs: Documentation = None, notFoundDocs: Documentation = None): Endpoint[AssetRequest, AssetResponse]

    Permalink

    url

    URL description

    docs

    description of a response when asset is found. Required by openapi

    notFoundDocs

    description of a not found asset response. Required by openapi

    returns

    An HTTP endpoint serving assets

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

    Permalink

    Chains the two paths

    Chains the two paths

    Definition Classes
    Urls
  10. abstract def combineQueryStrings[A, B](first: QueryString[A], second: QueryString[B])(implicit tupler: Tupler[A, B]): QueryString[Out]

    Permalink

    Concatenates two QueryStrings

    Concatenates two QueryStrings

    Definition Classes
    Urls
  11. abstract def digests: Map[String, String]

    Permalink

    The digests of the assets

  12. abstract def emptyHeaders: RequestHeaders[Unit]

    Permalink

    No particular information.

    No particular information. Does not mean that the headers *have to* be empty. Just that, from a server point of view no information will be extracted from them, and from a client point of view no particular headers will be built in the request.

    Definition Classes
    Requests
  13. abstract def emptyRequest: RequestEntity[Unit]

    Permalink

    Empty request.

    Empty request.

    Definition Classes
    Requests
  14. abstract def emptyResponse(docs: Documentation = None): Response[Unit]

    Permalink

    Empty response.

    Empty response.

    Definition Classes
    Responses
  15. abstract def endpoint[A, B](request: Request[A], response: Response[B], summary: Documentation = None, description: Documentation = None, tags: List[String] = Nil): Endpoint[A, B]

    Permalink

    HTTP endpoint.

    HTTP endpoint.

    request

    Request

    response

    Response

    summary

    optional summary documentation

    description

    optional description documentation

    tags

    list of OpenApi tags

    Definition Classes
    Endpoints
  16. abstract def header(name: String, docs: Documentation = None): RequestHeaders[String]

    Permalink
    Definition Classes
    Requests
  17. implicit abstract def intSegment: Segment[Int]

    Permalink

    Ability to define Int path segments

    Ability to define Int path segments

    Definition Classes
    Urls
  18. implicit abstract def longSegment: Segment[Long]

    Permalink

    Segment containing a Long value

    Segment containing a Long value

    Definition Classes
    Urls
  19. abstract def optHeader(name: String, docs: Documentation = None): RequestHeaders[Option[String]]

    Permalink
    Definition Classes
    Requests
  20. implicit abstract def optionalQueryStringParam[A](implicit arg0: QueryStringParam[A]): QueryStringParam[Option[A]]

    Permalink

    Make a query string parameter optional:

    Make a query string parameter optional:

    path / "articles" /? qs[Option[Int]]("page")

    Client interpreters must omit optional query string parameters that are empty. Server interpreters must accept incoming requests whose optional query string parameters are missing. Server interpreters must report a failure for incoming requests whose optional query string parameters are present, but malformed.

    Definition Classes
    Urls
  21. abstract def qs[A](name: String, docs: Documentation = None)(implicit value: QueryStringParam[A]): QueryString[A]

    Permalink

    Builds a QueryString with one parameter.

    Builds a QueryString with one parameter.

    Examples:

    qs[Int]("page")            // mandatory `page` parameter
    qs[Option[String]]("lang") // optional `lang` parameter
    qs[List[Long]]("id")       // repeated `id` parameter
    A

    Type of the value carried by the parameter

    name

    Parameter’s name

    Definition Classes
    Urls
  22. abstract def refineQueryStringParam[A, B](pa: QueryStringParam[A])(f: (A) ⇒ Option[B])(g: (B) ⇒ A): QueryStringParam[B]

    Permalink

    Ability to refine a query string parameter for a type A into a query string parameter for a type B given a pair of decoding/encoding functions between A and B.

    Ability to refine a query string parameter for a type A into a query string parameter for a type B given a pair of decoding/encoding functions between A and B.

    A

    The type of the available query string parameter.

    B

    The type of the desired query string parameter.

    pa

    A query string parameter for a type A

    f

    Decoding function from A to Option[B]

    g

    Encoding function from B to A

    returns

    A query string parameter for a type B built by refinement from pa.

    Definition Classes
    Urls
  23. abstract def refineSegment[A, B](sa: Segment[A])(f: (A) ⇒ Option[B])(g: (B) ⇒ A): Segment[B]

    Permalink

    Ability to refine a path segment for a type A into a path segment for a type B given a pair of decoding/encoding functions between A and B.

    Ability to refine a path segment for a type A into a path segment for a type B given a pair of decoding/encoding functions between A and B.

    A

    The type of the available path segment.

    B

    The type of the desired path segment.

    sa

    A path segment for a type A

    f

    Decoding function from A to Option[B]

    g

    Encoding function from B to A

    returns

    A path segment for a type B built by refinement from sa.

    Definition Classes
    Urls
  24. implicit abstract def repeatedQueryStringParam[A, CC[X] <: Iterable[X]](implicit arg0: QueryStringParam[A], factory: scala.collection.compat.Factory[A, CC[A]]): QueryStringParam[CC[A]]

    Permalink

    Support query string parameters with multiple values:

    Support query string parameters with multiple values:

    path / "articles" /? qs[List[Long]]("id")

    Server interpreters must accept incoming requests where such parameters are missing (in such a case, its value is an empty collection), and report a failure if at least one value is malformed.

    Definition Classes
    Urls
  25. implicit abstract def reqEntityInvFunctor: InvariantFunctor[RequestEntity]

    Permalink
    Definition Classes
    Requests
  26. implicit abstract def reqHeadersInvFunctor: InvariantFunctor[RequestHeaders]

    Permalink
    Definition Classes
    Requests
  27. implicit abstract def reqHeadersSemigroupal: Semigroupal[RequestHeaders]

    Permalink
    Definition Classes
    Requests
  28. abstract def request[UrlP, BodyP, HeadersP, UrlAndBodyPTupled, Out](method: Method, url: Url[UrlP], entity: RequestEntity[BodyP] = emptyRequest, headers: RequestHeaders[HeadersP] = emptyHeaders)(implicit tuplerUB: Tupler.Aux[UrlP, BodyP, UrlAndBodyPTupled], tuplerUBH: Tupler.Aux[UrlAndBodyPTupled, HeadersP, Out]): Request[Out]

    Permalink

    Request for given parameters

    Request for given parameters

    UrlP

    Payload carried by url

    BodyP

    Payload carried by body

    HeadersP

    Payload carried by headers

    UrlAndBodyPTupled

    Payloads of Url and Body tupled together by Tupler

    method

    Request method

    url

    Request URL

    entity

    Request entity

    headers

    Request headers

    Definition Classes
    Requests
  29. abstract def segment[A](name: String = "", docs: Documentation = None)(implicit s: Segment[A]): Path[A]

    Permalink

    Builds a path segment carrying an A information

    Builds a path segment carrying an A information

    Definition Classes
    Urls
  30. abstract def staticPathSegment(segment: String): Path[Unit]

    Permalink

    Builds a static path segment

    Builds a static path segment

    Definition Classes
    Urls
  31. implicit abstract def stringQueryString: QueryStringParam[String]

    Permalink

    Ability to define String query string parameters

    Ability to define String query string parameters

    Definition Classes
    Urls
  32. implicit abstract def stringSegment: Segment[String]

    Permalink

    Ability to define String path segments

    Ability to define String path segments

    Definition Classes
    Urls
  33. abstract def textRequest(docs: Documentation = None): RequestEntity[String]

    Permalink

    Request with string body.

    Request with string body.

    Definition Classes
    Requests
  34. abstract def textResponse(docs: Documentation = None): Response[String]

    Permalink

    Text response.

    Text response.

    Definition Classes
    Responses
  35. implicit abstract def urlInvFunctor: InvariantFunctor[Url]

    Permalink
    Definition Classes
    Urls
  36. abstract def urlWithQueryString[A, B](path: Path[A], qs: QueryString[B])(implicit tupler: Tupler[A, B]): Url[Out]

    Permalink

    Builds an URL from the given path and query string

    Builds an URL from the given path and query string

    Definition Classes
    Urls
  37. abstract def wheneverFound[A](response: Response[A], notFoundDocs: Documentation = None): Response[Option[A]]

    Permalink

    Turns a Response[A] into a Response[Option[A]].

    Turns a Response[A] into a Response[Option[A]].

    Concrete interpreters should represent None with an empty HTTP response whose status code is 404 (Not Found).

    Definition Classes
    Responses

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. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. implicit def booleanQueryString: QueryStringParam[Boolean]

    Permalink

    Query string parameter containing a Boolean value

    Query string parameter containing a Boolean value

    Definition Classes
    Urls
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def delete[UrlP, HeadersP, Out](url: Url[UrlP], headers: RequestHeaders[HeadersP] = emptyHeaders)(implicit tuplerUH: Tupler.Aux[UrlP, HeadersP, Out]): Request[Out]

    Permalink

    Helper method to perform DELETE request

    Helper method to perform DELETE request

    UrlP

    Payload carried by url

    HeadersP

    Payload carried by headers

    Definition Classes
    Requests
  8. implicit def doubleQueryString: QueryStringParam[Double]

    Permalink
    Definition Classes
    Urls
  9. implicit def dummyPathToUrl[A](p: Path[A]): Url[A]

    Permalink

    Implicit conversion to get rid of intellij errors when defining paths.

    Implicit conversion to get rid of intellij errors when defining paths. Effectively should not be called.

    Definition Classes
    Urls
  10. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def get[UrlP, HeadersP, Out](url: Url[UrlP], headers: RequestHeaders[HeadersP] = emptyHeaders)(implicit tuplerUH: Tupler.Aux[UrlP, HeadersP, Out]): Request[Out]

    Permalink

    Helper method to perform GET request

    Helper method to perform GET request

    UrlP

    Payload carried by url

    HeadersP

    Payload carried by headers

    Definition Classes
    Requests
  14. final def getClass(): Class[_]

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

    Permalink
    Definition Classes
    AnyRef → Any
  16. implicit def intQueryString: QueryStringParam[Int]

    Permalink

    Ability to define Int query string parameters

    Ability to define Int query string parameters

    Definition Classes
    Urls
  17. final def isInstanceOf[T0]: Boolean

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

    Permalink

    Query string parameter containing a Long value

    Query string parameter containing a Long value

    Definition Classes
    Urls
  19. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  22. val path: Path[Unit]

    Permalink

    An empty path.

    An empty path.

    Useful to begin a path definition:

    path / "foo" / segment[Int] /? qs[String]("bar")
    Definition Classes
    Urls
  23. final def post[UrlP, BodyP, HeadersP, UrlAndBodyPTupled, Out](url: Url[UrlP], entity: RequestEntity[BodyP], headers: RequestHeaders[HeadersP] = emptyHeaders)(implicit tuplerUB: Tupler.Aux[UrlP, BodyP, UrlAndBodyPTupled], tuplerUBH: Tupler.Aux[UrlAndBodyPTupled, HeadersP, Out]): Request[Out]

    Permalink

    Helper method to perform POST request

    Helper method to perform POST request

    UrlP

    Payload carried by url

    BodyP

    Payload carried by body

    HeadersP

    Payload carried by headers

    UrlAndBodyPTupled

    Payloads of Url and Body tupled together by Tupler

    Definition Classes
    Requests
  24. final def put[UrlP, BodyP, HeadersP, UrlAndBodyPTupled, Out](url: Url[UrlP], entity: RequestEntity[BodyP], headers: RequestHeaders[HeadersP] = emptyHeaders)(implicit tuplerUB: Tupler.Aux[UrlP, BodyP, UrlAndBodyPTupled], tuplerUBH: Tupler.Aux[UrlAndBodyPTupled, HeadersP, Out]): Request[Out]

    Permalink

    Helper method to perform PUT request

    Helper method to perform PUT request

    UrlP

    Payload carried by url

    BodyP

    Payload carried by body

    HeadersP

    Payload carried by headers

    UrlAndBodyPTupled

    Payloads of Url and Body tupled together by Tupler

    Definition Classes
    Requests
  25. final def synchronized[T0](arg0: ⇒ T0): T0

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

    Permalink
    Definition Classes
    AnyRef → Any
  27. implicit def uuidQueryString: QueryStringParam[UUID]

    Permalink

    Ability to define UUID query string parameters

    Ability to define UUID query string parameters

    Definition Classes
    Urls
  28. implicit def uuidSegment: Segment[UUID]

    Permalink

    Ability to define UUID path segments

    Ability to define UUID path segments

    Definition Classes
    Urls
  29. final def wait(): Unit

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

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

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

Inherited from Endpoints

Inherited from Responses

Inherited from Requests

Inherited from Methods

Inherited from Urls

Inherited from AnyRef

Inherited from Any

Ungrouped