Created
December 30, 2020 12:49
-
-
Save afiore/73a2a65e57d4098a2749660e75b99b48 to your computer and use it in GitHub Desktop.
Tapir snippets
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 io.circe.generic.semiauto.deriveCodec | |
import io.circe.Codec | |
final case class ResourcePattern(resourceType: ResourceType, | |
resource: String, | |
patternType: PatternType) | |
object ResourcePattern { | |
implicit val codec: Codec[ResourcePattern] = deriveCodec | |
} | |
final case class AclEntry(principal: String, | |
host: String, | |
operation: Operation, | |
permissionType: PermissionType) | |
object AclEntry { | |
implicit val codec: Codec[AclEntry] = deriveCodec | |
} | |
final case class AclBinding(pattern: ResourcePattern, entry: AclEntry) | |
object AclBinding { | |
implicit val codec: Codec[AclBinding] = deriveCodec | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment