little.config
Type members
Classlikes
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")
Provides extension methods for com.typesafe.config.Config
.
Provides extension methods for com.typesafe.config.Config
.
Gets Boolean
from config.
Gets Boolean
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.
Gets File
from config.
Gets File
from config.
- Note:
This gets a
String
and uses it as a pathname to create aFile
.
Gets ConfigMemorySize
from config.
Gets ConfigMemorySize
from config.
Gets Period
from config.
Gets Period
from config.
Gets String
from config.
Gets String
from config.
Givens
Givens
Gets collection M[T]
from config.
Gets collection M[T]
from config.
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 aFile
.