Vault manifest operations: entry types, load/save, ID generation.
Types
VaultEntry = tuple[id, path: string]
Procs
proc expandHome(p: string): string {....raises: [], tags: [ReadEnvEffect, ReadIOEffect], forbids: [].}
- Expand ~ to $HOME in path strings.
proc genId(): string {....raises: [], tags: [], forbids: [].}
- 16-char random hex via cryptographic randomness.
proc loadManifest(repo: string): seq[VaultEntry] {....raises: [OSError, IOError], tags: [ ReadDirEffect, ExecIOEffect, ReadIOEffect, RootEffect, WriteIOEffect], forbids: [].}
- Decrypt and parse the vault manifest. Returns empty seq if no manifest exists.
proc saveManifest(repo: string; entries: seq[VaultEntry]; cfg: GpgConfig) {. ...raises: [IOError, OSError], tags: [WriteIOEffect, ExecIOEffect, ReadIOEffect, RootEffect, WriteDirEffect], forbids: [].}
- Serialize entries and encrypt as the vault manifest.
proc vaultDir(repo: string): string {....raises: [], tags: [], forbids: [].}
- Path to the .vault directory within a repo.