Module

data class Module(name: String, allowSilentOverride: Boolean, prefix: String, init: DI.Builder.() -> Unit)

A module is constructed the same way as in DI is:

val module = DI.Module {
bind<DataSource>() with singleton { SqliteDS.open("path/to/file") }
}

Constructors

Module
Link copied to clipboard
fun Module(allowSilentOverride: Boolean = false, init: DI.Builder.() -> Unit)
Module
Link copied to clipboard
fun Module(name: String, allowSilentOverride: Boolean = false, prefix: String = "", init: DI.Builder.() -> Unit)

Properties

allowSilentOverride
Link copied to clipboard
val allowSilentOverride: Boolean = false

Whether this module is allowed to non-explicit overrides.

init
Link copied to clipboard
val init: DI.Builder.() -> Unit

The block of configuration for this module.

name
Link copied to clipboard
val name: String

The name of this module (for debug).

prefix
Link copied to clipboard
val prefix: String