scConfigDsl


License

License

MIT
Categories

Categories

config Application Layer Libs Configuration
GroupId

GroupId

org.hbel
ArtifactId

ArtifactId

scconfigdsl_2.12
Last Version

Last Version

0.1.1
Release Date

Release Date

Type

Type

jar
Description

Description

scConfigDsl
scConfigDsl
Project URL

Project URL

https://github.com/hbel/scConfigDsl
Project Organization

Project Organization

org.hbel
Source Code Management

Source Code Management

https://github.com/hbel/scConfigDsl

Download scconfigdsl_2.12

How to add to project

<!-- https://jarcasting.com/artifacts/org.hbel/scconfigdsl_2.12/ -->
<dependency>
    <groupId>org.hbel</groupId>
    <artifactId>scconfigdsl_2.12</artifactId>
    <version>0.1.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.hbel/scconfigdsl_2.12/
implementation 'org.hbel:scconfigdsl_2.12:0.1.1'
// https://jarcasting.com/artifacts/org.hbel/scconfigdsl_2.12/
implementation ("org.hbel:scconfigdsl_2.12:0.1.1")
'org.hbel:scconfigdsl_2.12:jar:0.1.1'
<dependency org="org.hbel" name="scconfigdsl_2.12" rev="0.1.1">
  <artifact name="scconfigdsl_2.12" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.hbel', module='scconfigdsl_2.12', version='0.1.1')
)
libraryDependencies += "org.hbel" % "scconfigdsl_2.12" % "0.1.1"
[org.hbel/scconfigdsl_2.12 "0.1.1"]

Dependencies

compile (4)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.12.4
ch.qos.logback : logback-classic jar [1.2.3,)
com.typesafe.scala-logging : scala-logging_2.12 jar [3.7.2,)
com.typesafe : config jar [1.3.1,)

test (2)

Group / Artifact Type Version
org.scalatest : scalatest_2.12 jar [3.0.3,)
org.scalacheck : scalacheck_2.12 jar [1.13.5,)

Project Modules

There are no modules declared in this project.

scConfigDsl

scConfigDsl is a minimal wrapper around the most important functions of Typesafe Config for Scala. It provides a very natural DSL to access sections and keys of the configuration.

Available in the central repository.

To use the library with sbt:

libraryDependencies += "org.hbel" % "scconfigdsl_2.12" % "0.1.1"

Simple usage examples:

Creating a new configuration instance

val cfg = new Config

Getting a sub-section of the configuration:

cfg / "foo" / "bar"

Getting a specific key (type inferred from variable type)

val key : Option[String] = cfg / "foo" / "bar" % "key" 

Tyoe inferred from getOrElse call

val intValue = cfg / "foo" / "bar" % "key" getOrElse(0)

Getting the names of all direct child elements of a config:

val childElements = cfg children

Versions

Version
0.1.1