Type alias GatewayControllerCreatorOptions

GatewayControllerCreatorOptions: DeepPartial<GatewayControllerExtraOptions> & {
    gatewayClass?: typeof GatewayController;
    gatewaySettingName?: string;
    getMiddlewares?: GatewayControllerGetMiddlewaresFn;
    helperServiceName?: string;
    serviceName?: string;
}

The options for the controller creator that mounts the GatewayController.

Type declaration

  • Optional gatewayClass?: typeof GatewayController

    The class the creator will instantiate. Similar to the API Client, this allows for extra customization as you can send a custom subclass of the GatewayController.

    Default

    GatewayController
    
  • Optional gatewaySettingName?: string

    The name of the configuration setting where the gateway configuration is stored. If not overwritten, check the description of serviceName to understand which will be its default value.

    Default

    'api'
    
  • Optional getMiddlewares?: GatewayControllerGetMiddlewaresFn

    A function to generate a list of middlewares that can be executed before the controller main middleware.

  • Optional helperServiceName?: string

    The name of the helper service the creator will try to obtain from the container. If serviceName is overwritten, the default for this will be ${serviceName}Helper.

    Default

    'apiGatewayHelper'
    
  • Optional serviceName?: string

    The name the creator will use to register the controller in the container. No, this is not a typo. The creator will register the controller so other services can access the getAPIConfig method. The service will be available after the app routes are mounted. If this is overwritten, the creator will ensure that the name ends with Gateway; and if overwritten, but it doesn't include Gateway at the end, and no gatewaySettingName was defined, the creator will use the custom name (without Gatway) for gatewaySettingName.

    Default

    'apiGateway'
    

Generated using TypeDoc