FlatImage
A configurable Linux containerization system
Loading...
Searching...
No Matches
env.hpp File Reference

Manages environment variables in flatimage. More...

#include <ranges>
#include <filesystem>
#include <format>
#include "../std/expected.hpp"
#include "../lib/env.hpp"
#include "../reserved/env.hpp"
#include "db.hpp"
Include dependency graph for env.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  ns_db::ns_env
 Environment variable database management.
 
namespace  ns_db
 JSON-based configuration database layer.
 

Functions

std::unordered_map< std::string, std::string > ns_db::ns_env::anonymous_namespace{env.hpp}::map (std::vector< std::string > const &entries)
 Given a string with an environment variable entry, splits the variable into key and value.
 
Value< void > ns_db::ns_env::anonymous_namespace{env.hpp}::validate (std::vector< std::string > const &entries)
 Validates environment variable entries.
 
Value< void > ns_db::ns_env::del (fs::path const &path_file_binary, std::vector< std::string > const &entries)
 Deletes a list of environment variables from the database.
 
Value< void > ns_db::ns_env::add (fs::path const &path_file_binary, std::vector< std::string > const &entries)
 Adds a new environment variable to the database.
 
Value< void > ns_db::ns_env::set (fs::path const &path_file_binary, std::vector< std::string > const &entries)
 Resets all defined environment variables to the ones passed as an argument.
 
Value< std::vector< std::string > > ns_db::ns_env::get (fs::path const &path_file_binary)
 Get existing variables from the database.
 

Detailed Description

Manages environment variables in flatimage.

Author
Ruan Formigoni

Definition in file env.hpp.