Types
UrlPattern = tuple[route: string, matcher: HandlerAsync, httpMethod: seq[HttpMethod], name: string, middlewares: seq[HandlerAsync]]
- Source Edit
Procs
func `$`(node: PatternNode): string {....raises: [], tags: [], forbids: [].}
- Source Edit
func `$`(piece: BasePatternNode): string {....raises: [], tags: [], forbids: [].}
- Source Edit
func addRoute(router: Router; route: string; httpMethod: HttpMethod; handler: HandlerAsync; middlewares: seq[HandlerAsync]) {. ...raises: [RouteError, KeyError, DuplicatedRouteError], tags: [], forbids: [].}
- Add a new mapping to the given Router instance. Source Edit
func findHandler(ctx: Context): PathHandler {.inline, ...raises: [KeyError], tags: [RootEffect], forbids: [].}
- fixed route -> params route -> regex route Follow the order of addition. Source Edit
func findHandler(ctx: Context; reqMethod: HttpMethod; path: string): Option[ PathHandler] {.inline, ...raises: [KeyError], tags: [], forbids: [].}
- Simple wrapper around the regular route function. Source Edit
func initRePath(route: Regex; httpMethod = HttpGet): RePath {.inline, ...raises: [], tags: [], forbids: [].}
- Source Edit
func newPathHandler(handler: HandlerAsync; middlewares: seq[HandlerAsync]): PathHandler {. inline, ...raises: [], tags: [], forbids: [].}
- Source Edit
func newReRouter(): ReRouter {.inline, ...raises: [], tags: [], forbids: [].}
- Source Edit
func pattern(route: string; handler: HandlerAsync; httpMethod = HttpGet; name = ""; middlewares: openArray[HandlerAsync] = @[]): UrlPattern {. inline, ...raises: [], tags: [], forbids: [].}
- Source Edit
func pattern(route: string; handler: HandlerAsync; httpMethod: openArray[HttpMethod]; name = ""; middlewares: openArray[HandlerAsync] = @[]): UrlPattern {.inline, ...raises: [], tags: [], forbids: [].}
- Source Edit
func printRoutingTree(router: Router) {....raises: [], tags: [], forbids: [].}
- Prints the route. Source Edit
func stripRoute(route: string): string {.inline, ...raises: [], tags: [], forbids: [].}
- Source Edit