Environment

interface Environment

This models the runtime environment of the shell where the app is running. Optionally pass a separator to use for multi-values otherwise a standard comma is used - this means you MUST override the separator if you have single values which contain commas, otherwise singular environment keys will just retrieve the first value.

Inheritors

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open val separator: String

Functions

Link copied to clipboard
abstract operator fun get(key: String): String?
abstract operator fun <T> get(key: LensExtractor<Environment, T>): T
Link copied to clipboard
abstract fun keys(): Set<String>
Link copied to clipboard
abstract operator fun minus(key: String): Environment
Link copied to clipboard
open infix fun overrides(that: Environment): Environment

Overlays the configuration set in this Environment on top of the values in the passed Environment. Used to chain: eg. Local File -> System Properties -> Env Properties -> Defaults

Link copied to clipboard
abstract operator fun set(key: String, value: String): Environment
Link copied to clipboard
fun Environment.with(vararg modifiers: (Environment) -> Environment): Environment