SmartThingsOSS / smartthings-scala-toolkit

Collection of small building block libraries for general Scala development mostly based on Typelevel projects.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status

Scala Toolkit

A collection of small libraries, generally based on Typelevel libraries that provide useful building blocks for higher level tools and applications.

Sub Modules

Core

Provides basic abstractions that other modules use.

  • Effect monad based on Cats Effect Async with implicit conversions for IO and Future.

Config

Simple configuration pattern using Scopt, PureConfig and Typesafe Config

Usage

val config = Configuration() { config =>
  // PureConfig isn't strictly required and this line can be swapped out with what
  // ever configuration parsing abstraction you desire.
  pureconfig.loadConfig[TestConfig](config, "test").left.map(ConfigurationReadError)
}

Modules

We try not to be opinionated about how projects do DI and IoC. Regardless of the approach its typically helpful that there are some lifecycle hooks and this library provides a single trait to help define a common contract for startup/shutdown lifecycle.

About

Collection of small building block libraries for general Scala development mostly based on Typelevel projects.

License:Apache License 2.0


Languages

Language:Scala 98.7%Language:Shell 1.3%