Package-level declarations

Types

Link copied to clipboard
annotation class KWebDSL
Link copied to clipboard
data class NotFoundException(val message: String) : Exception
Link copied to clipboard
open class Stack(prefix: String?)

This is the base stack object used in the compiled io.kweb.util.Template.

Link copied to clipboard
class Template(template: String, replaceables: String) : Stack

A fast, lightweight string templating system with zero dependencies.

Properties

Link copied to clipboard
val Boolean.json: JsonPrimitive
val Number.json: JsonPrimitive
val String.json: JsonPrimitive
Link copied to clipboard
Link copied to clipboard
val <T : Any> KClass<T>.pkg: String
Link copied to clipboard

Created by ian on 1/7/17.

Functions

Link copied to clipboard
fun createNonce(length: Int = 6): String
Link copied to clipboard
Link copied to clipboard

Dump a stacktrace generated by a user-supplied lambda, but attempt to remove irrelevant lines to the trace. This is a little ugly but seems to work well, there may be a better approach.

Link copied to clipboard
fun <T> warnIfBlocking(maxTimeMs: Long, onBlock: (Thread) -> Unit, f: () -> T): T