Skip to content

Instantly share code, notes, and snippets.

@afiore
Created December 30, 2020 12:49
Show Gist options
  • Save afiore/73a2a65e57d4098a2749660e75b99b48 to your computer and use it in GitHub Desktop.
Save afiore/73a2a65e57d4098a2749660e75b99b48 to your computer and use it in GitHub Desktop.
Tapir snippets
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