KtorController

abstract class KtorController(priority: Int = DEFAULT_CONTROLLER_PRIORITY, val restrictToAppName: String? = null) : KtorModule

Identical to KtorModule, but allows you to directly add routes, as if calling routing in a KtorModule.

Constructors

Link copied to clipboard
fun KtorController(priority: Int = DEFAULT_CONTROLLER_PRIORITY, restrictToAppName: String? = null)

Functions

Link copied to clipboard
open override fun Application.install()

Install this module on the given application.

abstract fun Routing.install()

Install this controller's routes. You can call route, get, etc here.

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