1 | import { Interfaces, LogType } from '@lxdhub/common';
|
2 | import { IDatabaseSettings } from '@lxdhub/db';
|
3 | import { Application } from 'express';
|
4 |
|
5 |
|
6 |
|
7 | export declare class LXDHubAPISettings {
|
8 | port?: number;
|
9 | hostUrl?: string;
|
10 | database: IDatabaseSettings;
|
11 | lxd?: Interfaces.ILXDRemoteAuthentication;
|
12 | logLevel?: LogType;
|
13 | docUrl: string;
|
14 | }
|
15 |
|
16 |
|
17 |
|
18 |
|
19 | export declare class LXDHubAPI implements Interfaces.ILXDHubHttpService {
|
20 | private settings;
|
21 | private server?;
|
22 | private app;
|
23 | private logger;
|
24 | private url;
|
25 | constructor(settings: LXDHubAPISettings, server?: Application);
|
26 | /**
|
27 | * Conigurates Swagger for Nest
|
28 | */
|
29 | private setupSwagger;
|
30 | /**
|
31 | * Creates the Nest App
|
32 | */
|
33 | private createNestApp;
|
34 | /**
|
35 | * Setup the middleware for LXDHub API
|
36 | */
|
37 | private setupMiddleware;
|
38 | /**
|
39 | * Bootstraps the LXDHub API and returns the
|
40 | * Express instance
|
41 | */
|
42 | bootstrap(): Promise<Application>;
|
43 | /**
|
44 | * Bootstraps & starts LXDHub API with the given conifgurations
|
45 | */
|
46 | run(): Promise<void>;
|
47 | }
|