MapSource

zio.blocks.config.ConfigSource.MapSource
final case class MapSource(map: Map[String, String], sourceId: String = ...) extends ConfigSource

A config source backed by an in-memory map.

Attributes

Source
ConfigSource.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait ConfigSource
trait FlagSource
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete 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

Inherited methods

final def keyFormat(format: KeyFormat): ConfigSource

Attributes

Inherited from:
ConfigSource
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

Inherited from:
ConfigSource
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

Inherited from:
ConfigSource
Source
ConfigSource.scala
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
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

Inherited from:
ConfigSource
Source
ConfigSource.scala
def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
Source
Product.scala
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product
Source
Product.scala