Retrieve a ConfigSource
from yaml path.
Retrieve a ConfigSource
from yaml path.
A complete example usage:
case class MyConfig(port: Int, url: String) val result: Either[ReadError[String], MyConfig] = YamlConfigSource.fromYamlFile(new File("/path/to/file.yaml")) .flatMap(source => read(descriptor[MyConfig] from source)))
Retrieve a ConfigSource
from yaml path.
Retrieve a ConfigSource
from yaml path.
A complete example usage:
case class MyConfig(port: Int, url: String) val result: Either[ReadError[String], MyConfig] = YamlConfigSource.fromYamlPath(Path.of("/path/to/file.yaml")) .flatMap(source => read(descriptor[MyConfig] from source)))
Retrieve a ConfigSource
from yaml path.
Retrieve a ConfigSource
from yaml path.
A complete example usage:
val yamlString = ??? case class MyConfig(port: Int, url: String) val result: Either[ReadError[String], MyConfig] = YamlConfigSource.fromYamlString(yamlString)) .flatMap(source => read(descriptor[MyConfig] from source)))