Created
May 18, 2020 08:08
-
-
Save adamw/b1cfb9906d9c2c5c794eb513c4b4ba0a to your computer and use it in GitHub Desktop.
This file contains hidden or 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 java.util.UUID | |
import cats.effect.{ContextShift, IO, Timer} | |
import sttp.tapir._ | |
import sttp.model.StatusCode | |
case class AuthToken(token: String) | |
case class Error(msg: String, statusCode: StatusCode) | |
case class User(id: UUID, name: String) | |
case class Pet(id: UUID, kind: String, name: String) | |
def authorize(authToken: AuthToken): IO[Either[Error, User]] = ??? | |
def findPetForUser(user: User, id: UUID): IO[Either[Error, Option[Pet]]] = ??? | |
def addPetToUser(user: User, pet: Pet): IO[Either[Error, Unit]] = ??? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment