(assoc-inj m injectable)
(assoc-inj m injectable & more)
Associate one or more injectables with their corresponding node-IDs into a map.
Associate one or more injectables with their corresponding node-IDs into a map.
(attr-map graph f)
Given a map of node-IDs to injectables, return a map of node-IDs to f (arity-1 fn) applied to injectable attributes.
Given a map of node-IDs to injectables, return a map of node-IDs to f (arity-1 fn) applied to injectable attributes.
(definj sym deps args & body)
Define an injectable defrecord that acts as a function after it is instantiated.
Define an injectable defrecord that acts as a function after it is instantiated.
(inj inj-meta arg-vec & body)
Given injection metadata and an annotated argument vector create an injectable using the body of code. Injection
metadata has the keys :inject
, :impl-id
and :post-inject
.
Given injection metadata and an annotated argument vector create an injectable using the body of code. Injection metadata has the keys `:inject`, `:impl-id` and `:post-inject`.
(inj* {:keys [expose impl-id pre-inject post-inject]
:or {impl-id (gensym "dime-generated/injectable-")}
:as options}
dep-ids
f)
Given an injection option map, dependency-keys and an arity-2 function to carry out injection, return an injectable.
Given an injection option map, dependency-keys and an arity-2 function to carry out injection, return an injectable.
(inject injectable deps)
(inject injectable
deps
{:keys [pre-inject-processor]
:or {pre-inject-processor process-pre-inject}
:as options})
Apply dependencies to the injectable and return the result.
Apply dependencies to the injectable and return the result.
(inject-all graph seed)
(inject-all graph
seed
{:keys [post-inject-processor]
:or {post-inject-processor process-post-inject}
:as options})
Given a map of node-ID/injectable pairs and seed data map, resolve/inject all dependencies and return a map of node-ID/injected pairs.
Given a map of node-ID/injectable pairs and seed data map, resolve/inject all dependencies and return a map of node-ID/injected pairs.
(partial f & args)
Same as clojure.core/partial, except it is a macro and is friendly with vars - preserves associativity with vars. Useful to create partials out of vars instrumented using clojure.core/alter-var-root or clojure.core/with-redefs.
Same as clojure.core/partial, except it is a macro and is friendly with vars - preserves associativity with vars. Useful to create partials out of vars instrumented using clojure.core/alter-var-root or clojure.core/with-redefs.
(process-post-inject post-inject injected node-id resolved)
Return the result of applying post-inject fn to remaining args if post-inject is non-nil, injected instance otherwise. Default post-inject processor. Arguments: post-inject ; post-inject fn, or nil, or a collection of post-inject-fns injected ; the partial fn created from the injectable node-ID ; node ID for the injectable resolved ; resolved map of seed + dependencies so far
Return the result of applying post-inject fn to remaining args if post-inject is non-nil, injected instance otherwise. Default post-inject processor. Arguments: post-inject ; post-inject fn, or nil, or a collection of post-inject-fns injected ; the partial fn created from the injectable node-ID ; node ID for the injectable resolved ; resolved map of seed + dependencies so far
(process-pre-inject pre-inject injectable args)
Return the result of applying pre-inject fn to remaining args if pre-inject is non-nil, pre-injected injectable otherwise. Default pre-inject processor. Arguments: pre-inject ; pre-inject fn, or nil, or a collection of pre-inject fns injectable ; injectable to be injected with dependencies args ; map to resolve dependencies from
Return the result of applying pre-inject fn to remaining args if pre-inject is non-nil, pre-injected injectable otherwise. Default pre-inject processor. Arguments: pre-inject ; pre-inject fn, or nil, or a collection of pre-inject fns injectable ; injectable to be injected with dependencies args ; map to resolve dependencies from
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close