1 |
|
2 | import { ControllerSpec, PathObject } from '@loopback/openapi-v3';
|
3 | import { Request } from '../types';
|
4 | import { ControllerClass, ControllerFactory } from './controller-route';
|
5 | import { ExternalExpressRoutes } from './external-express-routes';
|
6 | import { RestRouter } from './rest-router';
|
7 | import { ResolvedRoute, RouteEntry } from './route-entry';
|
8 |
|
9 |
|
10 |
|
11 | export declare class RoutingTable {
|
12 | private readonly _router;
|
13 | private _externalRoutes?;
|
14 | constructor(_router?: RestRouter, _externalRoutes?: ExternalExpressRoutes | undefined);
|
15 | /**
|
16 | * Register a controller as the route
|
17 | * @param spec
|
18 | * @param controllerCtor
|
19 | * @param controllerFactory
|
20 | */
|
21 | registerController<T extends object>(spec: ControllerSpec, controllerCtor: ControllerClass<T>, controllerFactory?: ControllerFactory<T>): void;
|
22 | /**
|
23 | * Register a route
|
24 | * @param route - A route entry
|
25 | */
|
26 | registerRoute(route: RouteEntry): void;
|
27 | describeApiPaths(): PathObject;
|
28 | /**
|
29 | * Map a request to a route
|
30 | * @param request
|
31 | */
|
32 | find(request: Request): ResolvedRoute;
|
33 | }
|