- createConfigurationRepository
- ConfigurationRepository
- ConfigurationRequest
- configurationRequestTypes
- ConfigurationRequestTypes
Create a new instance of a ConfigurationRepository
options
object? See belowoptions.cache
cacheManager? An instance of a cache from the npm package 'cache-manager'. Defaults to in memory cacheoptions.cacheKey
string? A key used to isolate the configuration cache from other cache namespaces. Defaults to 'configuration'options.log
object? A pino compatible logger. Defaults to a noop loggeroptions.smClient
object? An AWS SDK SecretsManager client. Defaults to a new SecretsManager().options.ssmClient
object? 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
options
object Internal use
Get a configuration object based on a provided array of configuration requests
arrayOfConfigurationRequests
Array<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
options
object See belowoptions.adapter
Function? A function that will be passed the raw value and be allowed to modify it before returning (optional, defaultx=>x
)options.key
string The key for the requested configuration. For SSM the parameter path, for Secrets manager the secret name.options.propertyName
string The property name the value will be assigned to in the response object from getting configurationoptions.type
ConfigurationRequestTypes 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
possibleType
string Possible ConfigurationRequestTypes
Returns boolean True for value, false for invalid