|
virthttp
0.0
libvirt http interface
|
#include <domain.hpp>
Public Member Functions | |
| DomainHandlers (HandlerContext &ctx, virt::Domain &dom) | |
| DependsOutcome | create (const rapidjson::Value &obj) override |
| DependsOutcome | query (const rapidjson::Value &action) override |
| DependsOutcome | alter (const rapidjson::Value &action) override |
| DependsOutcome | vacuum (const rapidjson::Value &action) override |
Public Member Functions inherited from HandlerMethods | |
| constexpr | HandlerMethods (HandlerContext &hc) noexcept |
Additional Inherited Members | |
Public Types inherited from HandlerMethods | |
| using | Verbs = VerbList< boost::beast::http::verb::post, boost::beast::http::verb::get, boost::beast::http::verb::patch, boost::beast::http::verb::delete_ > |
Static Public Member Functions inherited from HandlerMethods | |
| static constexpr long | verb_to_idx (boost::beast::http::verb v) noexcept |
Public Attributes inherited from HandlerContext | |
| virt::Connection & | conn |
| the connection to perform libvirt operations through (plans to change to a vector) More... | |
| JsonRes & | json_res |
| the result of running the handlers to be sent to the client More... | |
| const TargetParser & | target |
| the incoming request's URI target More... | |
Static Public Attributes inherited from HandlerMethods | |
| static constexpr std::array | methods = {&HandlerMethods::create, &HandlerMethods::query, &HandlerMethods::alter, &HandlerMethods::vacuum} |
Protected Member Functions inherited from HandlerContext | |
| template<class... Args> | |
| auto | error (Args &&...args) const noexcept(noexcept(json_res.error(std::forward< Args >(args)...))) -> decltype(json_res.error(std::forward< Args >(args)...)) |
| const auto | fwd_err (bool fwd, int code) |
| const auto | fwd_as_if_err (int code) |
Domain-specific handlers
|
inlineexplicit |
|
inlineoverridevirtual |
Performs the described modification on the associated libvirt object(s) Is the handler for HTTP PATCH
| [in] | obj | the HTTP request body, parsed as JSON |
Implements HandlerMethods.
|
inlineoverridevirtual |
Creates an associated libvirt object. Is the handler for HTTP POST
| [in] | obj | the HTTP request body, parsed as JSON |
Implements HandlerMethods.
|
inlineoverridevirtual |
Retrieves information about the associated libvirt object(s) Is the handler for HTTP GET
| [in] | obj | the HTTP request body, parsed as JSON |
Implements HandlerMethods.
|
inlineoverridevirtual |
Removes the associated libvirt object(s) Is the handler for HTTP DELETE
| [in] | obj | the HTTP request body, parsed as JSON |
Implements HandlerMethods.
1.8.11