Package guru.zoroark.tegral.web.controllers

Types

Link copied to clipboard
abstract class KtorApplication(scope: InjectionScope, val appName: String? = null) : TegralService

Superclass for Ktor applications that use Tegral Web Application.

Link copied to clipboard
class KtorApplicationSettings<TEngine : ApplicationEngine, TConfiguration : ApplicationEngine.Configuration>(    val engine: ApplicationEngineFactory<TEngine, TConfiguration>,     val port: Int = 80,     val host: String = "0.0.0.0",     val watchPaths: List<String> = listOf(File(".").canonicalPath),     configure: TConfiguration.() -> Unit = {})

Application settings for the Ktor application. Identical to the parameters of the embeddedServer function from Ktor.

Link copied to clipboard
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.

Link copied to clipboard
class KtorExtension(scope: InjectionScope) : DeclarationsProcessor

The Ktor extension object that is injected into the meta-environment. Keeps track of implementations of KtorModule subclasses (incl. KtorController subclasses) within the main environment.

Link copied to clipboard
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.

Link copied to clipboard
object WebControllersFeature : Feature

Feature object for Tegral Web Controllers.

Functions

Link copied to clipboard
inline fun <T : Any> Sequence<Identifier<*>>.filterIsKclassSubclassOf(): List<Identifier<out T>>

Utility functions that filters declarations to only those that are subclasses of KtorModule, and returns a properly typed list for them.

Link copied to clipboard
fun InjectionEnvironment.getKtorModulesByPriority(allIdentifiers: List<Identifier<out KtorModule>>, appName: String?): List<KtorModule>

Retrieves all implementations of KtorModule subclasses in the given environment, sorted by decreasing priority.