dev.cheleb.ziolaminartapir

Members list

Type members

Classlikes

A client to the backend, extending the endpoints as methods.

A client to the backend, extending the endpoints as methods.

Attributes

Supertypes
class Object
trait Matchable
class Any
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
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
trait Session[UserToken <: WithToken]

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class SessionLive[UserToken]
object Session

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
Session.type
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[BackendClient, O]

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

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

Attributes

extension [I, E <: Throwable, O](endpoint: Endpoint[String, I, E, O, Any])
def apply[UserToken <: WithToken](payload: I)(using session: Session[UserToken]): RIO[BackendClient, 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

extension [E <: Throwable, A](zio: ZIO[BackendClient, 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): 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

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 to ZIO[BakendClient, E, A] that allows us to run in JS.

Extension to ZIO[BakendClient, E, A] that allows us to run in JS.

This is a side effect, and should be used with caution.

Attributes