gristlabs_grist-core/app/server/lib/IChecksumStore.ts
Paul Fitzpatrick 71519d9e5c (core) revamp snapshot inventory
Summary:
Deliberate changes:
 * save snapshots to s3 prior to migrations.
 * label migration snapshots in s3 metadata.
 * avoid pruning migration snapshots for a month.

Opportunistic changes:
 * Associate document timezone with snapshots, so pruning can respect timezones.
 * Associate actionHash/Num with snapshots.
 * Record time of last change in snapshots (rather than just s3 upload time, which could be a while later).

This ended up being a biggish change, because there was nowhere ideal to put tags (list of possibilities in diff).

Test Plan: added tests

Reviewers: dsagal

Reviewed By: dsagal

Differential Revision: https://phab.getgrist.com/D2646
2020-10-30 13:52:46 -04:00

9 lines
309 B
TypeScript

/**
* Interface for storing checksums. Family is a short string, to allow storing
* checksums for different namespaces.
*/
export interface IChecksumStore {
updateChecksum(family: string, key: string, checksum: string): Promise<void>;
getChecksum(family: string, key: string): Promise<string|null>;
}