1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 | import {BindingKey} from '@loopback/context';
|
7 | import {
|
8 | Application,
|
9 | ApplicationConfig,
|
10 | ApplicationMetadata,
|
11 | ControllerClass,
|
12 | } from './application';
|
13 | import {
|
14 | LifeCycleObserverOptions,
|
15 | LifeCycleObserverRegistry,
|
16 | } from './lifecycle-registry';
|
17 |
|
18 |
|
19 |
|
20 |
|
21 | export namespace CoreBindings {
|
22 |
|
23 | |
24 |
|
25 |
|
26 | export const APPLICATION_INSTANCE = BindingKey.create<Application>(
|
27 | 'application.instance',
|
28 | );
|
29 |
|
30 | |
31 |
|
32 |
|
33 | export const APPLICATION_CONFIG: BindingKey<ApplicationConfig> =
|
34 | BindingKey.create<ApplicationConfig>('application.config');
|
35 |
|
36 | |
37 |
|
38 |
|
39 | export const APPLICATION_METADATA = BindingKey.create<ApplicationMetadata>(
|
40 | 'application.metadata',
|
41 | );
|
42 |
|
43 |
|
44 | |
45 |
|
46 |
|
47 | export const SERVERS = 'servers';
|
48 |
|
49 |
|
50 | |
51 |
|
52 |
|
53 | export const COMPONENTS = 'components';
|
54 |
|
55 |
|
56 | export const CONTROLLERS = 'controllers';
|
57 |
|
58 | |
59 |
|
60 |
|
61 |
|
62 | export const CONTROLLER_CLASS: BindingKey<ControllerClass> =
|
63 | BindingKey.create<ControllerClass>('controller.current.ctor');
|
64 |
|
65 | |
66 |
|
67 |
|
68 |
|
69 | export const CONTROLLER_METHOD_NAME = BindingKey.create<string>(
|
70 | 'controller.current.operation',
|
71 | );
|
72 |
|
73 | |
74 |
|
75 |
|
76 |
|
77 | export const CONTROLLER_METHOD_META = 'controller.method.meta';
|
78 |
|
79 | |
80 |
|
81 |
|
82 |
|
83 | export const CONTROLLER_CURRENT = BindingKey.create('controller.current');
|
84 |
|
85 | export const LIFE_CYCLE_OBSERVERS = 'lifeCycleObservers';
|
86 | |
87 |
|
88 |
|
89 | export const LIFE_CYCLE_OBSERVER_REGISTRY =
|
90 | BindingKey.create<LifeCycleObserverRegistry>('lifeCycleObserver.registry');
|
91 |
|
92 | |
93 |
|
94 |
|
95 | export const LIFE_CYCLE_OBSERVER_OPTIONS =
|
96 | BindingKey.create<LifeCycleObserverOptions>('lifeCycleObserver.options');
|
97 | }
|
98 |
|
99 | export namespace CoreTags {
|
100 | |
101 |
|
102 |
|
103 | export const COMPONENT = 'component';
|
104 |
|
105 | |
106 |
|
107 |
|
108 | export const SERVER = 'server';
|
109 |
|
110 | |
111 |
|
112 |
|
113 | export const CONTROLLER = 'controller';
|
114 |
|
115 | |
116 |
|
117 |
|
118 | export const SERVICE = 'service';
|
119 | |
120 |
|
121 |
|
122 | export const SERVICE_INTERFACE = 'serviceInterface';
|
123 |
|
124 | |
125 |
|
126 |
|
127 | export const LIFE_CYCLE_OBSERVER = 'lifeCycleObserver';
|
128 |
|
129 | |
130 |
|
131 |
|
132 | export const LIFE_CYCLE_OBSERVER_GROUP = 'lifeCycleObserverGroup';
|
133 |
|
134 | |
135 |
|
136 |
|
137 |
|
138 | export const EXTENSION_FOR = 'extensionFor';
|
139 |
|
140 | |
141 |
|
142 |
|
143 | export const EXTENSION_POINT = 'extensionPoint';
|
144 | }
|