Address a bunch of review comments
This commit is contained in:
parent
4d139943f2
commit
b4ace6ec6f
11 changed files with 27 additions and 19 deletions
|
@ -10,6 +10,11 @@
|
|||
|
||||
namespace WebService {
|
||||
|
||||
TelemetryJson::TelemetryJson(const std::string& host, const std::string& username,
|
||||
const std::string& token)
|
||||
: host(std::move(host)), username(std::move(username)), token(std::move(token)) {}
|
||||
TelemetryJson::~TelemetryJson() = default;
|
||||
|
||||
template <class T>
|
||||
void TelemetryJson::Serialize(Telemetry::FieldType type, const std::string& name, T value) {
|
||||
sections[static_cast<u8>(type)][name] = value;
|
||||
|
|
|
@ -18,9 +18,8 @@ namespace WebService {
|
|||
*/
|
||||
class TelemetryJson : public Telemetry::VisitorInterface {
|
||||
public:
|
||||
TelemetryJson(const std::string& host, const std::string& username, const std::string& token)
|
||||
: host(host), username(username), token(token) {}
|
||||
~TelemetryJson() = default;
|
||||
TelemetryJson(const std::string& host, const std::string& username, const std::string& token);
|
||||
~TelemetryJson();
|
||||
|
||||
void Visit(const Telemetry::Field<bool>& field) override;
|
||||
void Visit(const Telemetry::Field<double>& field) override;
|
||||
|
|
|
@ -13,12 +13,12 @@
|
|||
|
||||
namespace WebService {
|
||||
|
||||
static constexpr char API_VERSION[]{"1"};
|
||||
constexpr char API_VERSION[]{"1"};
|
||||
|
||||
constexpr int HTTP_PORT = 80;
|
||||
constexpr int HTTPS_PORT = 443;
|
||||
constexpr u32 HTTP_PORT = 80;
|
||||
constexpr u32 HTTPS_PORT = 443;
|
||||
|
||||
constexpr int TIMEOUT_SECONDS = 30;
|
||||
constexpr u32 TIMEOUT_SECONDS = 30;
|
||||
|
||||
Client::JWTCache Client::jwt_cache{};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue