FlatImage
A configurable Linux containerization system
Loading...
Searching...
No Matches
ns_db::ns_env::anonymous_namespace{env.hpp} Namespace Reference

Functions

std::unordered_map< std::string, std::string > map (std::vector< std::string > const &entries)
 Given a string with an environment variable entry, splits the variable into key and value.
 
Value< void > validate (std::vector< std::string > const &entries)
 Validates environment variable entries.
 

Function Documentation

◆ map()

std::unordered_map< std::string, std::string > ns_db::ns_env::anonymous_namespace{env.hpp}::map ( std::vector< std::string > const & entries)
inlinenodiscard

Given a string with an environment variable entry, splits the variable into key and value.

Parameters
entriesThe environment variables, each entry has the format 'key=var'
Returns
The list of key/value pairs, invalid entries are ignored

Definition at line 43 of file env.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ validate()

Value< void > ns_db::ns_env::anonymous_namespace{env.hpp}::validate ( std::vector< std::string > const & entries)
inlinenodiscard

Validates environment variable entries.

The validation makes sure they are in the 'key=val' format

Parameters
entriesThe entries to validate
Returns
Nothing if all variables are valid or the respective error

Definition at line 63 of file env.hpp.

Here is the call graph for this function:
Here is the caller graph for this function: