src/nimvault/commands

Vault commands: seal, unseal, add, rm, mv, list, status.

All commands take a repo path and GpgConfig. Parallel GPG via startProcess is preserved from the original implementation.

Procs

proc add(repo, path: string; cfg: GpgConfig) {.
    ...raises: [IOError, Exception, OSError], tags: [ReadEnvEffect, ReadIOEffect,
    ReadDirEffect, WriteIOEffect, RootEffect, ExecIOEffect, WriteDirEffect],
    forbids: [].}
Add a file by its absolute target path (where it lives on disk).
proc list(repo: string; cfg: GpgConfig) {....raises: [OSError, IOError], tags: [
    ReadDirEffect, ExecIOEffect, ReadIOEffect, RootEffect, WriteIOEffect],
    forbids: [].}
proc move(repo, oldPath, newPath: string; cfg: GpgConfig) {.
    ...raises: [Exception, OSError, IOError], tags: [ReadEnvEffect, ReadIOEffect,
    RootEffect, ReadDirEffect, ExecIOEffect, WriteIOEffect, WriteDirEffect],
    forbids: [].}
proc remove(repo, path: string; cfg: GpgConfig) {....raises: [OSError, IOError], tags: [
    ReadEnvEffect, ReadIOEffect, ReadDirEffect, ExecIOEffect, RootEffect,
    WriteIOEffect, WriteDirEffect], forbids: [].}
proc seal(repo: string; cfg: GpgConfig) {.
    ...raises: [OSError, IOError, ValueError], tags: [ReadDirEffect, ExecIOEffect,
    ReadIOEffect, RootEffect, WriteIOEffect, ReadEnvEffect, TimeEffect,
    WriteDirEffect], forbids: [].}
proc status(repo: string; cfg: GpgConfig) {....raises: [OSError, IOError], tags: [
    ReadDirEffect, ExecIOEffect, ReadIOEffect, RootEffect, WriteIOEffect,
    ReadEnvEffect, WriteDirEffect], forbids: [].}
proc unseal(repo: string; cfg: GpgConfig) {.
    ...raises: [OSError, IOError, ValueError], tags: [ReadDirEffect, ExecIOEffect,
    ReadIOEffect, RootEffect, WriteIOEffect, ReadEnvEffect, WriteDirEffect,
    TimeEffect], forbids: [].}