Interface Vault

Hierarchy

  • Vault

Properties

acquireRead: (() => ResourceAcquire<FileSystemReadable>)

Type declaration

acquireWrite: ((tran, ctx) => ResourceAcquire<FileSystemWritable>)

Type declaration

    • (tran, ctx): ResourceAcquire<FileSystemWritable>
    • Acquire a read-write lock on this vault.

      Parameters

      • tran: undefined | DBTransaction
      • ctx: ContextTimed

      Returns ResourceAcquire<FileSystemWritable>

log: ((ref?, limit?) => Promise<CommitLog[]>)

Type declaration

    • (ref?, limit?): Promise<CommitLog[]>
    • Parameters

      • Optional ref: string
      • Optional limit: number

      Returns Promise<CommitLog[]>

readF: (<T>(f) => Promise<T>)

Type declaration

    • <T>(f): Promise<T>
    • With context handler for using a vault in a read-only context.

      Type Parameters

      • T

      Parameters

      • f: ((fs) => Promise<T>)

      Returns Promise<T>

readG: (<T, TReturn, TNext>(g) => AsyncGenerator<T, TReturn, TNext>)

Type declaration

    • <T, TReturn, TNext>(g): AsyncGenerator<T, TReturn, TNext>
    • With context handler for using a vault in a read-only context for a generator.

      Type Parameters

      • T

      • TReturn

      • TNext

      Parameters

      • g: ((fs) => AsyncGenerator<T, TReturn, TNext>)
          • (fs): AsyncGenerator<T, TReturn, TNext>
          • Parameters

            Returns AsyncGenerator<T, TReturn, TNext>

      Returns AsyncGenerator<T, TReturn, TNext>

vaultDataDir: string
vaultGitDir: string
vaultId: VaultId
version: ((ref?) => Promise<void>)

Type declaration

    • (ref?): Promise<void>
    • Checks out the vault repository to specific commit ID or special tags. This changes the working directory and updates the HEAD reference.

      Parameters

      • ref: string = tagLast

      Returns Promise<void>

writeF: ((f, tran?, ctx?) => Promise<void>)

Type declaration

    • (f, tran?, ctx?): Promise<void>
    • With context handler for using a vault in a writable context.

      Parameters

      • f: ((fs) => Promise<void>)
      • Optional tran: DBTransaction
      • Optional ctx: Partial<ContextTimedInput>

      Returns Promise<void>

writeG: (<T, TReturn, TNext>(g, tran?, ctx?) => AsyncGenerator<T, TReturn, TNext>)

Type declaration

    • <T, TReturn, TNext>(g, tran?, ctx?): AsyncGenerator<T, TReturn, TNext>
    • With context handler for using a vault in a writable context for a generator.

      Type Parameters

      • T

      • TReturn

      • TNext

      Parameters

      • g: ((fs) => AsyncGenerator<T, TReturn, TNext>)
          • (fs): AsyncGenerator<T, TReturn, TNext>
          • Parameters

            Returns AsyncGenerator<T, TReturn, TNext>

      • Optional tran: DBTransaction
      • Optional ctx: Partial<ContextTimedInput>

      Returns AsyncGenerator<T, TReturn, TNext>

Generated using TypeDoc