TegralApplicationDsl

DSL interface for configurating Tegral applications.

Inheritors

Properties

Link copied to clipboard
abstract val configSources: MutableList<ConfigSource>

List of all the Hoplite configuration sources that will be used to load this application.

Functions

Link copied to clipboard

Applies sane defaults to the given application builder. Specifically, this function:

Link copied to clipboard
abstract fun <T> install(featureBuilder: FeatureBuilder<T>)

Adds a feature that will be installed in the application upon build.

Link copied to clipboard

Install the feature onto this application.

fun <T> TegralApplicationDsl.install(feature: Feature<T>, configBlock: T.(FeatureContext) -> Unit)

Install the feature onto this application, additionally configuring it with the provided lambda.

Link copied to clipboard
abstract fun meta(action: ContextBuilderDsl.() -> Unit)
Link copied to clipboard
abstract fun <T : Any> put(declaration: Declaration<T>)
Link copied to clipboard
abstract fun useConfiguration(configuration: ConfigLoaderBuilder.() -> Unit)

Configures the ConfigLoaderBuilder used to load application configuration using the given lambda.

Link copied to clipboard
abstract fun <T : RootConfig> useConfigurationClass(configClass: KClass<T>, configuration: ConfigLoaderBuilder.() -> Unit = {})

Sets the class to use for loading the configuration classes and optionally applies custom logic to the Hoplite ConfigLoaderBuilder instance.

Link copied to clipboard
inline fun <T : RootConfig> TegralApplicationDsl.useConfigurationType(noinline configuration: ConfigLoaderBuilder.() -> Unit = {})

Equivalent to TegralApplicationDsl.useConfigurationClass, but uses a reified type instead.