import { Addon, Config } from './aop'; import { PromiseType } from './base'; /** * 配置存储接口 */ export interface ConfigStore extends Config { saveConfig?(configPath: string, config: T): PromiseType; loadConfig?(configPath: string): PromiseType; renameConfig?(configPath: string, newName: string): PromiseType; deleteConfig?(configPath: string): PromiseType; getConfigList?(dirPath: string): PromiseType; deleteDirectory?(dirPath: string): PromiseType; getResourceList?(): PromiseType; } export declare class RemotingConfigStore extends Addon implements ConfigStore { serverUrl?: string; serviceName?: string; constructor(serverUrl?: string, serviceName?: string); saveConfig?: ((configPath: string, config: any) => Promise) | undefined; loadConfig?: ((configPath: string) => Promise) | undefined; deleteConfig?: ((configPath: string) => Promise) | undefined; renameConfig?: ((configPath: string, newName: string) => Promise) | undefined; getConfigList?: ((dirPath: string) => Promise) | undefined; deleteDirectory?: ((dirPath: string) => Promise) | undefined; getResourceList?: (() => Promise) | undefined; } export declare class CookieConfigStore extends Addon implements ConfigStore { /** * Cookie名称 */ cookieName?: string; constructor(cookieName?: string); saveConfig?: ((configPath: string, config: any) => void) | undefined; loadConfig?: ((configPath: string) => any) | undefined; deleteConfig?: ((configPath: string) => void) | undefined; renameConfig?: ((configPath: string, newName: string) => void) | undefined; } export declare class GlobalConfigStore implements ConfigStore { constructor(); saveConfig?: ((configPath: string, config: any) => any) | undefined; loadConfig?: ((configPath: string) => any) | undefined; deleteConfig?: ((configPath: string) => void) | undefined; renameConfig?: ((configPath: string, newName: string) => void) | undefined; getConfigList?: ((dirPath: string) => any[]) | undefined; }