dev.cheleb.ziolaminartapir

Members list

Type members

Classlikes

final case class BackendClientConfig(baseUrl: Uri)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Supertypes
class Object
trait Matchable
class Any

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
case class RestrictedEndpointException(message: String) extends RuntimeException

Attributes

Supertypes
trait Product
trait Equals
class RuntimeException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all

Attributes

Supertypes
class Object
trait Matchable
class Any

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
trait Session[UserToken <: WithToken]

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class SessionLive[UserToken]
class SessionLive[UserToken <: WithToken](using x$1: JsonCodec[UserToken]) extends Session[UserToken]

Attributes

Supertypes
trait Session[UserToken]
class Object
trait Matchable
class Any
object Storage

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Storage.type

Types

type ZioStreamsWithWebSockets = ZioStreams & WebSockets

Extensions

Extensions

extension [I, E <: Throwable, O](endpoint: Endpoint[Unit, I, E, O, Any])
def apply(payload: I): RIO[SameOriginBackendClient, O]

Call the endpoint with a payload, and get a ZIO back.

Call the endpoint with a payload, and get a ZIO back.

Attributes

def on(baseUri: Uri)(payload: I): RIO[DifferentOriginBackendClient, O]

Extension that allows us to turn an unsecure endpoint to a function from a payload to a ZIO.

Extension that allows us to turn an unsecure endpoint to a function from a payload to a ZIO.

Attributes

extension [I, E <: Throwable, O](endpoint: Endpoint[String, I, E, O, Any])
def apply[UserToken <: WithToken](payload: I)(using session: Session[UserToken]): RIO[SameOriginBackendClient, O]

Call the secured endpoint with a payload, and get a ZIO back.

Call the secured endpoint with a payload, and get a ZIO back.

Attributes

def on[UserToken <: WithToken](baseUri: Uri)(payload: I)(using session: Session[UserToken]): RIO[DifferentOriginBackendClient, O]

Extension that allows us to turn a secured endpoint to a function from a payload to a ZIO.

Extension that allows us to turn a secured endpoint to a function from a payload to a ZIO.

Attributes

extension [E <: Throwable, A](zio: ZIO[SameOriginBackendClient, E, A])
def emitTo(baseURL: Uri, bus: EventBus[A]): Unit

Emit the result of the ZIO to an EventBus.

Emit the result of the ZIO to an EventBus.

Value parameters

baseURL

The base URL to send the request to.

bus

The EventBus to emit the result to.

Attributes

def emitTo(bus: EventBus[A]): Unit

Emit the result of the ZIO to an EventBus.

Emit the result of the ZIO to an EventBus.

Underlying request to the default backend.

Attributes

def emitTo(bus: EventBus[A], error: EventBus[E]): Unit

Emit the result and error of the ZIO to an EventBus.

Emit the result and error of the ZIO to an EventBus.

Underlying request to the default backend.

Attributes

def emitTo(baseURL: Uri, bus: EventBus[A], error: EventBus[E]): Unit

Emit the result and error of the ZIO to an EventBus.

Emit the result and error of the ZIO to an EventBus.

Value parameters

baseURL

uri to send the request to

bus

event bus to emit the result to

error

event bus to emit the error to

Attributes

def emitToEither(bus: EventBus[Either[E, A]]): Unit

Emit the result of the ZIO to an EventBus of Either.

Emit the result of the ZIO to an EventBus of Either.

Underlying request to the default backend.

Value parameters

bus

event bus to emit the result to

Attributes

def runJs(baseURL: Uri, errorBus: EventBus[E]): Unit

Run the ZIO in JS.

Run the ZIO in JS.

emits the error to the errorBus

Value parameters

baseURL

the base URL to send the request to

Attributes

def runJs: Unit

Run the ZIO in JS.

Run the ZIO in JS.

Attributes

def toEventStream(baseURL: Uri): EventStream[A]

Emit the result of the ZIO to an EventBus, and return the EventStream.

Emit the result of the ZIO to an EventBus, and return the EventStream.

Attributes

def toEventStream: EventStream[A]
extension [E <: Throwable, A](zio: ZIO[DifferentOriginBackendClient, E, A])
def runJs: Unit

Run the ZIO in JS.

Run the ZIO in JS.

emits the error to the console

Value parameters

baseURL

the base URL to send the request to

Attributes