Expand description
Module that initializes the logger and loads the configuration into a dedicated Struct.
FunctionsΒ§
- get_
config - Retrieves the environment variables and parses as the data-type specified in Config struct.
- get_
time π - Get the current time in a specific format.
- init_
logger - 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> - validate_
dir_ πstructure - 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.