YamlConfigSource

pureconfig.module.yaml.YamlConfigSource
See theYamlConfigSource companion object
final class YamlConfigSource extends ConfigSource

A ConfigSource that reads configs from YAML documents in a stream, file or string.

Value parameters

getReader

the thunk to generate a Reader instance from which the YAML document will be read. This parameter won't be memoized so it can be used with dynamic sources (e.g. URLs)

onIOFailure

an optional function used to provide a custom failure when IO errors happen

uri

the optional URI of the source. Used only to provide better error messages.

Attributes

Companion
object
Graph
Supertypes
trait ConfigSource
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def asObjectSource: ConfigObjectSource

Converts this YAML source to a config object source to allow merging with other sources. This operation is not reversible. The new source will load with an error if this document does not contain an object.

Converts this YAML source to a config object source to allow merging with other sources. This operation is not reversible. The new source will load with an error if this document does not contain an object.

Attributes

Returns

a config object source that produces YAML object documents read by this source

def multiDoc: ConfigSource

Returns a new source that produces a multi-document YAML read by this source as a config list.

Returns a new source that produces a multi-document YAML read by this source as a config list.

Attributes

Returns

a new source that produces a multi-document YAML read by this source as a config list.

def value(): Result[ConfigValue]

Retrieves a ConfigValue from this source. This forces the config to be resolved, if needed.

Retrieves a ConfigValue from this source. This forces the config to be resolved, if needed.

Attributes

Returns

a ConfigValue retrieved from this source.

Inherited methods

def at(namespace: String): ConfigSource

Navigates through the config to focus on a namespace.

Navigates through the config to focus on a namespace.

Value parameters

namespace

the namespace to focus on

Attributes

Returns

a new ConfigSource focused on the given namespace.

Inherited from:
ConfigSource
def cursor(): Result[ConfigCursor]

Returns a cursor for a ConfigValue retrieved from this source.

Returns a cursor for a ConfigValue retrieved from this source.

Attributes

Returns

a cursor for a ConfigValue retrieved from this source.

Inherited from:
ConfigSource
def fluentCursor(): FluentConfigCursor

Returns a fluent cursor for a ConfigValue retrieved from this source.

Returns a fluent cursor for a ConfigValue retrieved from this source.

Attributes

Returns

a fluent cursor for a ConfigValue retrieved from this source.

Inherited from:
ConfigSource
final def load[A](implicit reader: ConfigReader[A]): Result[A]

Loads a configuration of type A from this source.

Loads a configuration of type A from this source.

Type parameters

A

the type of the config to be loaded

Attributes

Returns

A Right with the configuration if it is possible to create an instance of type A from this source, a Failure with details on why it isn't possible otherwise

Inherited from:
ConfigSource
final def loadOrThrow[A : ClassTag](implicit evidence$1: ClassTag[A], reader: ConfigReader[A]): A

Loads a configuration of type A from this source. If it is not possible to create an instance of A, this method throws a ConfigReaderException.

Loads a configuration of type A from this source. If it is not possible to create an instance of A, this method throws a ConfigReaderException.

Type parameters

A

the type of the config to be loaded

Attributes

Returns

The configuration of type A loaded from this source.

Inherited from:
ConfigSource