Modules Overview

The following modules integrate with external libraries to provide extended functionality.
You might also be interested in the third-party external libraries which integrate with Ciris.

import cats.implicits._
import ciris.cats._
import ciris.envF
import scala.concurrent._

implicit val executionContext: ExecutionContext =
  ExecutionContext.Implicits.global

envF[Future, Boolean]("CI")
import cats.effect.IO
import ciris.cats.effect._
import ciris.fileSync

fileSync[IO, Int](tempFile, _.trim)
object environments {
  import enumeratum._

  sealed abstract class AppEnvironment extends EnumEntry

  object AppEnvironment extends Enum[AppEnvironment] {
    case object Local extends AppEnvironment
    case object Testing extends AppEnvironment
    case object Production extends AppEnvironment

    val values = findValues
  }
}

import ciris.enumeratum._
import ciris.env
import environments._

env[AppEnvironment]("APP_ENV")
import ciris.generic._
import ciris.prop

final case class Decibel(val value: Int) extends AnyVal

prop[Decibel]("ratio.delta")
import ciris.refined._
import eu.timepit.refined.types.net.UserPortNumber

env[Option[UserPortNumber]]("HTTP_PORT")
import ciris.spire._
import spire.math.Natural

env[Natural]("DELAY_SECONDS")
import ciris.squants._
import squants.time.Time

prop[Time]("refresh.interval")