fix compile

This commit is contained in:
jerger 2022-05-21 10:58:54 +02:00
parent 16ab44be95
commit 90acdc034e
3 changed files with 8 additions and 10 deletions

View file

@ -4,7 +4,7 @@
"src/test/cljc"
"src/test/cljs"
"src/test/resources"]
:dependencies [[org.domaindrivenarchitecture/c4k-common-cljs "1.0.0"]
:dependencies [[org.domaindrivenarchitecture/c4k-common-cljs "2.0.3"]
[hickory "0.7.1"]]
:builds {:frontend {:target :browser
:modules {:main {:init-fn dda.c4k-nextcloud.browser/init}}

View file

@ -21,11 +21,6 @@
:args (s/?
(s/cat :config ::filename
:auth ::filename))))
(defn expound-config
[config]
(expound/expound ::nextcloud/config config))
(defn invalid-args-msg
[spec args]
(s/explain spec args)
@ -47,14 +42,14 @@
auth-parse-fn (if (yaml/is-yaml? auth) yaml/from-string edn/read-string)
parsed-config (config-parse-fn config-str)
parsed-auth (auth-parse-fn auth-str)
config-valid? (s/valid? nextcloud/config? parsed-config)
auth-valid? (s/valid? core/auth? parsed-auth)]
config-valid? (s/valid? ::core/config parsed-config)
auth-valid? (s/valid? ::core/auth parsed-auth)]
(if (and config-valid? auth-valid?)
(println (core/generate parsed-config parsed-auth))
(do
(when (not config-valid?)
(println
(expound/expound-str nextcloud/config? parsed-config {:print-specs? false})))
(expound/expound-str ::core/config parsed-config {:print-specs? false})))
(when (not auth-valid?)
(println
(expound/expound-str core/auth? parsed-auth {:print-specs? false})))))))))))
(expound/expound-str ::core/auth parsed-auth {:print-specs? false})))))))))))

View file

@ -24,6 +24,9 @@
::aws-access-key-id ::aws-secret-access-key
::restic-password]))
(s/def ::config config?)
(s/def ::auth auth?)
(defn-spec k8s-objects any?
[config (s/merge config? auth?)]
(let [nextcloud-default-storage-config {:pvc-storage-class-name default-storage-class