CustomTapirPlatformSpecific

works.iterative.tapir.CustomTapirPlatformSpecific
trait CustomTapirPlatformSpecific extends ZTapir, SttpClientInterpreter

Attributes

Graph
Supertypes
trait SttpClientInterpreter
trait SttpClientInterpreterExtensions
trait ZTapir
class Object
trait Matchable
class Any
Show all
Known subtypes
Self type

Members list

Type members

Inherited classlikes

implicit class RichZEndpoint[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OUTPUT, C](e: Endpoint[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OUTPUT, C])

Attributes

Inherited from:
ZTapir
Supertypes
class Object
trait Matchable
class Any
implicit class RichZServerEndpoint[R, C](zse: ZServerEndpoint[R, C])

Attributes

Inherited from:
ZTapir
Supertypes
class Object
trait Matchable
class Any

Types

type ZApiEndpoint[R] = ZServerEndpoint[R & AuthenticationService, ZioStreams]

Inherited types

type ZServerEndpoint[R, -C] = ServerEndpoint[C, [_] =>> RIO[R, _$1]]

Attributes

Inherited from:
ZTapir

Value members

Concrete methods

def clientSession(sessionId: Option[String]): Backend
def clientSessionLayer(sessionId: Option[String]): TaskLayer[BackendProvider]
def makeClient[I, E, O](endpoint: PublicEndpoint[I, E, O, Any])(using baseUri: BaseUri, backend: Backend, wsToPipe: WebSocketToPipe[Any]): I => Task[O]

Inherited methods

def sttpClientOptions: SttpClientOptions

Attributes

Inherited from:
SttpClientInterpreter
def toClient[F[_], I, E, O, R](e: PublicEndpoint[I, E, O, R], baseUri: Option[Uri], backend: SttpBackend[F, R])(implicit wsToPipe: WebSocketToPipe[R]): I => F[DecodeResult[Either[E, O]]]

Interprets the public endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Interprets the public endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Returns a function which, when applied to the endpoint's input parameters (given as a tuple), will encode them to appropriate request parameters: path, query, headers and body. The request is sent using the given backend, and the result of decoding the response (error or success value) is returned.

Attributes

Inherited from:
SttpClientInterpreter
def toClientThrowDecodeFailures[F[_], I, E, O, R](e: PublicEndpoint[I, E, O, R], baseUri: Option[Uri], backend: SttpBackend[F, R])(implicit wsToPipe: WebSocketToPipe[R]): I => F[Either[E, O]]

Interprets the public endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Interprets the public endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Returns a function which, when applied to the endpoint's input parameters (given as a tuple), will encode them to appropriate request parameters: path, query, headers and body. The request is sent using the given backend, and the result (error or success value) is returned. If decoding the result fails, a failed effect is returned instead.

Attributes

Inherited from:
SttpClientInterpreter
def toClientThrowErrors[F[_], I, E, O, R](e: PublicEndpoint[I, E, O, R], baseUri: Option[Uri], backend: SttpBackend[F, R])(implicit wsToPipe: WebSocketToPipe[R]): I => F[O]

Interprets the public endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Interprets the public endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Returns a function which, when applied to the endpoint's input parameters (given as a tuple), will encode them to appropriate request parameters: path, query, headers and body. The request is sent using the given backend, and the result (success value) is returned. If decoding the result fails, or if the response corresponds to an error value, a failed effect is returned instead.

Attributes

Inherited from:
SttpClientInterpreter
def toQuickClient[I, E, O](e: PublicEndpoint[I, E, O, Any], baseUri: Option[Uri]): I => Either[E, O]

Interprets the public endpoint as a synchronous client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Interprets the public endpoint as a synchronous client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Returns a function which, when applied to the endpoint's input parameters (given as a tuple), will encode them to appropriate request parameters: path, query, headers and body. The request is sent using a synchronous backend, and the result of decoding the response (error or success value) is returned. If decoding the result fails, an exception is thrown.

Attributes

Inherited from:
SttpClientInterpreterExtensions
def toQuickClientThrowErrors[I, E, O](e: PublicEndpoint[I, E, O, Any], baseUri: Option[Uri]): I => O

Interprets the public endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Interprets the public endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Returns a function which, when applied to the endpoint's input parameters (given as a tuple), will encode them to appropriate request parameters: path, query, headers and body. The request is sent using a synchronous backend, and the result (success value) is returned. If decoding the result fails, or if the response corresponds to an error value, an exception is thrown.

Attributes

Inherited from:
SttpClientInterpreterExtensions
def toQuickSecureClient[A, I, E, O](e: Endpoint[A, I, E, O, Any], baseUri: Option[Uri]): A => I => Either[E, O]

Interprets the secure endpoint as a synchronous client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Interprets the secure endpoint as a synchronous client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Returns a function which, when applied to the endpoint's security and regular input parameters (given as tuples), will encode them to appropriate request parameters: path, query, headers and body. The request is sent using a synchronous backend, and the result of decoding the response (error or success value) is returned. If decoding the result fails, an exception is thrown.

Attributes

Inherited from:
SttpClientInterpreterExtensions
def toQuickSecureClientThrowErrors[A, I, E, O](e: Endpoint[A, I, E, O, Any], baseUri: Option[Uri]): A => I => O

Interprets the secure endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Interprets the secure endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Returns a function which, when applied to the endpoint's security and regular input parameters (given as tuples), will encode them to appropriate request parameters: path, query, headers and body. The request is sent using a synchronous backend, and the result (success value) is returned. If decoding the result fails, or if the response corresponds to an error value, an exception is thrown.

Attributes

Inherited from:
SttpClientInterpreterExtensions
def toRequest[I, E, O, R](e: PublicEndpoint[I, E, O, R], baseUri: Option[Uri])(implicit wsToPipe: WebSocketToPipe[R]): I => Request[DecodeResult[Either[E, O]], R]

Interprets the public endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Interprets the public endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Returns a function which, when applied to the endpoint's input parameters (given as a tuple), will encode them to appropriate request parameters: path, query, headers and body. The result of the function is a description of a request, which can be sent using any sttp backend. The response will then contain the decoded error or success values (note that this can be the body enriched with data from headers/status code).

Attributes

Inherited from:
SttpClientInterpreter
def toRequestThrowDecodeFailures[I, E, O, R](e: PublicEndpoint[I, E, O, R], baseUri: Option[Uri])(implicit wsToPipe: WebSocketToPipe[R]): I => Request[Either[E, O], R]

Interprets the public endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Interprets the public endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Returns a function which, when applied to the endpoint's input parameters (given as a tuple), will encode them to appropriate request parameters: path, query, headers and body. The result of the function is a description of a request, which can be sent using any sttp backend. The response will then contain the decoded error or success values (note that this can be the body enriched with data from headers/status code), or will be a failed effect, when response parsing fails.

Attributes

Inherited from:
SttpClientInterpreter
def toRequestThrowErrors[I, E, O, R](e: PublicEndpoint[I, E, O, R], baseUri: Option[Uri])(implicit wsToPipe: WebSocketToPipe[R]): I => Request[O, R]

Interprets the public endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Interprets the public endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Returns a function which, when applied to the endpoint's input parameters (given as a tuple), will encode them to appropriate request parameters: path, query, headers and body. The result of the function is a description of a request, which can be sent using any sttp backend. The response will then contain the decoded success values (note that this can be the body enriched with data from headers/status code), or will be a failed effect, when response parsing fails or if the result is an error.

Attributes

Throws
IllegalArgumentException

when response parsing fails

Inherited from:
SttpClientInterpreter
def toSecureClient[F[_], A, I, E, O, R](e: Endpoint[A, I, E, O, R], baseUri: Option[Uri], backend: SttpBackend[F, R])(implicit wsToPipe: WebSocketToPipe[R]): A => I => F[DecodeResult[Either[E, O]]]

Interprets the secure endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Interprets the secure endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Returns a function which, when applied to the endpoint's security and regular input parameters (given as tuples), will encode them to appropriate request parameters: path, query, headers and body. The request is sent using the given backend, and the result of decoding the response (error or success value) is returned.

Attributes

Inherited from:
SttpClientInterpreter
def toSecureClientThrowDecodeFailures[F[_], A, I, E, O, R](e: Endpoint[A, I, E, O, R], baseUri: Option[Uri], backend: SttpBackend[F, R])(implicit wsToPipe: WebSocketToPipe[R]): A => I => F[Either[E, O]]

Interprets the secure endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Interprets the secure endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Returns a function which, when applied to the endpoint's security and regular input parameters (given as tuples), will encode them to appropriate request parameters: path, query, headers and body. The request is sent using the given backend, and the result (error or success value) is returned. If decoding the result fails, a failed effect is returned instead.

Attributes

Inherited from:
SttpClientInterpreter
def toSecureClientThrowErrors[F[_], A, I, E, O, R](e: Endpoint[A, I, E, O, R], baseUri: Option[Uri], backend: SttpBackend[F, R])(implicit wsToPipe: WebSocketToPipe[R]): A => I => F[O]

Interprets the secure endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Interprets the secure endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Returns a function which, when applied to the endpoint's security and regular input parameters (given as tuples), will encode them to appropriate request parameters: path, query, headers and body. The request is sent using the given backend, and the result (success value) is returned. If decoding the result fails, or if the response corresponds to an error value, a failed effect is returned instead.

Attributes

Inherited from:
SttpClientInterpreter
def toSecureRequest[A, I, E, O, R](e: Endpoint[A, I, E, O, R], baseUri: Option[Uri])(implicit wsToPipe: WebSocketToPipe[R]): A => I => Request[DecodeResult[Either[E, O]], R]

Interprets the secure endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Interprets the secure endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Returns a function which, when applied to the endpoint's security and regular input parameters (given as tuples), will encode them to appropriate request parameters: path, query, headers and body. The result of the function is a description of a request, which can be sent using any sttp backend. The response will then contain the decoded error or success values (note that this can be the body enriched with data from headers/status code).

Attributes

Inherited from:
SttpClientInterpreter
def toSecureRequestThrowDecodeFailures[A, I, E, O, R](e: Endpoint[A, I, E, O, R], baseUri: Option[Uri])(implicit wsToPipe: WebSocketToPipe[R]): A => I => Request[Either[E, O], R]

Interprets the secure endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Interprets the secure endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Returns a function which, when applied to the endpoint's security and regular input parameters (given as tuples), will encode them to appropriate request parameters: path, query, headers and body. The result of the function is a description of a request, which can be sent using any sttp backend. The response will then contain the decoded error or success values (note that this can be the body enriched with data from headers/status code), or will be a failed effect, when response parsing fails.

Attributes

Inherited from:
SttpClientInterpreter
def toSecureRequestThrowErrors[A, I, E, O, R](e: Endpoint[A, I, E, O, R], baseUri: Option[Uri])(implicit wsToPipe: WebSocketToPipe[R]): A => I => Request[O, R]

Interprets the secure endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Interprets the secure endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Returns a function which, when applied to the endpoint's security and regular input parameters (given as tuples), will encode them to appropriate request parameters: path, query, headers and body. The result of the function is a description of a request, which can be sent using any sttp backend. The response will then contain the decoded success values (note that this can be the body enriched with data from headers/status code), or will be a failed effect, when response parsing fails or if the result is an error.

Attributes

Throws
IllegalArgumentException

when response parsing fails

Inherited from:
SttpClientInterpreter

Concrete fields

val clientLayer: TaskLayer[BackendProvider]

Extensions

Extensions

extension [E, I, O](endpoint: ApiEndpoint[E, I, O])
def apiLogic[R <: AuthenticationService](logic: I => ZIO[R & CurrentUser, E | AuthenticationError, O]): ZServerEndpoint[R, ZioStreams]

Implicits

Inherited implicits

final implicit def RichZEndpoint[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OUTPUT, C](e: Endpoint[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OUTPUT, C]): RichZEndpoint[SECURITY_INPUT, INPUT, ERROR_OUTPUT, OUTPUT, C]

Attributes

Inherited from:
ZTapir
final implicit def RichZServerEndpoint[R, C](zse: ZServerEndpoint[R, C]): RichZServerEndpoint[R, C]

Attributes

Inherited from:
ZTapir

Exports

Defined exports

final type Context = Context
Exported from http4s
final implicit def RichHttp4sEndpoint[A, I, E, O, R](e: Endpoint[A, I, E, O, R]): RichHttp4sEndpoint[A, I, E, O, R]
Exported from `package`
final type RichHttp4sEndpoint = RichHttp4sEndpoint
Exported from package$