kvision / pl.treksoft.kvision.remote

Package pl.treksoft.kvision.remote

A set of components for creating multiplatform automatic JSON-RPC connectivity with a backend server.

Types

CallAgent

open class CallAgent

An agent responsible for remote calls.

CallModule

class CallModule

Credentials

data class Credentials

Username and password credentials.

JSON

object JSON

JSON utility functions

KVController

open class KVController

KVRemoteAgent

open class KVRemoteAgent<T : Any> : RemoteAgent

Client side agent for JSON-RPC remote calls.

KVServiceManager

open actual class KVServiceManager<T : Any>

Multiplatform service manager.

LoginService

class LoginService

Form login dispatcher.

MainModule

class MainModule

Object

external class Object

JavaScript Object type

Profile

data actual class Profile

A user profile.

RemoteAgent

interface RemoteAgent

Interface for client side agent for JSON-RPC remote calls.

SecurityMgr

abstract class SecurityMgr

Form login dispatcher.

Exceptions

SecurityException

class SecurityException : Exception

A security exception.

Type Aliases

Profile

actual typealias Profile = <ERROR CLASS>

A user profile.

Properties

HTTP_UNAUTHORIZED

const val HTTP_UNAUTHORIZED: Int

HTTP status unauthorized (401).

injector

val <ERROR CLASS>.injector: <ERROR CLASS>

injectorKey

val injectorKey: <ERROR CLASS>

Functions

addPathPatternsFromServices

fun <ERROR CLASS>.addPathPatternsFromServices(services: List<KVServiceManager<*>>): Unit

applyRoutes

fun <T : Any> <ERROR CLASS>.applyRoutes(serviceManager: KVServiceManager<T>): Unit

kvisionInit

fun <ERROR CLASS>.kvisionInit(): Unit
fun <ERROR CLASS>.kvisionInit(vararg modules: <ERROR CLASS>): Unit

obj

fun obj(init: dynamic.() -> Unit): dynamic

Helper function for creating JavaScript objects.

withProfile

suspend fun <RESP> <ERROR CLASS>.withProfile(block: suspend (Profile) -> RESP): RESP
suspend fun <RESP> withProfile(block: suspend (Profile) -> RESP): RESP

A helper extension function for processing with authenticated user profile.

writeJSON

fun <ERROR CLASS>.writeJSON(json: String): Unit