little.config

Type members

Classlikes

@FunctionalInterface

Gets T from config.

Gets T from config.

import com.typesafe.config.{ Config, ConfigFactory }
import little.config.{ ConfigDelegate, ConfigMethods }

case class User(id: Int, name: String)

// Define how to get User from Config
given ConfigDelegate[User] with
 def get(config: Config, path: String): User =
   val user = config.getConfig(path)
   User(user.getInt("id"), user.getString("name"))

val config = ConfigFactory.parseString("user { id = 0, name = root }")

// Get User from Config
val user = config.get[User]("user")
final implicit class ConfigMethods(config: Config) extends AnyVal

Provides extension methods for com.typesafe.config.Config.

Provides extension methods for com.typesafe.config.Config.

object booleanDelegate extends ConfigDelegate[Boolean]

Gets Boolean from config.

Gets Boolean from config.

object configDelegate extends ConfigDelegate[Config]

Gets Config from config.

Gets Config from config.

object doubleDelegate extends ConfigDelegate[Double]

Gets Double from config.

Gets Double from config.

object durationDelegate extends ConfigDelegate[Duration]

Gets Duration from config.

Gets Duration from config.

object fileDelegate extends ConfigDelegate[File]

Gets File from config.

Gets File from config.

Note:

This gets a String and uses it as a pathname to create a File.

object intDelegate extends ConfigDelegate[Int]

Gets Int from config.

Gets Int from config.

object longDelegate extends ConfigDelegate[Long]

Gets Long from config.

Gets Long from config.

object memorySizeDelegate extends ConfigDelegate[ConfigMemorySize]

Gets ConfigMemorySize from config.

Gets ConfigMemorySize from config.

object periodDelegate extends ConfigDelegate[Period]

Gets Period from config.

Gets Period from config.

object stringDelegate extends ConfigDelegate[String]

Gets String from config.

Gets String from config.

Givens

Givens

Gets Boolean from config.

Gets Boolean from config.

given collectionDelegate[T, M[T]](using delegate: ConfigDelegate[T])(using factory: Factory[T, M[T]]): ConfigDelegate[M[T]]

Gets collection M[T] from config.

Gets collection M[T] from config.

Gets Config from config.

Gets Config from config.

Gets Double from config.

Gets Double from config.

Gets Duration from config.

Gets Duration from config.

given enumDelegate[T <: Enum[LazyRef(...)]](using ctag: ClassTag[T]): ConfigDelegate[T]

Creates ConfigDelegate for getting Enum from config.

Creates ConfigDelegate for getting Enum from config.

Gets File from config.

Gets File from config.

Note:

This gets a String and uses it as a pathname to create a File.

Gets Int from config.

Gets Int from config.

Gets Long from config.

Gets Long from config.

Gets ConfigMemorySize from config.

Gets ConfigMemorySize from config.

Gets Period from config.

Gets Period from config.

Gets String from config.

Gets String from config.

Implicits

Implicits

final implicit def ConfigMethods(config: Config): ConfigMethods

Provides extension methods for com.typesafe.config.Config.

Provides extension methods for com.typesafe.config.Config.