Reader Module
Reading config vars from environment variables.
Functions and values
| Function or value |
Description
|
|
Read a config var from environment, parse to typed value. Returns Result for composable error handling: - Required missing/empty → Error with message - Required invalid → Error with parse message - Optional missing/empty → Ok None - Optional invalid → Error with parse message - Valid → Ok (Some value)
|
|
|
Full Usage:
readBoolOrDefault def defaultValue
Parameters:
ConfigVarDef
defaultValue : bool
Returns: bool
|
Read bool with default (for optional vars or missing values)
|
|
|
Full Usage:
readIntOrDefault def defaultValue
Parameters:
ConfigVarDef
defaultValue : int
Returns: int
|
Read int with default (for optional vars or missing values)
|
|
|
|
Validate all required vars are set and have valid values. Returns a list of error messages for any missing or invalid vars.
|
UnionConfig