aboutsummaryrefslogtreecommitdiffstats
path: root/src/chameleon/config.clj
blob: bd990964308855daefb8fc0bccfcf0e70eae9044 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
(ns chameleon.config
  (:require [integrant.core :as ig]
            [chameleon.aai-processor :refer :all]))

(defn config
  [app-config]
  (let [conf {
              :chameleon/event
              {:event-config (assoc-in (:event-config app-config)
                                       [:aai :processor] from-spike)
               :gallifrey-host (:gallifrey-host app-config)}
              :chameleon/handler
              {:gallifrey-host (:gallifrey-host app-config)
               :gallifrey-transformer from-gallifrey}
              :chameleon/aai-processor
              {:provenance-attr "last-mod-source-of-truth"
               :truth-attr "truth-time"}
              :chameleon/http-server
              {:port (:http-port app-config)
               :handler (ig/ref :chameleon/handler)}}]
    (ig/load-namespaces conf)
    conf))