Packages

abstract class ServerEndpoint[-R, F[_]] extends EndpointInfoOps[R] with EndpointMetaOps

An Endpoint together with functions implementing the endpoint's security and main logic.

R

Requirements: The capabilities that are required by this endpoint's inputs/outputs. Any, if no requirements.

F

The effect type constructor used in the provided server logic.

Self Type
ServerEndpoint[R, F]
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ServerEndpoint
  2. EndpointMetaOps
  3. EndpointInfoOps
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ServerEndpoint()

Type Members

  1. abstract type ERROR_OUTPUT

    Error output parameter types (abbreviated as E).

  2. abstract type INPUT

    Input parameter types (abbreviated as I).

  3. abstract type OUTPUT

    Output parameter types (abbreviated as O).

  4. abstract type PRINCIPAL

    The type of the value returned by the security logic, e.g.

    The type of the value returned by the security logic, e.g. a user (abbreviated as U).

  5. abstract type SECURITY_INPUT

    Security input parameter types (abbreviated as A).

  6. type ThisType[-_R] = ServerEndpoint[_R, F] { ... /* 5 definitions in type refinement */ }
    Definition Classes
    ServerEndpointEndpointInfoOps

Abstract Value Members

  1. abstract def endpoint: Endpoint[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OUTPUT, R]
  2. abstract def logic: (MonadError[F]) ⇒ (PRINCIPAL) ⇒ (INPUT) ⇒ F[Either[ERROR_OUTPUT, OUTPUT]]
  3. abstract def securityLogic: (MonadError[F]) ⇒ (SECURITY_INPUT) ⇒ F[Either[ERROR_OUTPUT, PRINCIPAL]]

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def attribute[T](k: AttributeKey[T], v: T): ThisType[R]
    Definition Classes
    EndpointInfoOps
  6. def attribute[T](k: AttributeKey[T]): Option[T]
    Definition Classes
    EndpointInfoOps
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  8. def deprecated(): ThisType[R]
    Definition Classes
    EndpointInfoOps
  9. def description(d: String): ThisType[R]
    Definition Classes
    EndpointInfoOps
  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  12. def errorOutput: EndpointOutput[ERROR_OUTPUT]
    Definition Classes
    ServerEndpointEndpointMetaOps
  13. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  14. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  15. def info: EndpointInfo
  16. def info(i: EndpointInfo): ThisType[R]
    Definition Classes
    EndpointInfoOps
  17. def input: EndpointInput[INPUT]
    Definition Classes
    ServerEndpointEndpointMetaOps
  18. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  19. def method: Option[Method]

    The method defined in a fixed method input in this endpoint, if any (using e.g.

    The method defined in a fixed method input in this endpoint, if any (using e.g. EndpointInputsOps.get or EndpointInputsOps.post).

    Definition Classes
    EndpointMetaOps
  20. def name(n: String): ThisType[R]
    Definition Classes
    EndpointInfoOps
  21. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  22. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  23. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  24. def output: EndpointOutput[OUTPUT]
    Definition Classes
    ServerEndpointEndpointMetaOps
  25. def prependSecurity[A2, E2](additionalSecurityInput: EndpointInput[A2], securityErrorOutput: EndpointOutput[E2])(additionalSecurityLogic: (A2) ⇒ F[Either[E2, Unit]])(implicit arg0: ClassTag[E2], arg1: ErasureSameAsType[E2]): ServerEndpoint[R, F]

    Prepends additional security logic to this endpoint.

    Prepends additional security logic to this endpoint. This is useful when adding security to file/resource-serving endpoints. The additional security logic should return a Right(()) to indicate success, or a Left(E2) to indicate failure; in this case, the given error output will be used to create the response.

    The security inputs will become a tuple, containing first additionalSecurityInput combined with the current endpoint.securityInput.

    The error output will consist of two variants: either the securityErrorOutput (the ClassTag requirement for E2 is used to create the oneOfVariant). In the absence of sum types, the resulting errors are typed as Any.

    The security logic is modified so that first additionalSecurityLogic is run, followed by the security logic defined so far.

    The type of the value returned by the combined security logic, or the regular logic remains unchanged.

    A2

    Type of the additional security input.

    E2

    Type of the error output for the security logic.

  26. def prependSecurityIn(additionalInput: EndpointInput[Unit]): ServerEndpoint[R, F]

    Prepends an additional input to this endpoint.

    Prepends an additional input to this endpoint. This is useful when adding a context path to endpoints, e.g. serverEndpoint.prependSecurityIn("api" / "v1").

    The given input can't map to any values in the request, hence its type is EndpointInput[Unit]; it has to be "netural" so that the server logic function can remain unchanged.

    The input is prepended to the security inputs, so that it is decoded before any other path-related inputs (either security or regular).

  27. def prependSecurityPure[A2, E2](additionalSecurityInput: EndpointInput[A2], securityErrorOutput: EndpointOutput[E2])(additionalSecurityLogic: (A2) ⇒ Either[E2, Unit])(implicit arg0: ClassTag[E2], arg1: ErasureSameAsType[E2]): ServerEndpoint[R, F]

    See prependSecurity.

  28. def securityInput: EndpointInput[SECURITY_INPUT]
    Definition Classes
    ServerEndpointEndpointMetaOps
  29. def show: String

    Basic information about the endpoint, excluding mapping information, with inputs sorted (first the method, then path, etc.).

    Basic information about the endpoint, excluding mapping information, with inputs sorted (first the method, then path, etc.). E.g.: POST /books /add {header Authorization} {body as application/json (UTF-8)} -> {body as text/plain (UTF-8)}/-

    Definition Classes
    EndpointMetaOps
  30. def showDetail: String

    Detailed description of the endpoint, with inputs/outputs represented in the same order as originally defined, including mapping information.

    Detailed description of the endpoint, with inputs/outputs represented in the same order as originally defined, including mapping information. E.g.:

    Endpoint(securityin: -, in: /books POST /add {body as application/json (UTF-8)} {header Authorization}, errout: {body as text/plain (UTF-8)}, out: -)
    Definition Classes
    EndpointMetaOps
  31. def showPathTemplate(showPathParam: (Int, PathCapture[_]) ⇒ String = ..., showQueryParam: Option[(Int, Query[_]) ⇒ String] = ..., includeAuth: Boolean = true, showNoPathAs: String = "*", showPathsAs: Option[String] = Some("*"), showQueryParamsAs: Option[String] = Some("*")): String

    Shows endpoint path, by default all parametrised path and query components are replaced by {param_name} or {paramN}, e.g.

    Shows endpoint path, by default all parametrised path and query components are replaced by {param_name} or {paramN}, e.g. for

    endpoint.in("p1" / path[String] / query[String]("par2"))

    returns /p1/{param1}?par2={par2}

    includeAuth

    Should authentication inputs be included in the result.

    showNoPathAs

    How to show the path if the endpoint does not define any path inputs.

    showPathsAs

    How to show Tapir.paths inputs (if at all), which capture multiple paths segments

    showQueryParamsAs

    How to show Tapir.queryParams inputs (if at all), which capture multiple query parameters

    Definition Classes
    EndpointMetaOps
  32. def showRaw: String

    Equivalent to .toString, shows the whole case class structure.

    Equivalent to .toString, shows the whole case class structure.

    Definition Classes
    EndpointMetaOps
  33. def showShort: String

    Shortened information about the endpoint.

    Shortened information about the endpoint. If the endpoint is named, returns the name, e.g. [my endpoint]. Otherwise, returns the string representation of the method (if any) and path, e.g. POST /books/add

    Definition Classes
    EndpointMetaOps
  34. def showType: String
    Attributes
    protected
    Definition Classes
    ServerEndpointEndpointMetaOps
  35. def summary(s: String): ThisType[R]
    Definition Classes
    EndpointInfoOps
  36. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  37. def tag(t: String): ThisType[R]

    Append t to the existing tags.

    Append t to the existing tags.

    Definition Classes
    EndpointInfoOps
  38. def tags(ts: List[String]): ThisType[R]

    Append ts to the existing tags.

    Append ts to the existing tags.

    Definition Classes
    EndpointInfoOps
  39. def toString(): String
    Definition Classes
    AnyRef → Any
  40. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  41. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  42. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  43. def withTag(t: String): ThisType[R]

    Overwrite the existing tags with a single tag t.

    Overwrite the existing tags with a single tag t.

    Definition Classes
    EndpointInfoOps
  44. def withTags(ts: List[String]): ThisType[R]

    Overwrite the existing tags with ts.

    Overwrite the existing tags with ts.

    Definition Classes
    EndpointInfoOps
  45. def withoutTags: ThisType[R]

    Remove all tags from this endpoint.

    Remove all tags from this endpoint.

    Definition Classes
    EndpointInfoOps

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from EndpointMetaOps

Inherited from EndpointInfoOps[R]

Inherited from AnyRef

Inherited from Any

Ungrouped