37namespace fs = std::filesystem;
44 std::vector<std::string> args;
50 std::vector<std::string> args;
53ENUM(CmdPermsOp,ADD,CLEAR,DEL,LIST,SET);
56 using Permission = ns_reserved::ns_permissions::Permission;
59 std::set<Permission> permissions;
66 std::set<Permission> permissions;
73 std::set<Permission> permissions;
75 std::variant<Add,Clear,Del,List,Set> sub_cmd;
78ENUM(CmdEnvOp,ADD,CLEAR,DEL,LIST,SET);
83 std::vector<std::string> variables;
90 std::vector<std::string> variables;
97 std::vector<std::string> variables;
99 std::variant<Add,Clear,Del,List,Set> sub_cmd;
102ENUM(CmdDesktopOp,CLEAN,DUMP,ENABLE,SETUP);
103ENUM(CmdDesktopDump,ENTRY,ICON,MIMETYPE);
113 fs::path path_file_icon;
121 std::variant<Icon,Entry,MimeType> sub_cmd;
125 std::set<ns_desktop::IntegrationItem> set_enable;
129 std::filesystem::path path_file_setup;
131 std::variant<Clean,Dump,Enable,Setup> sub_cmd;
134ENUM(CmdBootOp,SET,SHOW,CLEAR);
143 std::vector<std::string> args;
148 std::variant<Clear,Set,Show> sub_cmd;
151ENUM(CmdRemoteOp,SET,SHOW,CLEAR);
164 std::variant<Clear,Set,Show> sub_cmd;
167ENUM(CmdRecipeOp,FETCH,INFO,INSTALL);
172 std::vector<std::string> recipes;
176 std::vector<std::string> recipes;
180 std::vector<std::string> recipes;
182 std::variant<Fetch,Info,Install> sub_cmd;
185ENUM(CmdLayerOp,ADD,COMMIT,CREATE,LIST);
186ENUM(CmdLayerCommitOp,BINARY,LAYER,FILE);
191 fs::path path_file_src;
203 fs::path path_file_dst;
205 std::variant<Binary,Layer,File> sub_cmd;
209 fs::path path_dir_src;
210 fs::path path_file_target;
215 std::variant<Add,Commit,Create,List> sub_cmd;
218ENUM(CmdBindOp,ADD,DEL,LIST);
223 ns_db::ns_bind::Type type;
234 std::variant<Add,Del,List> sub_cmd;
237ENUM(CmdNotifySwitch,ON,OFF);
240 CmdNotifySwitch status;
243ENUM(CmdCaseFoldSwitch,ON,OFF);
246 CmdCaseFoldSwitch status;
249ENUM(CmdInstanceOp,EXEC,LIST);
255 std::vector<std::string> args;
260 std::variant<Exec,List> sub_cmd;
263ENUM(CmdOverlayOp,SET,SHOW);
268 ns_reserved::ns_overlay::OverlayType overlay;
273 std::variant<Set,Show> sub_cmd;
276ENUM(CmdUnshareOp,ADD,CLEAR,DEL,LIST,SET);
279 using Unshare = ns_reserved::ns_unshare::Unshare;
282 std::set<Unshare> unshares;
289 std::set<Unshare> unshares;
296 std::set<Unshare> unshares;
298 std::variant<Add,Clear,Del,List,Set> sub_cmd;
301ENUM(CmdVersionOp,SHORT,FULL,DEPS);
316 db(
"VERSION") = FIM_VERSION;
317 db(
"COMMIT") = FIM_COMMIT;
318 db(
"DISTRIBUTION") = FIM_DIST;
319 db(
"TIMESTAMP") = FIM_TIMESTAMP;
320 return Pop(db.
dump());
328 constexpr static char str_raw_json[] =
335 std::variant<Short,Full,Deps> sub_cmd;
346using CmdType = std::variant<
CmdRoot
A type-safe wrapper around nlohmann::json for database operations.
Value< std::string > dump()
Serializes the current JSON data to a formatted string.
Used to manage the bindings from the host to the sandbox.
Custom enumeration class.
Value< Db > from_string(S &&s)
Parses a JSON string and creates a Db object.
Command interface definitions and argument structures.
Manages the desktop integration.
Manages the permissions reserved space.
Manages the unshare namespace options reserved space.
Enhanced expected type with integrated logging capabilities.