Routes

dev.cheleb.ziotapir.server.Routes
trait Routes[Deps]

A trait that provides a method to gather all the routes from a controllers.

The controllers are created in the makeControllers method, which is a ZIO effect that requires a context of type Deps. This allows the routes to have access to any dependencies they need, such as a database connection or a configuration object.

Type parameters

Deps

The type of the context that the routes require.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Type members

Types

type STREAMS <: Streams[_]

Value members

Abstract methods

protected def makeControllers: ZIO[Deps, Nothing, List[BaseController[STREAMS]]]

Concrete methods

def endpoints: RIO[Deps, List[ServerEndpoint[STREAMS, Task]]]

This is critical, to not provide the Postgres layer too early, it would be closed too early in the app lifecycle.

This is critical, to not provide the Postgres layer too early, it would be closed too early in the app lifecycle.

Attributes