CrossClj

0.1.2 docs

SourceDocs



RECENT
    VARS
    ->Match
    ->PartialMatch
    compile-route
    compile-routes
    conflicting-routes
    conflicts-str
    default-router-options
    Expand
    find-names
    linear-router
    lookup-router
    map->Match
    map->PartialMatch
    map-data
    match-by-name!
    merge-data
    mixed-router
    name-lookup
    partial-match?
    resolve-routes
    route-info
    Router
    router
    router?
    segment-router
    single-static-path-router
    throw-on-conflicts!
    walk

    « Index of all namespaces of this project

    (->Match template data result path-params path)
    Positional factory function for class reitit.core.Match.
    
    (->PartialMatch template data result path-params required)
    Positional factory function for class reitit.core.PartialMatch.
    
    Private
    (compile-route [p m :as route] {:keys [compile], :as opts})
    Private
    (compile-routes routes opts)
    (conflicting-routes routes)
    (conflicts-str conflicts)
    protocol
    (expand this opts)
    (find-names routes _)
    (linear-router routes)(linear-router routes opts)
    Creates a linear-router from resolved routes and optional
    expanded options. See [[router]] for available options
    (lookup-router routes)(lookup-router routes opts)
    Creates a lookup-router from resolved routes and optional
    expanded options. See [[router]] for available options
    (map->Match m__7585__auto__)
    Factory function for class reitit.core.Match, taking a map of keywords to field values.
    
    (map->PartialMatch m__7585__auto__)
    Factory function for class reitit.core.PartialMatch, taking a map of keywords to field values.
    
    (map-data f routes)
    (match-by-name! this name)(match-by-name! this name path-params)
    (mixed-router routes)(mixed-router routes opts)
    Creates two routers: [[lookup-router]] or [[single-static-path-router]] for
    static routes and [[segment-router]] for wildcard routes. All
    routes should be non-conflicting. Takes resolved routes and optional
    expanded options. See [[router]] for options.
    (name-lookup [_ {:keys [name]}] _)
    (partial-match? x)
    (resolve-routes raw-routes {:keys [coerce], :as opts})
    (route-info route)
    protocol
    (match-by-name this name)(match-by-name this name path-params)
    (match-by-path this path)
    (options this)
    (route-names this)
    (router-name this)
    (routes this)
    (router raw-routes)(router raw-routes opts)
    Create a [[Router]] from raw route data and optionally an options map.
    Selects implementation based on route details. The following options
    are available:
    
    | key          | description |
    | -------------|-------------|
    | :path      | Base-path for routes
    | :routes    | Initial resolved routes (default [])
    | :data      | Initial route data (default {})
    | :spec      | clojure.spec definition for a route data, see reitit.spec on how to use this
    | :expand    | Function of `arg opts => data` to expand route arg to route data (default reitit.core/expand)
    | :coerce    | Function of `route opts => route` to coerce resolved route, can throw or return nil
    | :compile   | Function of `route opts => result` to compile a route handler
    | :validate  | Function of `routes opts => ()` to validate route (data) via side-effects
    | :conflicts | Function of `{route #{route}} => ()` to handle conflicting routes (default reitit.core/throw-on-conflicts!)
    | :router    | Function of `routes opts => router` to override the actual router implementation
    (segment-router routes)(segment-router routes opts)
    Creates a special prefix-tree style segment router from resolved routes and optional
    expanded options. See [[router]] for available options
    (single-static-path-router routes)(single-static-path-router routes opts)
    Creates a fast router of 1 static route(s) and optional
    expanded options. See [[router]] for available options
    (throw-on-conflicts! conflicts)
    (walk raw-routes {:keys [path data routes expand], :or {data [], routes [], expand expand}, :as opts})