All Downloads are FREE. Search and download functionalities are using the official Maven repository.

smithy4s.com.dwolla.consul.smithy.ServiceName.scala Maven / Gradle / Ivy

Go to download

smithy4s middleware to rewrite URLs back to the consul://{service} format expected by http4s-consul-middleware

The newest version!
package com.dwolla.consul.smithy

import smithy4s.Hints
import smithy4s.Newtype
import smithy4s.Schema
import smithy4s.ShapeId
import smithy4s.schema.Schema.bijection
import smithy4s.schema.Schema.string

object ServiceName extends Newtype[String] {
  val id: ShapeId = ShapeId("com.dwolla.consul.smithy", "ServiceName")
  val hints: Hints = Hints.empty
  val underlyingSchema: Schema[String] = string.withId(id).addHints(hints)
  implicit val schema: Schema[ServiceName] = bijection(underlyingSchema, asBijection)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy