-
Notifications
You must be signed in to change notification settings - Fork 567
/
constant.ts
100 lines (83 loc) 路 3.6 KB
/
constant.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
// got all value with no property name
export const ALL = 'common:all_value_key';
// common
export const SCHEDULE_KEY = 'common:schedule';
export const CONFIGURATION_KEY = 'common:configuration';
export const FRAMEWORK_KEY = 'common:framework';
export const ASPECT_KEY = 'common:aspect';
export const CATCH_KEY = 'common:catch';
export const MATCH_KEY = 'common:match';
export const GUARD_KEY = 'common:guard';
export const MOCK_KEY = 'common:mock';
export const FACTORY_SERVICE_CLIENT_KEY = 'common:service_factory:client';
// faas
export const FUNC_KEY = 'faas:func';
export const SERVERLESS_FUNC_KEY = 'faas:serverless:function';
// web
export const CONTROLLER_KEY = 'web:controller';
export const WEB_ROUTER_KEY = 'web:router';
export const WEB_ROUTER_PARAM_KEY = 'web:router_param';
export const WEB_RESPONSE_KEY = 'web:response';
export const WEB_RESPONSE_HTTP_CODE = 'web:response_http_code';
export const WEB_RESPONSE_REDIRECT = 'web:response_redirect';
export const WEB_RESPONSE_HEADER = 'web:response_header';
export const WEB_RESPONSE_CONTENT_TYPE = 'web:response_content_type';
export const WEB_RESPONSE_RENDER = 'web:response_render';
// task
export const MODULE_TASK_KEY = 'task:task';
export const MODULE_TASK_METADATA = 'task:task:options';
export const MODULE_TASK_TASK_LOCAL_KEY = 'task:task:task_local';
export const MODULE_TASK_TASK_LOCAL_OPTIONS = 'task:task:task_local:options';
export const MODULE_TASK_QUEUE_KEY = 'task:task:queue';
export const MODULE_TASK_QUEUE_OPTIONS = 'task:task:queue:options';
// ws
export const WS_CONTROLLER_KEY = 'ws:controller';
export const WS_EVENT_KEY = 'ws:event';
// RPC
export const HSF_KEY = 'rpc:hsf';
export const RPC_GRPC_KEY = 'rpc:grpc';
export const RPC_DUBBO_KEY = 'rpc:dubbo';
// microservice
export const MS_CONSUMER_KEY = 'ms:consumer';
export const MS_PRODUCER_KEY = 'ms:producer';
export const MS_PROVIDER_KEY = 'ms:provider';
// rpc method
export const MS_GRPC_METHOD_KEY = 'ms:grpc:method';
export const MS_DUBBO_METHOD_KEY = 'ms:dubbo:method';
export const MS_HSF_METHOD_KEY = 'ms:hsf:method';
// framework
export const CONFIG_KEY = 'config';
export const PLUGIN_KEY = 'plugin';
export const LOGGER_KEY = 'logger';
export const APPLICATION_KEY = '__midway_framework_app__';
export const APPLICATION_CONTEXT_KEY = '__midway_application_context__';
////////////////////////////////////////// inject keys
// constructor key
export const CLASS_KEY_CONSTRUCTOR = 'midway:class_key_constructor';
// Used for named bindings
export const NAMED_TAG = 'named';
// The name of the target at design time
export const INJECT_TAG = 'inject';
// The name inject custom property decorator with resolver
export const INJECT_CUSTOM_PROPERTY = 'inject_custom_property';
// The name inject custom param decorator with resolver
export const INJECT_CUSTOM_METHOD = 'inject_custom_method';
// The name inject custom param decorator with resolver
export const INJECT_CUSTOM_PARAM = 'inject_custom_param';
//
// // used to store constructor arguments tags
// export const TAGGED = 'injection:tagged';
//
// // used to store class properties tags
// export const TAGGED_PROP = 'injection:tagged_props';
// used to store class to be injected
export const TAGGED_CLS = 'injection:tagged_class';
// used to store function to be injected
export const TAGGED_FUN = 'injection:tagged_function';
export const OBJ_DEF_CLS = 'injection:object_definition_class';
// pipeline
export const PIPELINE_IDENTIFIER = '__pipeline_identifier__';
// lifecycle interface
export const LIFECYCLE_IDENTIFIER_PREFIX = '__lifecycle__';
export const MAIN_MODULE_KEY = '__main__';
export const PRIVATE_META_DATA_KEY = '__midway_private_meta_data__';