CrossClj

1.2.0 docs

SourceDocs


project

docs index

NAMESPACES
clojurewerkz
route-one

RECENT
    VARS
    *base-url*
    ->Route
    defroute
    map->Route
    path-for
    replace-segments
    required-parts
    route
    slash
    slash-re
    url-for
    validate-keys
    with-base-url

    « Index of all namespaces of this project

    (->Route path name helper opts)
    Positional factory function for class clojurewerkz.route_one.core.Route.
    
    macro
    (defroute n pattern defaults?)
    (map->Route m__7585__auto__)
    Factory function for class clojurewerkz.route_one.core.Route, taking a map of keywords to field values.
    
    (path-for s data)
    Generates a regular path, replacing segments that start with a
    colon with respective values from the data map. Any key/vals in data
    that don't appear as segments in s are appended as a query string.
    (replace-segments s data)
    Replaces segments that start with a colon with respective values from the data map.
    
    Example: ("/docs/title" { :title "ohai" }) ;; => "/docs/title"
    (required-parts s)
    (route v path & {:as opts})
    Defines an individual route.
    
    Example:
    
    (route "/about" :named "about page")
    (route "/faq")
    (route "/help"  :named "help page")
    (route "/docs/:title" :named "documents")
    (url-for s data)
    Like path-for but generates full URLs. Use together with with-base-url.
    
    (validate-keys s data)
    macro
    (with-base-url s & body)