(all-handlers dispatcher prefix)
Inputs: [dispatcher :- Dispatcher prefix :- (s/maybe s/Keyword)] Returns: [Handler]
Returns all handlers filtered by namespace
Inputs: [dispatcher :- Dispatcher prefix :- (s/maybe s/Keyword)] Returns: [Handler] Returns all handlers filtered by namespace
(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
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.
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]
Inputs: [collector type-resolver]
(-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
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]]
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.
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
Inputs: [options :- Options] Returns: Dispatcher Creates a Dispatcher
(get-dispatcher context)
Inputs: [context :- Context]
Inputs: [context :- Context]
(get-handler context)
Inputs: [context :- Context]
Inputs: [context :- Context]
(handler meta)
(handler meta f)
Inputs: ([meta :- KeywordMap] [meta :- KeywordMap f :- Function])
Inputs: ([meta :- KeywordMap] [meta :- KeywordMap f :- Function])
(handler? x)
(inject dispatcher handlers)
Inputs: [dispatcher :- Dispatcher handlers :- (s/constrained s/Any (complement nil?) (quote not-nil))]
Injects handlers into an existing Dispatcher
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)
(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.
Inputs: ([dispatcher :- Dispatcher action :- s/Keyword] [dispatcher :- Dispatcher action :- s/Keyword context :- Context]) Invokes an action handler with the given context.
(public-handler handler)
Inputs: [handler :- Handler]
Inputs: [handler :- Handler]
(some-handler dispatcher action)
Inputs: [dispatcher action :- s/Keyword] Returns: (s/maybe Handler)
Returns a handler or nil
Inputs: [dispatcher action :- s/Keyword] Returns: (s/maybe Handler) Returns a handler or nil
(strict-map->Dispatcher m4755 & [drop-extra-keys?__1260__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->
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 m4624 & [drop-extra-keys?__1260__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->
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.
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]]
Inputs: [& types :- [s/Keyword]]
(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.
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]
Inputs: [dispatcher :- Dispatcher context :- Context]
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close