This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object ApplicationService { | |
def getPortfolio(portfolioId: PortfolioId): ZIO[AssetRepository with PortfolioAssetRepository, Exception, PortfolioStatus] = ... | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class LiveEnv | |
extends SlickAssetRepository | |
with SlickPortfolioAssetRepository | |
with LiveDatabaseProvider | |
val env = new LiveEnv() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val zioResult: ZIO[Any, Exception, PortfolioStatus] = | |
ApplicationService.getPortfolio(portfolioId).provide(env) | |
val runtime = new DefaultRuntime() {} | |
runtime.unsafeRun(zioResult) |
OlderNewer