nee-ctx-web-ktor
Module Contents
alltypes
Module Contents
sealed class ApiError
interface ApplicationContextProvider<CTX, LOCAL>
abstract class BaseWebContextProvider<R, G : TxProvider<R, G>> : WebContextProvider<R, G>
object BasicAuth
class BasicAuthProvider<USERID, ROLE> : SecurityProvider<USERID, ROLE>
object DefaultErrorHandler : ErrorHandler
object DefaultJacksonMapper
class EffectsInstance<R, G : TxProvider<R, G>>
Module Contents
EffectsInstance()
val async: Effect<WebContext<R, G>, Nothing>
fun cache(): Cache<R, G>
class Cache<R, G : TxProvider<R, G>>
val nop: Effect<WebContext<R, G>, Nothing>
val plainFx: PlainInstances<R, G>
class PlainInstances<R, G : TxProvider<R, G>>
fun secured(roles: List<UserRole>): Effect<WebContext<R, G>, SecurityError>
val trace: TraceEffect<WebContext<R, G>>
val tx: Effect<WebContext<R, G>, TxError>
typealias ErrorHandler = (Any) -> OutgoingContent
class InitialRouting<R, G : TxProvider<R, G>> : Routing<R, G>
abstract class JDBCBasedWebContextProvider : BaseWebContextProvider<Connection, JDBCProvider>
class JwtAuthProvider<USER, ROLE> : SecurityProvider<USER, ROLE>
data class OauthLoginData
class OauthSupportApi
class RenderHelper : Logging
class RouteBuilder<R, G : TxProvider<R, G>>
sealed class Routing<R, G : TxProvider<R, G>>
data class RoutingDef<R, G : TxProvider<R, G>> : Routing<R, G>
class TokenSecurityContext<USER, ROLE> : SecurityCtx<USER, ROLE>
data class WebContext<R, G : TxProvider<R, G>> : TxProvider<R, WebContext<R, G>>, SecurityProvider<User, UserRole>, ExecutionContextProvider, TraceProvider<WebContext<R, G>>, TimeProvider, Logging, AsyncSupport<WebContext<R, G>>
Module Contents
WebContext(jdbcProvider: TxProvider<R, G>, securityProvider: SecurityProvider<User, UserRole>, executionContextProvider: ExecutionContextProvider, errorHandler: ErrorHandler = DefaultErrorHandler, contextProvider: WebContextProvider<R, G>, traceProvider: TraceProvider<*>, timeProvider: TimeProvider, applicationCall: ApplicationCall, asyncEnv: AsyncEnvWrapper<WebContext<R, G>> = AsyncEnvWrapper())
fun getConnection(): TxConnection<R>
fun getTrace(): TraceResource
suspend fun <E, A> serveMessage(msg: Out<E, A>): Unit
suspend fun serveMessage(businessFunction: ANee<WebContext<R, G>, Any>): Unit
suspend fun serveText(businessFunction: ANee<WebContext<R, G>, String>): Unit
fun setConnectionState(newState: TxConnection<R>): WebContext<R, G>
fun setTrace(newState: TraceResource): WebContext<R, G>
interface WebContextProvider<R, G : TxProvider<R, G>>
Module Contents
open fun <E, A> async(func: () -> Nee<WebContext<R, G>, E, A>): Nee<WebContext<R, G>, Any, A>
abstract fun create(call: ApplicationCall): WebContext<R, G>
abstract fun fx(): EffectsInstance<R, G>
open fun healthCheck(): Route.() -> Unit
abstract fun jacksonMapper(): ObjectMapper
open fun monitoringApi(): Route.() -> Unit
open fun routeBuilder(): RouteBuilder<R, G>
open fun sysApi(): Route.() -> Unit
open fun userSecurityApi(): Route.() -> Unit
package dev.neeffect.nee.ctx.web
Module Contents
interface ApplicationContextProvider<CTX, LOCAL>
abstract class BaseWebContextProvider<R, G : TxProvider<R, G>> : WebContextProvider<R, G>
object BasicAuth
class BasicAuthProvider<USERID, ROLE> : SecurityProvider<USERID, ROLE>
object DefaultErrorHandler : ErrorHandler
object DefaultJacksonMapper
class EffectsInstance<R, G : TxProvider<R, G>>
Module Contents
EffectsInstance()
val async: Effect<WebContext<R, G>, Nothing>
fun cache(): Cache<R, G>
class Cache<R, G : TxProvider<R, G>>
val nop: Effect<WebContext<R, G>, Nothing>
val plainFx: PlainInstances<R, G>
class PlainInstances<R, G : TxProvider<R, G>>
fun secured(roles: List<UserRole>): Effect<WebContext<R, G>, SecurityError>
val trace: TraceEffect<WebContext<R, G>>
val tx: Effect<WebContext<R, G>, TxError>
typealias ErrorHandler = (Any) -> OutgoingContent
abstract class JDBCBasedWebContextProvider : BaseWebContextProvider<Connection, JDBCProvider>
data class WebContext<R, G : TxProvider<R, G>> : TxProvider<R, WebContext<R, G>>, SecurityProvider<User, UserRole>, ExecutionContextProvider, TraceProvider<WebContext<R, G>>, TimeProvider, Logging, AsyncSupport<WebContext<R, G>>
Module Contents
WebContext(jdbcProvider: TxProvider<R, G>, securityProvider: SecurityProvider<User, UserRole>, executionContextProvider: ExecutionContextProvider, errorHandler: ErrorHandler = DefaultErrorHandler, contextProvider: WebContextProvider<R, G>, traceProvider: TraceProvider<*>, timeProvider: TimeProvider, applicationCall: ApplicationCall, asyncEnv: AsyncEnvWrapper<WebContext<R, G>> = AsyncEnvWrapper())
fun getConnection(): TxConnection<R>
fun getTrace(): TraceResource
suspend fun <E, A> serveMessage(msg: Out<E, A>): Unit
suspend fun serveMessage(businessFunction: ANee<WebContext<R, G>, Any>): Unit
suspend fun serveText(businessFunction: ANee<WebContext<R, G>, String>): Unit
fun setConnectionState(newState: TxConnection<R>): WebContext<R, G>
fun setTrace(newState: TraceResource): WebContext<R, G>
interface WebContextProvider<R, G : TxProvider<R, G>>
Module Contents
open fun <E, A> async(func: () -> Nee<WebContext<R, G>, E, A>): Nee<WebContext<R, G>, Any, A>
abstract fun create(call: ApplicationCall): WebContext<R, G>
abstract fun fx(): EffectsInstance<R, G>
open fun healthCheck(): Route.() -> Unit
abstract fun jacksonMapper(): ObjectMapper
open fun monitoringApi(): Route.() -> Unit
open fun routeBuilder(): RouteBuilder<R, G>
open fun sysApi(): Route.() -> Unit
open fun userSecurityApi(): Route.() -> Unit
package dev.neeffect.nee.ctx.web.jwt
package dev.neeffect.nee.ctx.web.oauth
package dev.neeffect.nee.ctx.web.pure
Module Contents
inline fun <reified A : Any, R, G : TxProvider<R, G>> RouteBuilder<R, G>.delete(path: String = "", crossinline f: (ApplicationCall) -> Nee<WebContext<R, G>, Any, A>): RoutingDef<R, G>
inline fun <reified A : Any, R, G : TxProvider<R, G>> RouteBuilder<R, G>.get(path: String = "", crossinline f: (ApplicationCall) -> Nee<WebContext<R, G>, Any, A>): RoutingDef<R, G>
inline fun <reified A : Any, R, G : TxProvider<R, G>> RouteBuilder<R, G>.head(path: String = "", crossinline f: (ApplicationCall) -> Nee<WebContext<R, G>, Any, A>): RoutingDef<R, G>
class InitialRouting<R, G : TxProvider<R, G>> : Routing<R, G>
inline fun <R, G : TxProvider<R, G>> RouteBuilder<R, G>.nested(path: String = "", crossinline f: (Routing<R, G>) -> RoutingDef<R, G>): RoutingDef<R, G>
inline fun <reified A : Any, R, G : TxProvider<R, G>> RouteBuilder<R, G>.options(path: String = "", crossinline f: (ApplicationCall) -> Nee<WebContext<R, G>, Any, A>): RoutingDef<R, G>
inline fun <reified A : Any, R, G : TxProvider<R, G>> RouteBuilder<R, G>.patch(path: String = "", crossinline f: (ApplicationCall) -> Nee<WebContext<R, G>, Any, A>): RoutingDef<R, G>
inline fun <reified A : Any, R, G : TxProvider<R, G>> RouteBuilder<R, G>.post(path: String = "", crossinline f: (ApplicationCall) -> Nee<WebContext<R, G>, Any, A>): RoutingDef<R, G>
inline fun <reified A : Any, R, G : TxProvider<R, G>> RouteBuilder<R, G>.put(path: String = "", crossinline f: (ApplicationCall) -> Nee<WebContext<R, G>, Any, A>): RoutingDef<R, G>
class RouteBuilder<R, G : TxProvider<R, G>>
sealed class Routing<R, G : TxProvider<R, G>>
data class RoutingDef<R, G : TxProvider<R, G>> : Routing<R, G>
fun <R, G : TxProvider<R, G>> startNettyServer(port: Int, mapper: ObjectMapper, webContextProvider: WebContextProvider<R, G>, aRouting: (Routing<R, G>) -> RoutingDef<R, G>): IO<Unit>
package dev.neeffect.nee.ctx.web.util