Skip to main content

present_config_value

Function present_config_value 

Source
pub fn present_config_value(
    value_type: impl Into<ConfigValueType>,
    value: String,
    is_sensitive: bool,
    on_invalid: impl FnOnce(&ConfigCoreError),
) -> ConfigValue
Expand description

Builds a configuration value for API presentation.

Sensitive values are redacted and malformed historical storage values fall back to an empty value for the declared type. Products should use this in API read/list paths instead of repeating redaction and lossy parsing logic in each service.