sttp.tapir.server

Type members

Classlikes

case
class PartialServerEndpoint[A, U, I, E, O, -R, F[_]](endpoint: Endpoint[A, I, E, O, R], securityLogic: MonadError[F] => A => F[Either[E, U]]) extends EndpointInputsOps[A, I, E, O, R] with EndpointOutputsOps[A, I, E, O, R] with EndpointErrorOutputVariantsOps[A, I, E, O, R] with EndpointInfoOps[R] with EndpointMetaOps

An endpoint with the security logic provided, and the main logic yet unspecified. See Endpoint.serverSecurityLogic.

An endpoint with the security logic provided, and the main logic yet unspecified. See Endpoint.serverSecurityLogic.

The provided security part of the server logic transforms inputs of type A, either to an error of type E, or value of type U.

The part of the server logic which is not provided, will have to transform both U and the rest of the input I either into an error, or a value of type O.

Inputs/outputs can be added to partial endpoints as to regular endpoints. The shape of the error outputs can be adjusted in a limited way, by adding new error output variants, similar as if they were defined using Tapir.oneOf; the variants and the existing error outputs should usually have a common supertype (other than Any). Hence, it's possible to create a base, secured input, and then specialise it with inputs, outputs and logic as needed.

Type Params
A

"Auth": Security input parameter types, which the security logic accepts and returns a U or an error E.

E

Error output parameter types.

F

The effect type used in the provided partial server logic.

I

Input parameter types.

O

Output parameter types.

R

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

U

"User": The type of the value returned by the security logic.

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

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

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

Type Params
F

The effect type constructor used in the provided server logic.

R

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

Companion
object
Companion
class