Resolve "Auth for API"

This commit is contained in:
Florian Hoss 2022-04-21 13:16:54 +00:00
parent 6aee231a4e
commit b531b5b360
13 changed files with 226 additions and 132 deletions

View file

@ -0,0 +1,34 @@
#ifndef ESP32_STORAGE_HPP
#define ESP32_STORAGE_HPP
#include "Preferences.h"
#include "SPIFFS.h"
#include "Utils.hpp"
#include "SSLCert.hpp"
namespace firewall
{
class Storage
{
private:
Preferences memory;
ok_t mount_spiffs();
protected:
uint8_t retrieve_settings_value(const char *);
void store_settings_value(const char *, const uint8_t);
firewall_rule_t *retrieve_firewall_rule(const uint8_t);
void store_all_firewall_rules(firewall_rule_t *);
void store_firewall_rule(firewall_rule_t *);
httpsserver::SSLCert *retrieve_certificate();
void store_certificate(httpsserver::SSLCert *);
public:
Storage();
~Storage();
};
}
#endif