- createConfigurationRepository
- ConfigurationRepository
- ConfigurationRequest
- configurationRequestTypes
- ConfigurationRequestTypes
Create a new instance of a ConfigurationRepository
optionsobject? See belowoptions.cachecacheManager? An instance of a cache from the npm package 'cache-manager'. Defaults to in memory cacheoptions.cacheKeystring? A key used to isolate the configuration cache from other cache namespaces. Defaults to 'configuration'options.logobject? A pino compatible logger. Defaults to a noop loggeroptions.smClientobject? An AWS SDK SecretsManager client. Defaults to a new SecretsManager().options.ssmClientobject? An AWS SDK SSM client. Defaults to a new SSM().
Returns ConfigurationRepository The configuration repository
THIS IS NOT INTENDED TO BE CONSTRUCTED BY HAND. Please use createConfigurationRepository
optionsobject Internal use
Get a configuration object based on a provided array of configuration requests
arrayOfConfigurationRequestsArray<ConfigurationRequest>
Returns object An object with properties based on the ConfigurationRequest objects provided and values of the adapter configuration responses
A request for a configuration value
optionsobject See belowoptions.adapterFunction? A function that will be passed the raw value and be allowed to modify it before returning (optional, defaultx=>x)options.keystring The key for the requested configuration. For SSM the parameter path, for Secrets manager the secret name.options.propertyNamestring The property name the value will be assigned to in the response object from getting configurationoptions.typeConfigurationRequestTypes The type of configuration request
The available types of configuration requests
Local
Secrets manager
SSM
configurationRequestTypes accessor object *
Check to see if a given string is a valid ConfigurationRequestTypes
possibleTypestring Possible ConfigurationRequestTypes
Returns boolean True for value, false for invalid