-
Notifications
You must be signed in to change notification settings - Fork 10
/
common.clj
36 lines (23 loc) · 1.06 KB
/
common.clj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
(ns flower.common
(:require [lambdaisland.uri :as uri]))
;;
;; Public definitions
;;
(defrecord ComponentAuth [])
(defmethod print-method ComponentAuth [value ^java.io.Writer writer]
(.write writer (str (reduce-kv (fn [map key value]
(assoc map key (if (or (.endsWith (str key) "password")
(.endsWith (str key) "token"))
(apply str (repeat (count value) "*"))
value)))
{}
value))))
(defn url [full-url]
(uri/uri full-url))
(def ^:dynamic *component-auth* (ComponentAuth.))
(def ^:dynamic *component-context* {})
(def ^:dynamic *behavior-implicit-cache* true)
(def ^:dynamic *behavior-implicit-cache-cleaning* true)
(def ^:dynamic *behavior-suppress-warnings-on-loading-libraries* true)
(def ^:dynamic *behavior-do-long-operations-in-parallel* false)
(def ^:dynamic *resolver-additional-repositories* {})