Make it so DataBuckets set_data can take time formats such as 1s, 1m, 1d, 1y

This commit is contained in:
Akkadius
2018-07-10 02:24:55 -05:00
parent 623b7b3eee
commit e4d8915c9d
5 changed files with 77 additions and 13 deletions
+2 -1
View File
@@ -11,11 +11,12 @@
class DataBucket {
public:
static void SetData(std::string bucket_key, std::string bucket_value, uint32 expires_at_unix = 0);
static void SetData(std::string bucket_key, std::string bucket_value, std::string expires_time = "");
static bool DeleteData(std::string bucket_key);
static std::string GetData(std::string bucket_key);
private:
static uint64 DoesBucketExist(std::string bucket_key);
static uint32 ParseStringTimeToInt(std::string time_string);
};