-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Migrate from akka-http to pekko-http * Removed redundant pekko module * Revert removal of akka-http support * Add scala 3 support for pekko-http * Remove CrossVersion where not necessary * Introduce opaque types in http4s-stir and pekko-http modules tests --------- Co-authored-by: agrodowski <agrodowski@iteratorshq.com>
- Loading branch information
1 parent
e8257d6
commit 0eec889
Showing
25 changed files
with
1,080 additions
and
55 deletions.
There are no files selected for viewing
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
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
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
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
10 changes: 5 additions & 5 deletions
10
...kebs_examples/AkkaHttpUnmarshallers.scala → ...ebs_examples/PekkoHttpUnmarshallers.scala
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
8 changes: 4 additions & 4 deletions
8
examples/src/main/scala/pl/iterators/kebs_examples/SprayJsonFormat.scala
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
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
11 changes: 8 additions & 3 deletions
11
http4s-stir/src/test/scala-3/pl/iterators/kebs/Http4sStirTagsDomain.scala
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package pl.iterators.kebs.matchers | ||
|
||
import org.apache.pekko.http.scaladsl.server.{PathMatcher1, PathMatchers} | ||
import enumeratum.{Enum, EnumEntry} | ||
import pl.iterators.kebs.instances.InstanceConverter | ||
import pl.iterators.kebs.macros.CaseClass1Rep | ||
|
||
import scala.language.implicitConversions | ||
|
||
trait KebsMatchers extends PathMatchers { | ||
|
||
implicit class SegmentIsomorphism[U](segment: PathMatcher1[U]) { | ||
def as[T](implicit rep: CaseClass1Rep[T, U]): PathMatcher1[T] = segment.map(rep.apply) | ||
} | ||
|
||
implicit class SegmentConversion[Source](segment: PathMatcher1[Source]) { | ||
def to[Type](implicit ico: InstanceConverter[Type, Source]): PathMatcher1[Type] = segment.map(ico.decode) | ||
} | ||
|
||
object EnumSegment { | ||
def as[T <: EnumEntry: Enum]: PathMatcher1[T] = { | ||
val enumCompanion = implicitly[Enum[T]] | ||
Segment.map(enumCompanion.withNameInsensitive) | ||
} | ||
} | ||
} |
Oops, something went wrong.