Package-level declarations

Types

Link copied to clipboard
data class ConstructorParamInfo(val name: String, val type: String, val hasDefault: Boolean)
Link copied to clipboard
interface KComposable
Link copied to clipboard
open class KCompose(val render: @Composable () -> Unit) : KResponse

Classes implementing this interface will result in Kobol creating Composables. You can create data classes that @see KResponse

Link copied to clipboard
interface KGet<T : KResponse>

Implement this interface in your data classes to use them as a response body of posts and gets in Ktor

Link copied to clipboard
@Serializable
open class KJsonResponse : KResponse
Link copied to clipboard
open class KMenu<T>(val text: String = "", val expanded: Boolean = false, val render: ComposableLambda = {}, val onClick: (T) -> Unit = {})

You can use this class to build menus where a sealed class is the top level and sealed subclasses are menu items. //TODO icons, breaks, modifiers

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class Kobold
Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class KoboldStatic(val path: String)
Link copied to clipboard
interface KPost<T : KRequest, R : KResponse>

Implement this interface in your data classes to use them as a request body of posts and puts in Ktor

Link copied to clipboard
interface KRequest
Link copied to clipboard
interface KResponse
Link copied to clipboard
interface KStatic
Link copied to clipboard
interface KWeb<T>

Functions

Link copied to clipboard
inline fun <T : KRequest, R : KResponse> KPost<T, R>.getPostBodyClass(): KClass<T>
Link copied to clipboard
Link copied to clipboard

This is added to compose generation so at runtime we can interrogate data classes for defaults