Locations
open class Locations(application: Application, routeService: LocationRouteService)
Content copied to clipboard
Ktor plugin that allows to handle and construct routes in a typed way.
You have to create data classes/objects representing parameterized routes and annotate them with Location. Then you can register sub-routes and handlers for those locations and create links to them using Locations.href.
Constructors
Link copied to clipboard
Creates Locations service extracting path information from @Location annotation
Link copied to clipboard
fun Locations(application: Application, routeService: LocationRouteService)
Content copied to clipboard
Types
Link copied to clipboard
Configuration for Locations.
Link copied to clipboard
object Plugin : BaseApplicationPlugin<Application, Locations.Configuration, Locations>
Content copied to clipboard
Installable plugin for Locations.
Functions
Link copied to clipboard
Creates all necessary routing entries to match specified locationClass.
Link copied to clipboard
Resolves parameters to an instance of specified T.
fun <T : Any> resolve(locationClass: KClass<*>, parameters: Parameters): T
Content copied to clipboard
Resolves parameters to an instance of specified locationClass.
fun <T : Any> resolve(locationClass: KClass<*>, call: ApplicationCall): T
Content copied to clipboard
Resolves parameters in a call to an instance of specified locationClass.