FlatImage
A configurable Linux containerization system
Loading...
Searching...
No Matches
ns_db::ns_portal::ns_message::Message Class Reference

Public Member Functions

 Message (pid_t pid, std::vector< std::string > const &command, fs::path const &path_dir_fifo, std::vector< std::string > const &environment)
 Construct a new Message:: Message object.
 
std::vector< std::string > const & get_command () const
 
fs::path get_stdin () const
 
fs::path get_stdout () const
 
fs::path get_stderr () const
 
fs::path get_exit () const
 
fs::path get_pid () const
 
std::vector< std::string > const & get_environment () const
 

Friends

Value< Messagedeserialize (std::string_view str_raw_json)
 Deserializes JSON string into a Binds object.
 
Value< std::string > serialize (Message const &message)
 Serializes a Message class into a json string.
 

Detailed Description

Definition at line 36 of file message.hpp.

Constructor & Destructor Documentation

◆ Message()

ns_db::ns_portal::ns_message::Message::Message ( pid_t pid,
std::vector< std::string > const & command,
fs::path const & path_dir_fifo,
std::vector< std::string > const & environment )
inline

Construct a new Message:: Message object.

Definition at line 85 of file message.hpp.

Member Function Documentation

◆ get_command()

std::vector< std::string > const & ns_db::ns_portal::ns_message::Message::get_command ( ) const
inline

Definition at line 56 of file message.hpp.

◆ get_environment()

std::vector< std::string > const & ns_db::ns_portal::ns_message::Message::get_environment ( ) const
inline

Definition at line 62 of file message.hpp.

◆ get_exit()

fs::path ns_db::ns_portal::ns_message::Message::get_exit ( ) const
inline

Definition at line 60 of file message.hpp.

◆ get_pid()

fs::path ns_db::ns_portal::ns_message::Message::get_pid ( ) const
inline

Definition at line 61 of file message.hpp.

◆ get_stderr()

fs::path ns_db::ns_portal::ns_message::Message::get_stderr ( ) const
inline

Definition at line 59 of file message.hpp.

◆ get_stdin()

fs::path ns_db::ns_portal::ns_message::Message::get_stdin ( ) const
inline

Definition at line 57 of file message.hpp.

◆ get_stdout()

fs::path ns_db::ns_portal::ns_message::Message::get_stdout ( ) const
inline

Definition at line 58 of file message.hpp.

Friends And Related Symbol Documentation

◆ deserialize

Value< Message > deserialize ( std::string_view str_raw_json)
friend

Deserializes JSON string into a Binds object.

Parses a JSON string containing bind mount configurations and constructs a Binds object. Each JSON entry should have "src", "dst", and "type" fields. The type field must be "ro" (read-only), "rw" (read-write), or "dev" (device). Entries with invalid indices are logged as warnings and skipped. Successfully parsed entries are added to the Binds collection with their respective indices, source paths, destination paths, and access types.

Parameters
raw_jsonThe JSON string containing bind mount configurations
Returns
Value<Binds> The deserialized Binds object on success, or error on parse failure

Deserializes JSON string into a Binds object.

Parameters
str_raw_jsonThe json string which to deserialize
Returns
The Boot class or the respective error

Deserializes JSON string into a Binds object.

Parameters
raw_jsonThe json string which to deserialize
Returns
The Desktop class or the respective error

Deserializes JSON string into a Binds object.

Parameters
str_raw_jsonThe json string which to deserialize
Returns
The Logs class or the respective error

Deserializes JSON string into a Binds object.

Parameters
str_raw_jsonThe json string which to deserialize
Returns
The Daemon class or the respective error

Deserializes JSON string into a Binds object.

Parameters
str_raw_jsonThe json string which to deserialize
Returns
The Dispatcher class or the respective error

Deserializes JSON string into a Binds object.

Parameters
str_raw_jsonThe json string which to deserialize
Returns
The Message class or the respective error

Deserializes JSON string into a Binds object.

Parameters
raw_jsonThe json string which to deserialize
Returns
The Recipe class or the respective error

Definition at line 184 of file bind.hpp.

◆ serialize

Value< std::string > serialize ( Message const & message)
friend

Serializes a Message class into a json string.

Parameters
messageThe Message object to serialize
Returns
The serialized json data;

Definition at line 129 of file message.hpp.


The documentation for this class was generated from the following file: