Compare commits
No commits in common. "5c583fd72f0ebbc48aa53ef2e529888a43933235" and "b96f51220d0cbd6b10b4790c34f54e0be836fb7d" have entirely different histories.
5c583fd72f
...
b96f51220d
1 changed files with 1 additions and 21 deletions
|
@ -3,19 +3,14 @@
|
|||
[orchestra.core :refer [defn-spec]]
|
||||
[clojure.spec.alpha :as s]
|
||||
[clojure.string :as str]
|
||||
[dda.backup.core.domain :as cd]
|
||||
[dda.backup.restic.domain :as rd]
|
||||
[cljc.java-time.local-date :as ld]
|
||||
[cljc.java-time.format.date-time-formatter :as df]))
|
||||
|
||||
(s/def ::new-password-file string?)
|
||||
(s/def ::config (s/keys :req-un [::rd/restic-repository
|
||||
::rd/password-file]
|
||||
:opt-un [::rd/certificate-file
|
||||
::new-password-file]))
|
||||
|
||||
(def lowercase-numeric #"[a-z0-9]+")
|
||||
(def alphanumeric #"[a-zA-Z0-9]+")
|
||||
|
||||
; true | false
|
||||
(s/def ::current boolean?)
|
||||
; 521e0760
|
||||
|
@ -38,21 +33,6 @@
|
|||
|
||||
; Refer to "docs/CredentialRotation.md" for specifics
|
||||
|
||||
(defn-spec list-passwords-command ::cd/command
|
||||
[config ::config]
|
||||
(let [{:keys [restic-repository password-file
|
||||
certificate-file new-password-file]} config]
|
||||
(into
|
||||
[]
|
||||
(concat ["restic" "-r" restic-repository "key" "list" "--json"]
|
||||
(cond
|
||||
(some? certificate-file)
|
||||
["--cacert" certificate-file]
|
||||
(some? password-file)
|
||||
["--password-file" password-file]
|
||||
:else
|
||||
[])))))
|
||||
|
||||
(defn-spec add-new-password! nil?
|
||||
[new-password-file ::new-password-file]
|
||||
; TODO
|
||||
|
|
Loading…
Reference in a new issue