@xmobitea/gn-server
Version:
GearN Server by XmobiTea (Pro)
74 lines (73 loc) • 3.13 kB
TypeScript
import { IBuilder } from "./../GN-library/xbuilder/lib/IBuilder";
import { ApplicationSettings } from "./settings/ApplicationSettings";
import { HttpAppSettings } from "./settings/HttpAppSettings";
import { SocketAppSettings } from "./settings/SocketAppSettings";
import { GNServer } from "./../GNServer";
import { DatabaseSettings } from "./settings/DatabaseSettings";
import { OtherSettings } from "./settings/OtherSettings";
import { OnRunSuccess } from "./../GN-library/xbuilder/lib/OnRunSuccess";
import { LogSettings } from "./settings/LogSettings";
import { UploadFileSettings } from "./settings/UploadFileSettings";
import { DdosSettings } from "./settings/DDosSettings";
import { ClusterSettings } from "./settings/ClusterSettings";
declare abstract class BuilderBase {
protected applicationSettings: ApplicationSettings;
protected httpAppSettings: HttpAppSettings;
protected socketAppSettings: SocketAppSettings;
protected databaseSettings: DatabaseSettings;
protected otherSettings: OtherSettings;
protected logSettings: LogSettings;
protected uploadFileSettings: UploadFileSettings;
protected ddosSettings: DdosSettings;
protected clusterSettings: ClusterSettings;
getApplicationSettings(): ApplicationSettings;
getHttpAppSettings(): HttpAppSettings;
getSocketAppSettings(): SocketAppSettings;
getDatabaseSettings(): DatabaseSettings;
getOtherSettings(): OtherSettings;
getLogSettings(): LogSettings;
getUploadFileSettings(): UploadFileSettings;
getDdosSettings(): DdosSettings;
getClusterSettings(): ClusterSettings;
constructor();
}
declare class Builder extends BuilderBase implements IBuilder<ServerApplication> {
setApplicationSettings(applicationSettings: ApplicationSettings): Builder;
setHttpAppSettings(httpAppSettings: HttpAppSettings): Builder;
setSocketAppSettings(socketAppSettings: SocketAppSettings): Builder;
setDatabaseSettings(databaseSettings: DatabaseSettings): Builder;
setOtherSettings(otherSettings: OtherSettings): Builder;
setLogSettings(logSettings: LogSettings): Builder;
setUploadFileSettings(uploadFileSettings: UploadFileSettings): Builder;
setDdosSettings(ddosSettings: DdosSettings): Builder;
setClusterSettings(clusterSettings: ClusterSettings): Builder;
build(): ServerApplication;
constructor();
}
export declare class ServerApplication extends BuilderBase {
private httpApp;
private socketApp;
private gnServer;
private apiMiddleware;
private antiDdosMiddleware;
private uploadFileMiddleware;
private sessionId;
private secretkey;
private secretId;
run(onRunSuccess?: OnRunSuccess): Promise<void>;
private setupDatabase;
private setupNewGNDatabase;
private reSetupGNDatabase;
private applySettingsGame;
private newGNServer;
private newApiMiddleware;
private newAntiDdosMiddleware;
private newUploadMiddleware;
getGNServer(): GNServer;
private newHttpApp;
private newSocketApp;
private getServer;
constructor(builder: BuilderBase);
static Builder(): Builder;
}
export {};