KtorModule

abstract class KtorModule(val moduleInstallationPriority: Int = DEFAULT_MODULE_PRIORITY, val restrictToAppName: String? = null)

A Ktor module that will be automatically installed to a corresponding KtorApplication with a matching app name.

If you wish to add a controller (a module that only calls routing and adds routes), consider using KtorController instead.

Constructors

Link copied to clipboard
fun KtorModule(moduleInstallationPriority: Int = DEFAULT_MODULE_PRIORITY, restrictToAppName: String? = null)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
abstract fun Application.install()

Install this module on the given application.

Properties

Link copied to clipboard

The installation priority of this module within the application. Modules are installed from largest to smallest priority. The default value is available in the DEFAULT_*_PRIORITY constants.

Link copied to clipboard

The application name that this module should be installed in. This should correspond to the application name specified in KtorApplication.appName

Inheritors

Link copied to clipboard