Options
All
  • Public
  • Public/Protected
  • All
Menu

Class LambdaServer

The Lambda entrypoint for Webda

This take the input coming from the API Gateway to transform it and analyse it with Webda Once execution is done, it will format the result in a way that the API Gateway will output the result You need to use the Webda deployment so the API Gateway has all the right templates in place

Hierarchy

  • Core
    • LambdaServer

Constructors

Properties

_ajv: any

JSON Schema validator instance

_ajvSchemas: any

JSON Schema registry

_awsEventsHandlers: any[] = []
_configFile: string
_currentExecutor: any

Current executor

_init: Promise<void>

Init promise to ensure, webda is initiated Used for init() method

_initPromise: Promise<void>
_initTime: number
_initiated: boolean
_requestFilters: RequestFilter<Context>[]

CORS Filter registry

Added via [[Webda.registerRequestFilter]] See [[CorsFilter]]

_result: any
application: Application
failedServices: object

Type declaration

  • [key: string]: any
router: Router
defaultMaxListeners: number

Methods

  • _getSetters(obj: any): any[]
  • addListener(event: string | symbol, listener: function): this
  • addRoute(url: string, info: RouteInfo): void
  • autoConnectServices(): void
  • checkRequest(ctx: Context): Promise<boolean>
  • emit(event: string | symbol, ...args: any[]): boolean
  • emitSync(event: any, ...data: any[]): Promise<any[]>
  • eventNames(): Array<string | symbol>
  • exportOpenAPI(skipHidden?: boolean): Document
  • getAppPath(subpath?: string): string
  • getApplication(): Application
  • getConfiguration(): Configuration
  • getDeployers(): object
  • getGlobalParams(): any
  • getLocales(): string[]
  • getLogger(clazz: string | Service): Logger
  • getMaxListeners(): number
  • getModel(name: any): any
  • getModels(): object
  • getModules(): CachedModule
  • getRouter(): Router
  • getSalt(): string
  • getSecret(): string
  • This should return a "turning" secret with cache and a service to modify it every x mins WARNING The security is lower without this "turning" secret, you can still set the global.secret parameter

    Dont rely on this method, it will probably disapear to avoid secret leak

    deprecated

    Returns string

    Current secret

  • getService<T>(name?: string): T
  • getServiceParams(service: string): any
  • getServices(): object
  • getServicesImplementations(type?: any): object
  • getStores(): object
  • getVersion(): string
  • getWorkerOutput(): WorkerOutput
  • handleAWSEvents(events: any): Promise<boolean>
  • handleLambdaReturn(ctx: Context): Promise<object>
  • init(): Promise<void>
  • initBeanRoutes(serviceBean: Service): void
  • initStatics(): void
  • isDebug(): boolean
  • jsonFilter(key: string, value: any): any
  • listenerCount(type: string | symbol): number
  • listeners(event: string | symbol): Function[]
  • newContext<T>(httpContext: HttpContext, stream?: any, noInit?: boolean): Promise<T>
  • off(event: string | symbol, listener: function): this
  • on(event: string | symbol, listener: function): this
  • once(event: string | symbol, listener: function): this
  • parameter(name: string): any
  • prependListener(event: string | symbol, listener: function): this
  • prependOnceListener(event: string | symbol, listener: function): this
  • rawListeners(event: string | symbol): Function[]
  • registerAWSEventsHandler(service: Service): void
  • registerModel(name: string, clazz: any): void
  • registerRequestFilter(filter: RequestFilter<Context>): void
  • reinit(updates: any): Promise<void>
  • reinitResolvedRoutes(): void
  • removeAllListeners(event?: string | symbol): this
  • removeListener(event: string | symbol, listener: function): this
  • removeRoute(url: string): void
  • sandbox(executor: any, code: any): any
  • setMaxListeners(n: number): this
  • toPublicJSON(object: any): string
  • updateContextWithRoute(ctx: Context): boolean
  • validate(object: any, schema: any): any
  • validationLastErrors(): any
  • listenerCount(emitter: EventEmitter, event: string | symbol): number

Generated using TypeDoc