Expand description
Module that initializes the logger and loads the configuration into a dedicated Struct.
FunctionsΒ§
- Retrieves the environment variables and parses as the data-type specified in Config struct.
- get_time πGet the current time in a specific format.
- Initializes the logger based on the provided debug flag and cargo information.
- load_env_vars πHandler thatβs responsible to parse all the env vars.
- mandatory_vars πExtracts the mandatory env vars by key and parses it as
HashMap<String, String>andPathBuf - parse_bool πExtracts the env var by key and parses it as a
bool - parse_i64 πExtracts the env var by key and parses it as a
i64 - parse_max_payload πParses the maximum payload size from human-readable memory format to bytes.
- parse_memory π
- parse_path πExtracts the env var by key and parses it as a
PathBuf - parse_u16 πExtracts the env var by key and parses it as a
u16 - parse_usize πExtracts the env var by key and parses it as a
usize - parse_vec πExtracts the env var by key and parses it as a
Vec<String> - Validates the directory structure to ensure that the secure index is present in media sourceβs root.
- validate_vars πValidates all the required environment variables with the required settings.