sttp.tapir.server

Type members

Classlikes

abstract class PartialServerEndpoint[T, U, I, E, O, -R, F[_]](partialEndpoint: Endpoint[I, E, O, R]) extends EndpointInputsOps[I, E, O, R] with EndpointOutputsOps[I, E, O, R] with EndpointInfoOps[I, E, O, R] with EndpointMetaOps[I, E, O, R]

An endpoint, with some of the server logic already provided, and some left unspecified. See Endpoint.serverLogicForCurrent.

An endpoint, with some of the server logic already provided, and some left unspecified. See Endpoint.serverLogicForCurrent.

The part of the server logic which is provided transforms some inputs of type T, 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 a tuple: (U, I) either into an error, or a value of type O.

Inputs/outputs can be added to partial endpoints as to regular endpoints, however the shape of the error outputs is fixed and cannot be changed.

Type Params
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.

T

Original type of the input, transformed into U

U

Type of partially transformed input.

case class ServerEndpoint[I, E, O, -R, F[_]](endpoint: Endpoint[I, E, O, R], logic: MonadError[F] => I => F[Either[E, O]]) extends EndpointInfoOps[I, E, O, R] with EndpointMetaOps[I, E, O, R]
Type Params
E

Error output parameter types.

F

The effect type used in the provided 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.

abstract class ServerEndpointInParts[U, IR, I, E, O, -R, F[_]](val endpoint: Endpoint[I, E, O, R]) extends EndpointInfoOps[I, E, O, R] with EndpointMetaOps[I, E, O, R]

An endpoint description together with partial server logic. See Endpoint.serverLogicPart.

An endpoint description together with partial server logic. See Endpoint.serverLogicPart.

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

The part of the server logic which is not provided, transforms a tuple: (U, R) either into an error of type E, or a value of type O.

Type Params
E

Error output parameter types.

F

The effect type used in the provided server logic.

I

Entire input parameter types. I = T + R, where T is the part of the input consumed by the partial logic, and converted to U.

IR

Remaining input parameter types, for which logic has yet to be provided.

O

Output parameter types.

R

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

U

The type of the value returned by the partial server logic.