Aller au contenu principal
Version: Next

Framework

Hierarchy

Index

Constructors

constructor

Properties

publicapp

readonlyapplicationContext

applicationContext: IMidwayContainer

configService

configService: MidwayConfigService

configurationOptions

configurationOptions: IMidwayGRPFrameworkOptions

environmentService

environmentService: MidwayEnvironmentService

informationService

informationService: MidwayInformationService

loggerService

loggerService: MidwayLoggerService

middlewareService

middlewareService: MidwayMiddlewareService<Context<unknown, unknown>, unknown, unknown>

mockService

mockService: MidwayMockService

providerConfig

providerConfig: any

Methods

applicationInitialize

  • applicationInitialize(options: Partial<IMidwayBootstrapOptions>): Promise<void>

applyMiddleware

  • applyMiddleware<R, N>(lastMiddleware?: CommonMiddlewareUnion<Context<unknown, unknown>, R, N>): Promise<MiddlewareRespond<Context<unknown, unknown>, R, N>>
  • Type parameters

    • R
    • N

publicbeforeStop

  • beforeStop(): Promise<void>

configure

  • configure(): any

createLogger

  • createLogger(name: string, option?: MidwayLoggerOptions): any

getAppDir

  • getAppDir(): string

getApplication

getApplicationContext

  • getApplicationContext(): IMidwayContainer

getBaseDir

  • getBaseDir(): string

getConfiguration

  • getConfiguration(key?: string): any

getCoreLogger

  • getCoreLogger(): ILogger

getCurrentEnvironment

  • getCurrentEnvironment(): string

publicgetFrameworkName

  • getFrameworkName(): string

publicgetFrameworkType

getLogger

  • getLogger(name?: string): any

getMiddleware

  • getMiddleware(): ContextMiddlewareManager<Context<unknown, unknown>, unknown, unknown>

getNamespace

  • getNamespace(): string

getProjectName

  • getProjectName(): string

publicgetServer

  • getServer(): Server

init

initialize

  • initialize(options?: IMidwayBootstrapOptions): Promise<void>

isEnable

  • isEnable(): boolean

publicrun

  • run(): Promise<void>

runGuard

  • runGuard(ctx: Context<unknown, unknown>, supplierClz: new (...args: any[]) => any, methodName: string): Promise<boolean>

setNamespace

  • setNamespace(namespace: string): void

stop

  • stop(): Promise<void>

useFilter

  • useFilter(filter: CommonFilterUnion<Context<unknown, unknown>, unknown, unknown>): void

useGuard

  • useGuard(guards: CommonGuardUnion<Context<unknown, unknown>>): void

useMiddleware

  • useMiddleware(middleware: CommonMiddlewareUnion<Context<unknown, unknown>, unknown, unknown>): void