2017-07-08 12:43:42 +02:00
|
|
|
import {ClientConfig} from "../public/ConfigClass";
|
2017-07-19 20:47:09 +02:00
|
|
|
|
2017-07-20 23:37:10 +02:00
|
|
|
export enum DatabaseType {
|
|
|
|
memory = 0, mysql = 1, sqlite = 2
|
2017-06-04 15:25:08 +02:00
|
|
|
}
|
2017-07-20 23:37:10 +02:00
|
|
|
|
2017-06-04 15:25:08 +02:00
|
|
|
export enum LogLevel {
|
2017-06-11 23:33:47 +02:00
|
|
|
error, warn, info, debug, verbose
|
|
|
|
}
|
|
|
|
|
2017-07-20 23:37:10 +02:00
|
|
|
export enum ThumbnailProcessingLib {
|
2017-06-11 23:33:47 +02:00
|
|
|
Jimp = 0,
|
|
|
|
gm = 1,
|
|
|
|
sharp = 2
|
2017-06-04 15:25:08 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface MySQLConfig {
|
2017-06-11 23:33:47 +02:00
|
|
|
host: string;
|
|
|
|
database: string;
|
|
|
|
username: string;
|
|
|
|
password: string;
|
2017-06-04 15:25:08 +02:00
|
|
|
}
|
2017-07-20 23:37:10 +02:00
|
|
|
|
|
|
|
export interface SQLiteConfig {
|
|
|
|
storage: string;
|
|
|
|
}
|
|
|
|
|
2017-06-04 15:25:08 +02:00
|
|
|
export interface DataBaseConfig {
|
2017-06-11 23:33:47 +02:00
|
|
|
type: DatabaseType;
|
|
|
|
mysql?: MySQLConfig;
|
2017-07-20 23:37:10 +02:00
|
|
|
sqlite?: SQLiteConfig;
|
2017-06-04 15:25:08 +02:00
|
|
|
}
|
2017-07-20 23:37:10 +02:00
|
|
|
|
2017-06-04 15:25:08 +02:00
|
|
|
export interface ThumbnailConfig {
|
2017-06-11 23:33:47 +02:00
|
|
|
folder: string;
|
|
|
|
processingLibrary: ThumbnailProcessingLib;
|
|
|
|
qualityPriority: boolean;
|
2017-06-04 15:25:08 +02:00
|
|
|
}
|
2017-07-20 23:37:10 +02:00
|
|
|
|
2017-07-03 19:17:49 +02:00
|
|
|
export interface SharingConfig {
|
|
|
|
updateTimeout: number;
|
|
|
|
}
|
2017-07-20 23:37:10 +02:00
|
|
|
|
2017-07-27 23:10:16 +02:00
|
|
|
export enum ReIndexingSensitivity {
|
|
|
|
low, medium, high
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IndexingConfig {
|
|
|
|
folderPreviewSize: number;
|
|
|
|
cachedFolderTimeout: number;//Do not rescans the folder if seems ok
|
|
|
|
reIndexingSensitivity: ReIndexingSensitivity;
|
|
|
|
}
|
|
|
|
|
2017-06-04 15:25:08 +02:00
|
|
|
export interface ServerConfig {
|
2017-06-11 23:33:47 +02:00
|
|
|
port: number;
|
|
|
|
imagesFolder: string;
|
|
|
|
thumbnail: ThumbnailConfig;
|
|
|
|
database: DataBaseConfig;
|
|
|
|
enableThreading: boolean;
|
2017-07-03 19:17:49 +02:00
|
|
|
sharing: SharingConfig;
|
2017-07-16 10:59:28 +02:00
|
|
|
sessionTimeout: number
|
2017-07-27 23:10:16 +02:00
|
|
|
indexing: IndexingConfig;
|
2017-06-04 15:25:08 +02:00
|
|
|
}
|
2017-07-20 23:37:10 +02:00
|
|
|
|
2017-07-08 12:43:42 +02:00
|
|
|
export interface IPrivateConfig {
|
|
|
|
Server: ServerConfig;
|
2017-07-15 12:47:11 +02:00
|
|
|
Client: ClientConfig.Config;
|
2017-07-08 12:43:42 +02:00
|
|
|
}
|