PathPatch

zio.ConfigProvider.Flat.PathPatch
See thePathPatch companion object
sealed trait PathPatch

A change to a configuration path, made of renames (mapName), added prefixes (nested) and removed prefixes (unnested), which apply in the order they were added.

import zio.ConfigProvider.Flat.PathPatch

val patch: PathPatch = PathPatch.empty.nested("app").mapName(_.toUpperCase)

val patched: Either[Config.Error, Chunk[String]] = patch(Chunk("port"))
// Right(Chunk(APP,PORT))

Attributes

Companion
object
Source
ConfigProvider.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def apply[A](path: Chunk[String]): Either[Error, Chunk[String]]

Applies this patch to path. It fails with Config.Error.MissingData when an unnested step finds a path that does not start with its name.

Applies this patch to path. It fails with Config.Error.MissingData when an unnested step finds a path that does not start with its name.

Attributes

Source
ConfigProvider.scala

Returns this patch followed by applying f to each name of the path.

Returns this patch followed by applying f to each name of the path.

Attributes

Source
ConfigProvider.scala
def nested(name: String): PathPatch

Returns this patch followed by putting name in front of the path.

Returns this patch followed by putting name in front of the path.

Attributes

Source
ConfigProvider.scala
def unnested(name: String): PathPatch

Returns this patch followed by removing name from the front of the path.

Returns this patch followed by removing name from the front of the path.

Attributes

Source
ConfigProvider.scala