Created
January 14, 2020 09:17
-
-
Save calippo/69a0f222afbb6ca35ab5104f6f1f83d5 to your computer and use it in GitHub Desktop.
tapiro http4s
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 ControllerHttp4sEndpoints { | |
def routes(controller: Controller[F])( | |
implicit ... | |
): HttpRoutes[F] = { | |
val endpoints = ControllerEndpoints.create() | |
val getContainers = | |
endpoints.getSomething.toRoutes((controller.getSomething _).tupled) | |
val getContainerStatus = endpoints.doSomething.toRoutes(controller.doSomething) | |
) | |
NonEmptyList( | |
getContainers, | |
List( | |
getContainerStatus | |
) | |
).reduceK | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment