1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00
pigallery2/common/config/private/IPrivateConfig.ts

69 lines
1.3 KiB
TypeScript
Raw Normal View History

2017-07-08 18:43:42 +08:00
import {ClientConfig} from "../public/ConfigClass";
2017-07-20 02:47:09 +08:00
export enum DatabaseType {
memory = 0, mysql = 1, sqlite = 2
2017-06-04 21:25:08 +08:00
}
2017-06-04 21:25:08 +08:00
export enum LogLevel {
error, warn, info, debug, verbose
}
export enum ThumbnailProcessingLib {
Jimp = 0,
gm = 1,
sharp = 2
2017-06-04 21:25:08 +08:00
}
export interface MySQLConfig {
host: string;
database: string;
username: string;
password: string;
2017-06-04 21:25:08 +08:00
}
export interface SQLiteConfig {
storage: string;
}
2017-06-04 21:25:08 +08:00
export interface DataBaseConfig {
type: DatabaseType;
mysql?: MySQLConfig;
sqlite?: SQLiteConfig;
2017-06-04 21:25:08 +08:00
}
2017-06-04 21:25:08 +08:00
export interface ThumbnailConfig {
folder: string;
processingLibrary: ThumbnailProcessingLib;
qualityPriority: boolean;
2017-06-04 21:25:08 +08:00
}
2017-07-04 01:17:49 +08:00
export interface SharingConfig {
updateTimeout: number;
}
2017-07-28 05:10:16 +08: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 21:25:08 +08:00
export interface ServerConfig {
port: number;
imagesFolder: string;
thumbnail: ThumbnailConfig;
database: DataBaseConfig;
enableThreading: boolean;
2017-07-04 01:17:49 +08:00
sharing: SharingConfig;
sessionTimeout: number
2017-07-28 05:10:16 +08:00
indexing: IndexingConfig;
2017-06-04 21:25:08 +08:00
}
2017-07-08 18:43:42 +08:00
export interface IPrivateConfig {
Server: ServerConfig;
2017-07-15 18:47:11 +08:00
Client: ClientConfig.Config;
2017-07-08 18:43:42 +08:00
}