t

sttp.tapir

EndpointServerLogicOps

trait EndpointServerLogicOps[A, I, E, O, -R] extends AnyRef

Self Type
Endpoint[A, I, E, O, R]
Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. EndpointServerLogicOps
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

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 clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  9. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  10. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  11. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  13. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  14. def serverLogic[F[_]](f: (I) ⇒ F[Either[E, O]])(implicit aIsUnit: =:=[A, Unit]): Full[Unit, Unit, I, E, O, R, F]

    Combine this public endpoint description with a function, which implements the server-side logic.

    Combine this public endpoint description with a function, which implements the server-side logic. The logic returns a result, which is either an error or a successful output, wrapped in an effect type F. For secure endpoints, use serverSecurityLogic.

    A server endpoint can be passed to a server interpreter. Each server interpreter supports effects of a specific type(s).

    Both the endpoint and logic function are considered complete, and cannot be later extended through the returned ServerEndpoint value (except for endpoint meta-data). Secure endpoints allow providing the security logic before all the inputs and outputs are specified.

  15. def serverLogicError[F[_]](f: (I) ⇒ F[E])(implicit aIsUnit: =:=[A, Unit]): Full[Unit, Unit, I, E, O, R, F]

    Like serverLogic, but specialised to the case when the result is always an error (Left), hence when the logic type can be simplified to I => F[E].

  16. def serverLogicOption[F[_]](f: (I) ⇒ F[Option[O]])(implicit aIsUnit: =:=[A, Unit], eIsUnit: =:=[E, Unit]): Full[Unit, Unit, I, Unit, O, R, F]

    Like serverLogic, but specialised to the case when the error type is Unit (e.g.

    Like serverLogic, but specialised to the case when the error type is Unit (e.g. a fixed status code), and the result of the logic function is an option. A None is then treated as an error response.

  17. def serverLogicPure[F[_]](f: (I) ⇒ Either[E, O])(implicit aIsUnit: =:=[A, Unit]): Full[Unit, Unit, I, E, O, R, F]

    Like serverLogic, but specialised to the case when the logic function is pure, that is doesn't have any side effects.

  18. def serverLogicRecoverErrors[F[_]](f: (I) ⇒ F[O])(implicit eIsThrowable: <:<[E, Throwable], eClassTag: ClassTag[E], aIsUnit: =:=[A, Unit]): Full[Unit, Unit, I, E, O, R, F]

    Same as serverLogic, but requires E to be a throwable, and converts failed effects of type E to endpoint errors.

  19. def serverLogicSuccess[F[_]](f: (I) ⇒ F[O])(implicit aIsUnit: =:=[A, Unit]): Full[Unit, Unit, I, E, O, R, F]

    Like serverLogic, but specialised to the case when the result is always a success (Right), hence when the logic type can be simplified to I => F[O].

  20. def serverSecurityLogic[PRINCIPAL, F[_]](f: (A) ⇒ F[Either[E, PRINCIPAL]]): PartialServerEndpoint[A, PRINCIPAL, I, E, O, R, F]

    Combine this endpoint description with a function, which implements the security logic of the endpoint.

    Combine this endpoint description with a function, which implements the security logic of the endpoint.

    Subsequently, the endpoint inputs and outputs can be extended (for error outputs, new variants can be added, but they cannot be arbitrarily extended). Then the main server logic can be provided, given a function which accepts as arguments the result of the security logic and the remaining input. The final result is then a ServerEndpoint.

    A complete server endpoint can be passed to a server interpreter. Each server interpreter supports effects of a specific type(s).

    An example use-case is defining an endpoint with fully-defined errors, and with security logic built-in. Such an endpoint can be then extended by multiple other endpoints, by specifying different inputs, outputs and the main logic.

  21. def serverSecurityLogicError[PRINCIPAL, F[_]](f: (A) ⇒ F[E]): PartialServerEndpoint[A, PRINCIPAL, I, E, O, R, F]

    Like serverSecurityLogic, but specialised to the case when the result is always an error (Left), hence when the logic type can be simplified to A => F[E].

  22. def serverSecurityLogicOption[PRINCIPAL, F[_]](f: (A) ⇒ F[Option[PRINCIPAL]])(implicit eIsUnit: =:=[E, Unit]): PartialServerEndpoint[A, PRINCIPAL, I, Unit, O, R, F]

    Like serverSecurityLogic, but specialised to the case when the error type is Unit (e.g.

    Like serverSecurityLogic, but specialised to the case when the error type is Unit (e.g. a fixed status code), and the result of the logic function is an option. A None is then treated as an error response.

  23. def serverSecurityLogicOptionWithOutput[PRINCIPAL, F[_]](f: (A) ⇒ F[Option[(O, PRINCIPAL)]])(implicit eIsUnit: =:=[E, Unit]): PartialServerEndpointWithSecurityOutput[A, PRINCIPAL, I, Unit, O, Unit, R, F]

    Like serverSecurityLogicWithOutput, but specialised to the case when the error type is Unit (e.g.

    Like serverSecurityLogicWithOutput, but specialised to the case when the error type is Unit (e.g. a fixed status code), and the result of the logic function is an option. A None is then treated as an error response.

  24. def serverSecurityLogicPure[PRINCIPAL, F[_]](f: (A) ⇒ Either[E, PRINCIPAL]): PartialServerEndpoint[A, PRINCIPAL, I, E, O, R, F]

    Like serverSecurityLogic, but specialised to the case when the logic function is pure, that is doesn't have any side effects.

  25. def serverSecurityLogicPureWithOutput[PRINCIPAL, F[_]](f: (A) ⇒ Either[E, (O, PRINCIPAL)]): PartialServerEndpointWithSecurityOutput[A, PRINCIPAL, I, E, O, Unit, R, F]

    Like serverSecurityLogicWithOutput, but specialised to the case when the logic function is pure, that is doesn't have any side effects.

  26. def serverSecurityLogicRecoverErrors[PRINCIPAL, F[_]](f: (A) ⇒ F[PRINCIPAL])(implicit eIsThrowable: <:<[E, Throwable], eClassTag: ClassTag[E]): PartialServerEndpoint[A, PRINCIPAL, I, E, O, R, F]

    Same as serverSecurityLogic, but requires E to be a throwable, and converts failed effects of type E to endpoint errors.

  27. def serverSecurityLogicRecoverErrorsWithOutput[PRINCIPAL, F[_]](f: (A) ⇒ F[(O, PRINCIPAL)])(implicit eIsThrowable: <:<[E, Throwable], eClassTag: ClassTag[E]): PartialServerEndpointWithSecurityOutput[A, PRINCIPAL, I, E, O, Unit, R, F]

    Same as serverSecurityLogicWithOutput, but requires E to be a throwable, and converts failed effects of type E to endpoint errors.

  28. def serverSecurityLogicSuccess[PRINCIPAL, F[_]](f: (A) ⇒ F[PRINCIPAL]): PartialServerEndpoint[A, PRINCIPAL, I, E, O, R, F]

    Like serverSecurityLogic, but specialised to the case when the result is always a success (Right), hence when the logic type can be simplified to A => F[PRINCIPAL].

  29. def serverSecurityLogicSuccessWithOutput[PRINCIPAL, F[_]](f: (A) ⇒ F[(O, PRINCIPAL)]): PartialServerEndpointWithSecurityOutput[A, PRINCIPAL, I, E, O, Unit, R, F]

    Like serverSecurityLogicWithOutput, but specialised to the case when the result is always a success (Right), hence when the logic type can be simplified to A => F[(O, PRINCIPAL)].

  30. def serverSecurityLogicWithOutput[PRINCIPAL, F[_]](f: (A) ⇒ F[Either[E, (O, PRINCIPAL)]]): PartialServerEndpointWithSecurityOutput[A, PRINCIPAL, I, E, O, Unit, R, F]

    Like serverSecurityLogic, but allows the security function to contribute to the overall output of the endpoint.

    Like serverSecurityLogic, but allows the security function to contribute to the overall output of the endpoint. A value for the complete output O defined so far has to be provided. The value PRINCIPAL will be propagated as an input to the regular logic.

  31. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  32. def toString(): String
    Definition Classes
    AnyRef → Any
  33. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  35. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

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

Inherited from AnyRef

Inherited from Any

Ungrouped