Recfactored and simplified more code

- Added function to convert color string to ansi color string
- Added `trim` and `join` utility functions
- Added initial plugin test case
- Implemented `config get` command to see config properties
- Improved logging functionality and removed duplicate logging functions
- Removed unused functions
- Fixed more styling issues
- Fixed some CLI commands not working correctly
- Fixed CLI documentation format
- Fixed some error handling issues
This commit is contained in:
David Allen 2023-06-18 10:47:05 -06:00
parent e48c54aa40
commit 02a4e879a8
21 changed files with 541 additions and 384 deletions

View file

@ -8,14 +8,8 @@
#include "config.hpp"
namespace gdpm::remote{
using repo_names = string_list;
using repo_urls = string_list;
using repository_map = string_map;
GDPM_DLL_EXPORT error handle_remote(config::context& config, const args_t& args, const var_opts& opts);
GDPM_DLL_EXPORT void set_repositories(config::context& context, const repository_map& repos);
GDPM_DLL_EXPORT void add_repositories(config::context& context, const repository_map& repos);
GDPM_DLL_EXPORT void remove_respositories(config::context& context, const repo_names& names);
GDPM_DLL_EXPORT void move_repository(config::context& context, int old_position, int new_position);
GDPM_DLL_EXPORT void print_repositories(const config::context& context);
GDPM_DLL_EXPORT error add_repository(config::context& config, const args_t& args);
GDPM_DLL_EXPORT error remove_respositories(config::context& config, const args_t& names);
GDPM_DLL_EXPORT void move_repository(config::context& config, int old_position, int new_position);
GDPM_DLL_EXPORT void print_repositories(const config::context& config);
}