ConfigKey

interface ConfigKey<T : Any>

Typed handle for a configuration file/document.

Parameters

T

strongly-typed config object type

Properties

Link copied to clipboard
abstract val codec: ConfigCodec<T>

Codec used to parse and serialize this config.

Link copied to clipboard
abstract val id: String

Stable identifier for the config (often a filename without extension).

Link copied to clipboard

Migrations to apply when stored config version is older than version.

Link copied to clipboard
abstract val version: Int

Current schema version for this config.

Functions

Link copied to clipboard
abstract fun defaultValue(): T

Default value used when config is missing or cannot be loaded.