13 #ifndef __PROCESS_HELP_HPP__ 14 #define __PROCESS_HELP_HPP__ 54 const std::string& tldr,
64 return "> " + usage +
"\n";
69 inline std::string
TLDR(
const std::string& tldr)
75 template <
typename... T>
86 return "This endpoint requires authentication iff HTTP authentication is\n" 89 return "This endpoint does not require authentication.\n";
94 template <
typename... T>
101 template <
typename... T>
123 void add(
const std::string&
id,
124 const std::string&
name,
128 bool remove(
const std::string& id,
const std::string&
name);
131 bool remove(
const std::string& id);
156 std::string getUsagePath(
const std::string&
id,
const std::string& name);
161 std::map<std::string, std::map<std::string, std::string>> helps;
166 #endif // __PROCESS_HELP_HPP__
std::string AUTHENTICATION(bool required)
Definition: help.hpp:83
Future< Response > request(const Request &request, bool streamedResponse=false)
Asynchronously sends an HTTP request to the process and returns the HTTP response once the entire res...
std::stringstream & join(std::stringstream &stream, const std::string &separator, T &&...args)
Definition: strings.hpp:307
Try< ResourceStatistics > usage(pid_t pid, bool mem=true, bool cpus=true)
std::string TLDR(const std::string &tldr)
Definition: help.hpp:69
void add(const std::string &id, const std::string &name, const Option< std::string > &help)
Definition: jsonify.hpp:326
Help(const Option< std::string > &delegate)
std::string HELP(const std::string &tldr, const Option< std::string > &description=None(), const Option< std::string > &authentication=None(), const Option< std::string > &authorization=None(), const Option< std::string > &references=None())
std::string REFERENCES(T &&...args)
Definition: help.hpp:102
Definition: executor.hpp:48
std::string USAGE(const std::string &usage)
Definition: help.hpp:62
friend void json(JSON::ObjectWriter *writer, const Help &help)
Definition: process.hpp:505
constexpr const char * name
Definition: shell.hpp:41
std::string AUTHORIZATION(T &&...args)
Definition: help.hpp:95
void initialize() override
Invoked when a process gets spawned.
std::string DESCRIPTION(T &&...args)
Definition: help.hpp:76