ConfigSource

zio.blocks.config.ConfigSource
See theConfigSource companion object
trait ConfigSource extends FlagSource

A source of configuration key-value pairs.

Attributes

Companion
object
Source
ConfigSource.scala
Graph
Supertypes
trait FlagSource
class Object
trait Matchable
class Any
Known subtypes
class MapSource
object EnvSource
object SysPropSource

Members list

Value members

Abstract methods

def all(prefix: String): Map[String, SourceValue[String]]

Return all key-value pairs whose keys start with the given prefix (using dot-separated paths).

Return all key-value pairs whose keys start with the given prefix (using dot-separated paths).

Attributes

Source
ConfigSource.scala
def get(key: String): Maybe[SourceValue[String]]

Look up a single key and return its value with provenance, or None if absent.

Look up a single key and return its value with provenance, or None if absent.

Attributes

Source
ConfigSource.scala
def sourceId: String

A unique identifier for this source, used in provenance tracking.

A unique identifier for this source, used in provenance tracking.

Attributes

Source
ConfigSource.scala

Concrete methods

final def keyFormat(format: KeyFormat): ConfigSource

Attributes

Source
ConfigSource.scala
final def keyMapper(mapper: KeyMapper, targetFormat: KeyFormat): ConfigSource

Apply a key transformation before lookup. The mapper transforms the requested key before it is passed to the underlying source.

Apply a key transformation before lookup. The mapper transforms the requested key before it is passed to the underlying source.

Attributes

Source
ConfigSource.scala
final def orElse(fallback: ConfigSource): ConfigSource

Compose this source with a fallback. Keys are looked up in this source first; if absent, the fallback is consulted. Provenance tracks the actual providing source.

Compose this source with a fallback. Keys are looked up in this source first; if absent, the fallback is consulted. Provenance tracks the actual providing source.

Attributes

Source
ConfigSource.scala
final def prefix(prefix: String): ConfigSource

Prepend a prefix to all key lookups. For example, source.prefix("db").get("host") looks up "db.host" in the underlying source.

Prepend a prefix to all key lookups. For example, source.prefix("db").get("host") looks up "db.host" in the underlying source.

Attributes

Source
ConfigSource.scala

Inherited methods

final def orElse(fallback: FlagSource): FlagSource

Compose this source with a fallback. This source is consulted first; if it returns None, the fallback is tried.

Compose this source with a fallback. This source is consulted first; if it returns None, the fallback is tried.

Attributes

Inherited from:
FlagSource
Source
FlagSource.scala