Add list passwords command

This commit is contained in:
bom 2024-10-25 13:19:59 +02:00
parent 21dee3cfc0
commit 5c583fd72f

View file

@ -38,6 +38,21 @@
; Refer to "docs/CredentialRotation.md" for specifics ; 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? (defn-spec add-new-password! nil?
[new-password-file ::new-password-file] [new-password-file ::new-password-file]
; TODO ; TODO