Aller au contenu principal
Version: Next

@midwayjs/decorator

Index

Classes

Enumerations

Functions

Interfaces

Namespaces

Type Aliases

Variables

Type Aliases

ConsumerRunConfig

ConsumerRunConfig: { autoCommit?: boolean; autoCommitInterval?: number | null; autoCommitThreshold?: number | null; eachBatchAutoResolve?: boolean; partitionsConsumedConcurrently?: number }

ConsumerSubscribeTopic

ConsumerSubscribeTopic: { fromBeginning?: boolean }
@deprecated

Replaced by ConsumerSubscribeTopics

ConsumerSubscribeTopics

ConsumerSubscribeTopics: { fromBeginning?: boolean }

CustomParamDecorator

Type parameters

  • T = unknown

ExpressLikeCustomParamDecorator

ExpressLikeCustomParamDecorator<T>: (req: any, res: any) => T | Promise<T>

Type parameters

  • T = unknown

GroupModeType

GroupModeType: one | multi

KoaLikeCustomParamDecorator

KoaLikeCustomParamDecorator<T>: (ctx: IMidwayContext) => T | Promise<T>

Type parameters

  • T = unknown

MatchPattern

MatchPattern<CtxOrReq, Res>: (ctxOrReq: CtxOrReq, res: Res) => boolean | string | string[] | boolean

Type parameters

  • CtxOrReq = any
  • Res = any

MiddlewareParamArray

MiddlewareParamArray: (string | any)[]

ObjectIdentifier

ObjectIdentifier: string | Symbol

Variables

constALL

ALL: common:all_value_key = "common:all_value_key"

constAPPLICATION_CONTEXT_KEY

APPLICATION_CONTEXT_KEY: __midway_application_context__ = "__midway_application_context__"

constAPPLICATION_KEY

APPLICATION_KEY: __midway_framework_app__ = "__midway_framework_app__"

constASPECT_KEY

ASPECT_KEY: common:aspect = "common:aspect"

constCATCH_KEY

CATCH_KEY: common:catch = "common:catch"

constCLASS_KEY_CONSTRUCTOR

CLASS_KEY_CONSTRUCTOR: midway:class_key_constructor = "midway:class_key_constructor"

constCONFIGURATION_KEY

CONFIGURATION_KEY: common:configuration = "common:configuration"

constCONFIG_KEY

CONFIG_KEY: config = "config"

constCONTROLLER_KEY

CONTROLLER_KEY: web:controller = "web:controller"

constFACTORY_SERVICE_CLIENT_KEY

FACTORY_SERVICE_CLIENT_KEY: common:service_factory:client = "common:service_factory:client"

constFORMAT

FORMAT: { CRONTAB: { EVERY_DAY: string; EVERY_DAY_ONE_FIFTEEN: string; EVERY_DAY_ZERO_FIFTEEN: string; EVERY_HOUR: string; EVERY_MINUTE: string; EVERY_PER_10_MINUTE: string; EVERY_PER_10_SECOND: string; EVERY_PER_30_MINUTE: string; EVERY_PER_30_SECOND: string; EVERY_PER_5_MINUTE: string; EVERY_PER_5_SECOND: string; EVERY_SECOND: string }; MS: { ONE_DAY: number; ONE_HOUR: number; ONE_MINUTE: number; ONE_SECOND: number; ONE_WEEK: number; ONE_YEAR: number } }

constFRAMEWORK_KEY

FRAMEWORK_KEY: common:framework = "common:framework"

constFUNC_KEY

FUNC_KEY: faas:func = "faas:func"

constFileUtils

FileUtils: { exists: typeof exists }

constGUARD_KEY

GUARD_KEY: common:guard = "common:guard"

constHSF_KEY

HSF_KEY: rpc:hsf = "rpc:hsf"

constINJECT_CLASS_KEY_PREFIX

INJECT_CLASS_KEY_PREFIX: INJECTION_CLASS_META_DATA = "INJECTION_CLASS_META_DATA"

constINJECT_CUSTOM_METHOD

INJECT_CUSTOM_METHOD: inject_custom_method = "inject_custom_method"

constINJECT_CUSTOM_PARAM

INJECT_CUSTOM_PARAM: inject_custom_param = "inject_custom_param"

constINJECT_CUSTOM_PROPERTY

INJECT_CUSTOM_PROPERTY: inject_custom_property = "inject_custom_property"

constINJECT_TAG

INJECT_TAG: inject = "inject"

constLIFECYCLE_IDENTIFIER_PREFIX

LIFECYCLE_IDENTIFIER_PREFIX: __lifecycle__ = "__lifecycle__"

constLOGGER_KEY

LOGGER_KEY: logger = "logger"

constMAIN_MODULE_KEY

MAIN_MODULE_KEY: __main__ = "__main__"

constMATCH_KEY

MATCH_KEY: common:match = "common:match"

constMOCK_KEY

MOCK_KEY: common:mock = "common:mock"

constMODULE_TASK_KEY

MODULE_TASK_KEY: task:task = "task:task"

constMODULE_TASK_METADATA

MODULE_TASK_METADATA: task:task:options = "task:task:options"

constMODULE_TASK_QUEUE_KEY

MODULE_TASK_QUEUE_KEY: task:task:queue = "task:task:queue"

constMODULE_TASK_QUEUE_OPTIONS

MODULE_TASK_QUEUE_OPTIONS: task:task:queue:options = "task:task:queue:options"

constMODULE_TASK_TASK_LOCAL_KEY

MODULE_TASK_TASK_LOCAL_KEY: task:task:task_local = "task:task:task_local"

constMODULE_TASK_TASK_LOCAL_OPTIONS

MODULE_TASK_TASK_LOCAL_OPTIONS: task:task:task_local:options = "task:task:task_local:options"

constMS_CONSUMER_KEY

MS_CONSUMER_KEY: ms:consumer = "ms:consumer"

constMS_DUBBO_METHOD_KEY

MS_DUBBO_METHOD_KEY: ms:dubbo:method = "ms:dubbo:method"

constMS_GRPC_METHOD_KEY

MS_GRPC_METHOD_KEY: ms:grpc:method = "ms:grpc:method"

constMS_HSF_METHOD_KEY

MS_HSF_METHOD_KEY: ms:hsf:method = "ms:hsf:method"

constMS_PRODUCER_KEY

MS_PRODUCER_KEY: ms:producer = "ms:producer"

constMS_PROVIDER_KEY

MS_PROVIDER_KEY: ms:provider = "ms:provider"

constNAMED_TAG

NAMED_TAG: named = "named"

constOBJ_DEF_CLS

OBJ_DEF_CLS: injection:object_definition_class = "injection:object_definition_class"

constPIPELINE_IDENTIFIER

PIPELINE_IDENTIFIER: __pipeline_identifier__ = "__pipeline_identifier__"

constPLUGIN_KEY

PLUGIN_KEY: plugin = "plugin"

constPRELOAD_MODULE_KEY

PRELOAD_MODULE_KEY: INJECTION_PRELOAD_MODULE_KEY = "INJECTION_PRELOAD_MODULE_KEY"

constPRIVATE_META_DATA_KEY

PRIVATE_META_DATA_KEY: __midway_private_meta_data__ = "__midway_private_meta_data__"

constRPC_DUBBO_KEY

RPC_DUBBO_KEY: rpc:dubbo = "rpc:dubbo"

constRPC_GRPC_KEY

RPC_GRPC_KEY: rpc:grpc = "rpc:grpc"

constRequestMethod

RequestMethod: { ALL: string; DELETE: string; GET: string; HEAD: string; OPTIONS: string; PATCH: string; POST: string; PUT: string }

constSCHEDULE_KEY

SCHEDULE_KEY: common:schedule = "common:schedule"

constSERVERLESS_FUNC_KEY

SERVERLESS_FUNC_KEY: faas:serverless:function = "faas:serverless:function"

constTAGGED_CLS

TAGGED_CLS: injection:tagged_class = "injection:tagged_class"

constTAGGED_FUN

TAGGED_FUN: injection:tagged_function = "injection:tagged_function"

constTypes

Types: { isAsyncFunction: typeof isAsyncFunction; isClass: typeof isClass; isFunction: typeof isFunction; isGeneratorFunction: typeof isGeneratorFunction; isMap: typeof isMap; isNull: typeof isNull; isNullOrUndefined: typeof isNullOrUndefined; isNumber: typeof isNumber; isObject: typeof isObject; isPlainObject: typeof isPlainObject; isPromise: typeof isPromise; isProxy: typeof isProxy; isRegExp: typeof isRegExp; isSet: typeof isSet; isString: typeof isString; isUndefined: typeof isUndefined }

constUtils

Utils: { camelCase: typeof camelCase; generateRandomId: typeof generateRandomId; getParamNames: typeof getParamNames; isTypeScriptEnvironment: typeof isTypeScriptEnvironment; pascalCase: typeof pascalCase; randomUUID: typeof randomUUID; safeParse: typeof safeParse; safeStringify: typeof safeStringify; sleep: typeof sleep; toAsyncFunction: typeof toAsyncFunction }

constWEB_RESPONSE_CONTENT_TYPE

WEB_RESPONSE_CONTENT_TYPE: web:response_content_type = "web:response_content_type"

constWEB_RESPONSE_HEADER

WEB_RESPONSE_HEADER: web:response_header = "web:response_header"

constWEB_RESPONSE_HTTP_CODE

WEB_RESPONSE_HTTP_CODE: web:response_http_code = "web:response_http_code"

constWEB_RESPONSE_KEY

WEB_RESPONSE_KEY: web:response = "web:response"

constWEB_RESPONSE_REDIRECT

WEB_RESPONSE_REDIRECT: web:response_redirect = "web:response_redirect"

constWEB_RESPONSE_RENDER

WEB_RESPONSE_RENDER: web:response_render = "web:response_render"

constWEB_ROUTER_KEY

WEB_ROUTER_KEY: web:router = "web:router"

constWEB_ROUTER_PARAM_KEY

WEB_ROUTER_PARAM_KEY: web:router_param = "web:router_param"

constWS_CONTROLLER_KEY

WS_CONTROLLER_KEY: ws:controller = "ws:controller"

constWS_EVENT_KEY

WS_EVENT_KEY: ws:event = "ws:event"