sdk/ts/sdk.classes.aghandler.ts

23 lines
573 B
TypeScript
Raw Normal View History

2020-03-25 15:16:03 +00:00
import * as plugins from './sdk.plugins';
2020-03-25 20:15:46 +00:00
import { AuthInfo } from './sdk.classes.authinfo';
2020-03-25 15:16:03 +00:00
2020-07-04 14:38:25 +00:00
export interface IRequirementResult {
allOk: boolean;
reason: string;
}
2020-03-25 20:15:46 +00:00
export abstract class AAgHandler<TClaim> {
2020-03-25 15:16:03 +00:00
/**
* a slug that separates the handler from other handlers
*/
public abstract slug: string;
2020-07-04 16:42:41 +00:00
public abstract typedrouter: plugins.typedrequest.TypedRouter;
2020-07-05 15:16:50 +00:00
public abstract checkRequirements(): Promise<IRequirementResult>;
2020-07-04 14:38:25 +00:00
/**
* start the ag-handler
*/
public abstract start(): Promise<any>;
public abstract stop(): Promise<any>;
2020-07-04 14:50:24 +00:00
}