fallatol.config

package fallatol.config

Provides type classes for extracting values in a generic manner from HOCON config files read by the library sconfig.

Attributes

Example
 import fallatol.config._
 import org.ekrich.config._
 val config = ConfigFactory.parseString(
   """
     |foo = "bar"
     |meaning_of_life = 42
     |""".stripMargin)
 val foo: ConfigResult[String] = config.get[String]("foo")
 val meaningOfLife: ConfigResult[Int] = config.get[Int]("bar")

Members list

Type members

Classlikes

object ConfigError

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
trait ConfigMapper[A]

The core type class for fallatol-config. It describes how an instance of some type obtained from an instance of org.ekrich.impl.ConfigValue. Instances of this type class are used by ConfigOps which allows getting of instances from org.ekrich.config.Config via type parameters like:

The core type class for fallatol-config. It describes how an instance of some type obtained from an instance of org.ekrich.impl.ConfigValue. Instances of this type class are used by ConfigOps which allows getting of instances from org.ekrich.config.Config via type parameters like:

  config.get[Double]("path.to.double")

rather than the built in methods with hard coded values:

  config.getDouble("path.to.double")

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
object ConfigMapper

Contains basic ConfigMapper instances for types are obtainable out of the box by the sconfig library. This includes some primitives like String, Int, Long, Double, Number, and Boolean, as well as org.ekrich.config.Config, which is used for nested configuration, as well as ConfigMappers for List and Map with String keys.

Contains basic ConfigMapper instances for types are obtainable out of the box by the sconfig library. This includes some primitives like String, Int, Long, Double, Number, and Boolean, as well as org.ekrich.config.Config, which is used for nested configuration, as well as ConfigMappers for List and Map with String keys.

Also has the from method for building a new ConfigMapper from an existing ConfigMapper.

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
implicit class ConfigOps(config: Config)

Attributes

Supertypes
class Object
trait Matchable
class Any

Types

type ConfigResult[T] = Either[Throwable, T]

Type alias for

Type alias for

Attributes

Implicits

Implicits

final implicit def ConfigOps(config: Config): ConfigOps