FlatImage
A configurable Linux containerization system
Loading...
Searching...
No Matches
ns_db::ns_recipe::Recipe Class Reference

Public Member Functions

 Recipe ()
 Construct a new Recipe:: Recipe object.
 
std::string const & get_description () const
 
std::vector< std::string > const & get_packages () const
 
std::vector< std::string > const & get_dependencies () const
 
Value< ns_desktop::Desktop > const & get_desktop () const
 
void set_description (std::string_view str_description)
 
void set_packages (std::vector< std::string > const &vec_packages)
 
void set_dependencies (std::vector< std::string > const &vec_dependencies)
 
void set_desktop (Value< ns_desktop::Desktop > const &desktop)
 

Friends

Value< Recipedeserialize (std::string_view raw_json)
 Deserializes JSON string into a Binds object.
 
Value< std::string > serialize (Recipe const &recipe)
 Serializes a Recipe class into a json string.
 

Detailed Description

Definition at line 30 of file recipe.hpp.

Constructor & Destructor Documentation

◆ Recipe()

ns_db::ns_recipe::Recipe::Recipe ( )
inline

Construct a new Recipe:: Recipe object.

Definition at line 54 of file recipe.hpp.

Here is the caller graph for this function:

Member Function Documentation

◆ get_dependencies()

std::vector< std::string > const & ns_db::ns_recipe::Recipe::get_dependencies ( ) const
inline

Definition at line 41 of file recipe.hpp.

◆ get_description()

std::string const & ns_db::ns_recipe::Recipe::get_description ( ) const
inline

Definition at line 39 of file recipe.hpp.

◆ get_desktop()

Value< ns_desktop::Desktop > const & ns_db::ns_recipe::Recipe::get_desktop ( ) const
inline

Definition at line 42 of file recipe.hpp.

◆ get_packages()

std::vector< std::string > const & ns_db::ns_recipe::Recipe::get_packages ( ) const
inline

Definition at line 40 of file recipe.hpp.

◆ set_dependencies()

void ns_db::ns_recipe::Recipe::set_dependencies ( std::vector< std::string > const & vec_dependencies)
inline

Definition at line 45 of file recipe.hpp.

◆ set_description()

void ns_db::ns_recipe::Recipe::set_description ( std::string_view str_description)
inline

Definition at line 43 of file recipe.hpp.

◆ set_desktop()

void ns_db::ns_recipe::Recipe::set_desktop ( Value< ns_desktop::Desktop > const & desktop)
inline

Definition at line 46 of file recipe.hpp.

◆ set_packages()

void ns_db::ns_recipe::Recipe::set_packages ( std::vector< std::string > const & vec_packages)
inline

Definition at line 44 of file recipe.hpp.

Friends And Related Symbol Documentation

◆ deserialize

Value< Recipe > deserialize ( std::string_view 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 ( Recipe const & recipe)
friend

Serializes a Recipe class into a json string.

Parameters
recipeThe Recipe object to serialize
Returns
The serialized json data;

Definition at line 93 of file recipe.hpp.


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