LEVIATHAN v962456e · 962456eee1

atlantis · Routing

class Router

since 0.1.0-alpha.1linux

Fields

finalized

bool finalized

handlersByKey

Map<string, (Http::Context) => HttpResponse> handlersByKey

keyIndex

Map<string, int> keyIndex

pendingAuthMode

Map<string, int> pendingAuthMode

pendingAuthRole

Map<string, string> pendingAuthRole

root

routeList

Array<RouteRec> routeList

Methods

authModeOf

authModeOf(string key) -> int

authRoleOf

authRoleOf(string key) -> string

checkParamCoverage

checkParamCoverage(RouteRec rec) -> void

dispatchHandler

dispatchHandler() -> (Http::Context) => HttpResponse

extractParams

extractParams(string routePath, Array<string> segs) -> Map<string, string>

finalize

finalize(string authDefault) -> void

handlerOf

handlerOf(string key) -> (Http::Context) => HttpResponse

markAuth

markAuth(string controller, string action, int mode, string role) -> void

matchNode

matchNode(RouteNode node, Array<string> segs, int i) -> RouteNode | None

recOf

recOf(string key) -> RouteRec

record

record(RouteRec rec, (Http::Context) => HttpResponse h) -> Router

resolve

resolve(string verb, string rawPath) -> MatchResult

resolveMiddleware

resolveMiddleware() -> (Http::Context, (Http::Context) => HttpResponse) => HttpResponse

routes

routes() -> Array<RouteRec>