@signalk/resources-provider
Version:
Resources provider plugin for Signal K server.
26 lines (25 loc) • 827 B
TypeScript
import { IResourceStore, StoreRequestParams } from '../types';
export declare const getUuid: (skIdentifier: string) => string;
export declare class FileStore implements IResourceStore {
private debug;
savePath: string;
resources: any;
pkg: {
id: string;
};
constructor(pluginId: string, debug: (s: any) => void);
init(config: any): Promise<{
error: boolean;
message: string;
}>;
createSavePaths(resTypes: any): Promise<{
error: boolean;
message: string;
}>;
getResource(type: string, itemUuid: string, property?: string): Promise<object>;
getResources(type: string, params: any): Promise<{
[key: string]: any;
}>;
setResource(r: StoreRequestParams): Promise<void>;
checkPath(path?: string): Promise<boolean | Error>;
}