Last active
January 14, 2020 09:12
-
-
Save calippo/958889a4f302f6ae0c1288ffb4a74c04 to your computer and use it in GitHub Desktop.
tapiro models
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
import scala.annotation.StaticAnnotation | |
class query extends StaticAnnotation | |
class command extends StaticAnnotation | |
import io.circe.generic.JsonCodec | |
@JsonCodec case class GenericError( | |
message: String = "", | |
code: Int = 500 | |
) | |
trait Controller[F[_]] { | |
@query | |
def getSomething(arg: String): F[Either[GenericError, Result]] | |
@command | |
def doSomething(arg: Content): F[Either[GenericError, Result]] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment