Movatterモバイル変換


[0]ホーム

URL:


scalaland.io
scalaland.io

Umbrella for various Scala projects started by two passionate programmers:@krzemin and@MateuszKubuszok.

ChimneyStarWatchFork

Chimney is a library transforming an instance of one case class to another, when fields in both classes are very similar. If you have a case of:

  • event migration
  • distinction between API entities and internal entities (that are similar but not exaclty the same)
  • rewrite between Java Beans into case classes and vice versa
  • basically a lot of classes which are very similar except of few fields which were added/removed/renamed/changed that needs to be converted to-and-from
  • or when you want to patch some fields in one object using another object without a lot of manual work

Take a look atChimney’s documentation.

Maven CentralJavadocscodecov.ioLicenseJoin the chat at https://gitter.im/scalalandio/chimney

Endpoints ElmStarWatchFork

Elm code generator based on Scalaendpoints library.

The project provides:

  • interpreter for all basic endpoints algebras that targetsdata structures that resemble elm type system
  • code emitter that takes these data structures and emits elm code containing:
    • elm type definitions
    • json encoders and decoders
    • initial value providers
    • url construction methods targetingelm-url
    • api client methods targetingelm-http-builder

See also projectREADME.

Maven CentralLicense

Endpoints Json Schemas MacrosStarWatchFork

Generic derivation based macros for JsonSchema type class of Scalaendpoints library.

Endpoints havegeneric derivation of json schemasbased onShapeless library.

This project provides fully compatible, drop-in replacement that doesn’t use Shapeless, but Scala macros directly.This approach has several advantages:

  • immediate compilation-time performance improvements
  • more descriptive error messages
  • no runtime overhead as materialization toHList/Coproduct is not required
  • avoided runtime dependency on Shapeless

See alsoREADME.md.

PulpStarWatchFork

If passing arguments explicily is below you and runtime reflection fill you with distaste try out implicit-based dependency injection on steroids.

You can find details atPulp’s documentation.

Maven CentralScala.jsLicense

OCDQueryStarWatchFork

Overly-Complicated Database Query takes a case class defined by you and turns it into:

  • config format for defining column-name-to-case-class-field mapping (with sane defaults)
  • creation object allowing you to pass only certain fields toINSERT while the others will useDEFAULTs
  • entity object fetched from database
  • update object that let you update only certain fields without writing whole object at once filters for select, update and delete queries

Basically, it creates a repository basing on your (higher-kinded) case class.

Additionally, repositories can be joined together to fetch tuples of objects.

All returned results areDoobie queries.

You can find details atOCDQuery’s documentation.

Maven CentralLicense

log4effectStarWatchFork

If you missed some syntax for logging with Cats Effect, then here it is.

You can find details atlog4effect’s documentation.

Maven CentralLicense

EnumzStarWatchFork

In Scala you might meet many different implementations of enums:

  • build-inscala.Enumeration,
  • sum-type based sealed hierarchies,
  • enumeratum as the previous one on steroids,
  • Java’senum type which use static methods and has no companion object.

You are in control of what implementationyou pick, but you have no control overwhatother people use. So if you had to use APIs using many differentimplementations how would you handle common code?

With a type class.

You can find details atEnumz’s documentation.

Maven CentralScala.jsLicense

CatnipStarWatchFork

If you loveKittens but you find automatic generation kind of heavy,and ideally you would like to have something that does semiauto derivation and puts it into companion object– Catnip is here to support you with@Semi macro annotation.

You can find details atCatnip’s documentation.

Maven CentralScala.jsLicense


[8]ページ先頭

©2009-2025 Movatter.jp