2020-08-06 19:17:38 +00:00
|
|
|
// A single check step
|
|
|
|
export interface CheckStepInterface {
|
|
|
|
getName(): string;
|
|
|
|
// return error or null/empty on success
|
|
|
|
check(): Promise<string>;
|
|
|
|
}
|
|
|
|
|
|
|
|
// An action for a check, fix, or update, or a combination.
|
|
|
|
export interface ActionInterface {
|
|
|
|
getName(): string;
|
2020-08-10 08:56:41 +00:00
|
|
|
// return check steps for sanity check (0, 1, or more)
|
|
|
|
getSanityChecks(): CheckStepInterface[];
|
|
|
|
// return check steps for consistenct check (0, 1, or more)
|
|
|
|
getConsistencyChecks(): CheckStepInterface[];
|
|
|
|
sanityFix(): Promise<void>;
|
|
|
|
consistencyFix(): Promise<void>;
|
2020-08-06 19:17:38 +00:00
|
|
|
update(): Promise<void>;
|
|
|
|
}
|
2020-08-10 08:56:41 +00:00
|
|
|
|
|
|
|
export enum FixCheckMode {
|
|
|
|
CheckSanityOnly = 1,
|
|
|
|
CheckAll,
|
|
|
|
FixSanityOnly,
|
|
|
|
FixAll
|
|
|
|
}
|