Integration.Config
Overview
This interface represents the configuration operations available when initializing a provider with the Config
function exported by this package.
The default provider implementation is @hv/environment-variables-config
and uses standard environment variables.
Functions
getInvariantValue
Retrieve an invariant (static) value from the server configuration.
Parameters
key
type: string
The key of the configuration value or group to retrieve.
Return Value
type: Promise<ServerConfig[TKey]>
A promise that resolves to the configuration value.
getValue
Retrieve a value from the server configuration with an optional context, such as locale.
Parameters
key
type: string
The key of the configuration value or group to retrieve.
context
(optional)
type: any
The context for retrieving the configuration value. The default provider expects an object with a locale
property.
Return Value
type: Promise<ServerConfig[TKey]>
A promise that resolves to the configuration value.
getAllPublicValues
Retrieve all public, non-sensitive values/groups from configuration.
Parameters
None
Return Value
type: Promise<PublicConfig[TKey]>
A promise that resolves to the public configuration values/groups.