mirror of
https://github.com/tale/headplane.git
synced 2026-07-27 00:08:14 +00:00
17 lines
434 B
TypeScript
17 lines
434 B
TypeScript
import type { Headscale } from "~/server/headscale/api";
|
|
|
|
export abstract class Integration<T> {
|
|
protected context: NonNullable<T>;
|
|
constructor(context: T) {
|
|
if (!context) {
|
|
throw new Error("Missing integration context");
|
|
}
|
|
|
|
this.context = context;
|
|
}
|
|
|
|
abstract isAvailable(): Promise<boolean> | boolean;
|
|
abstract onConfigChange(headscale: Headscale): Promise<void> | void;
|
|
abstract get name(): string;
|
|
}
|