CrossClj

0.4.0 docs

SourceDocs



RECENT
    VARS
    +default-options+
    ->Dispatcher
    ->Interceptor
    ->Namespace
    all-handlers
    any-type-resolver
    available-handlers
    check
    coerce!
    coercion
    collect
    collect-and-enrich
    Collector
    Context
    context-copy
    context-dissoc
    default-type-resolver
    dispatch
    dispatch-handlers
    dispatcher
    execute-handler
    extract-interceptors
    filter-by-path
    Function
    get-dispatcher
    get-handler
    Handler
    handler
    handler?
    initialize
    inject
    input-coerce!
    interceptor
    InterceptorLike
    interceptors
    invalid-action!
    invoke
    invoke?
    KeywordMap
    map->Dispatcher
    map->Interceptor
    map->Namespace
    map-handlers
    memoized-coercer
    namespace
    Options
    public-handler
    some-handler
    strict-map->Dispatcher
    strict-map->Namespace
    stringify-schema
    transform-handlers
    type-resolver
    user-meta
    validate
    validate-or-invoke?
    with-context
    with-input-coercion
    with-input-schema
    with-string-name

    « Index of all namespaces of this project

    (->Dispatcher handlers context coercion meta)
    Positional factory function for class kekkonen.core.Dispatcher.
    
    (->Interceptor name input output enter leave error)
    Positional factory function for class kekkonen.core.Interceptor.
    
    (->Namespace name meta)
    Positional factory function for class kekkonen.core.Namespace.
    
    (all-handlers dispatcher prefix)
    Inputs: [dispatcher :- Dispatcher prefix :- (s/maybe s/Keyword)]
    Returns: [Handler]
    
    Returns all handlers filtered by namespace
    (any-type-resolver meta)
    Inputs: [meta]
    
    (available-handlers dispatcher prefix context)
    Inputs: [dispatcher :- Dispatcher prefix :- (s/maybe s/Keyword) context :- Context]
    Returns: [Handler]
    
    Returns all available handlers based on namespace and context
    (check dispatcher action)(check dispatcher action context)
    Inputs: ([dispatcher :- Dispatcher action :- s/Keyword] [dispatcher :- Dispatcher action :- s/Keyword context :- Context])
    
    Checks an action handler with the given context.
    (coerce! schema matcher value in type)
    (coercion data)
    (collect collector type-resolver)
    Inputs: [collector type-resolver]
    
    Private
    (collect-and-enrich {:keys [handlers type-resolver meta interceptors]})
    protocol
    (-collect this type-resolver)
    (context-copy from to)
    Inputs: [from :- [s/Any] to :- [s/Any]]
    
    Returns a function that assocs in a value from to-kws path into from-kws in a context
    (context-dissoc from-kws)
    Inputs: [from-kws :- [s/Any]]
    
    (dispatch dispatcher mode action context)
    (dispatch-handlers dispatcher mode prefix context)
    Inputs: [dispatcher :- Dispatcher mode :- (s/enum :check :validate) prefix :- (s/maybe s/Keyword) context :- Context]
    Returns: {Handler s/Any}
    
    Returns a map of action -> errors based on mode, namespace and context.
    (dispatcher options)
    Inputs: [options :- Options]
    Returns: Dispatcher
    
    Creates a Dispatcher
    Private
    (extract-interceptors meta metas)
    Private
    (filter-by-path handlers path)
    (get-dispatcher context)
    Inputs: [context :- Context]
    
    (get-handler context)
    Inputs: [context :- Context]
    
    (handler meta)(handler meta f)
    Inputs: ([meta :- KeywordMap] [meta :- KeywordMap f :- Function])
    
    Private
    (initialize context dispatcher handler mode)
    (inject dispatcher handlers)
    Inputs: [dispatcher :- Dispatcher handlers :- (s/constrained s/Any (complement nil?) (quote not-nil))]
    
    Injects handlers into an existing Dispatcher
    (input-coerce! context schema)(input-coerce! context schema key->matcher)
    (interceptor interceptor-or-a-function)
    (interceptors data)
    Private
    (invalid-action! action)
    (invoke dispatcher action)(invoke dispatcher action context)
    Inputs: ([dispatcher :- Dispatcher action :- s/Keyword] [dispatcher :- Dispatcher action :- s/Keyword context :- Context])
    
    Invokes an action handler with the given context.
    (map->Dispatcher m36525)
    Factory function for class Dispatcher, taking a map of keywords to field values, but not much
    slower than ->x like the clojure.core version.
    (performance is fixed in Clojure 1.7, so this should eventually be removed.)
    (map->Interceptor m__7585__auto__)
    Factory function for class kekkonen.core.Interceptor, taking a map of keywords to field values.
    
    (map->Namespace m36331)
    Factory function for class Namespace, taking a map of keywords to field values, but not much
    slower than ->x like the clojure.core version.
    (performance is fixed in Clojure 1.7, so this should eventually be removed.)
    Private
    (map-handlers dispatcher mode prefix context success failure)
    (namespace meta)
    Inputs: [meta :- KeywordMap]
    
    (public-handler handler)
    Inputs: [handler :- Handler]
    
    (some-handler dispatcher action)
    Inputs: [dispatcher action :- s/Keyword]
    Returns: (s/maybe Handler)
    
    Returns a handler or nil
    (strict-map->Dispatcher m36526 & [drop-extra-keys?__27929__auto__])
    Factory function for class Dispatcher, taking a map of keywords to field values.  All keys are required, and no extra keys are allowed.  Even faster than map->
    
    (strict-map->Namespace m36332 & [drop-extra-keys?__27929__auto__])
    Factory function for class Namespace, taking a map of keywords to field values.  All keys are required, and no extra keys are allowed.  Even faster than map->
    
    (stringify-schema schema)
    (transform-handlers dispatcher f)
    Inputs: [dispatcher :- Dispatcher f :- Function]
    
    Applies f to all handlers. If the call returns nil,
    the handler is removed.
    (type-resolver & types)
    Inputs: [& types :- [s/Keyword]]
    
    Private
    (user-meta meta)
    Inputs: [meta :- KeywordMap]
    
    (validate dispatcher action)(validate dispatcher action context)
    Inputs: ([dispatcher :- Dispatcher action :- s/Keyword] [dispatcher :- Dispatcher action :- s/Keyword context :- Context])
    
    Checks if context is valid for the handler (without calling the body).
    Returns nil or throws an exception.
    (with-context dispatcher context)
    Inputs: [dispatcher :- Dispatcher context :- Context]
    
    Private
    (with-input-coercion interceptor)
    Private
    (with-input-schema interceptor)
    Private
    (with-string-name interceptor)