Skip to content

Commit

Permalink
Merge pull request #5 from camargo2019/fix/typedef-struct
Browse files Browse the repository at this point in the history
🩹 fix: typedef struct
  • Loading branch information
camargo2019 authored Sep 10, 2024
2 parents efdc26e + abf8412 commit 6c00fa5
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
3 changes: 2 additions & 1 deletion core/cache/cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@
#include <thread>
#include <chrono>
#include <fstream>
#include <filesystem>
#include <unordered_map>

typedef struct CacheStruct {
struct CacheStruct {
std::string value;
int expire;

Expand Down
16 changes: 8 additions & 8 deletions core/entities/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,26 @@
#include <stdexcept>
#include <yaml.cpp>

typedef struct {
struct ConfigConnectBasicAuth{
std::string user;
std::string pass;
std::string db;
} ConfigConnectBasicAuth;
};

typedef struct {
struct ConfigConnectAuth{
std::vector<std::string> allow_ip;
std::vector<ConfigConnectBasicAuth> basic;
} ConfigConnectAuth;
};

typedef struct {
struct ConfigConnect{
int max_clients;
ConfigConnectAuth auth;
} ConfigConnect;
};

typedef struct {
struct ConfigHosting{
std::string address;
short port;
} ConfigHosting;
};

class Config {
public:
Expand Down
2 changes: 1 addition & 1 deletion core/entities/user.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

#include <string>

typedef struct UserEntities {
struct UserEntities {
std::string user;
std::string db;
};
Expand Down
2 changes: 1 addition & 1 deletion core/manager/manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include "../entities/user.h"
#include "../entities/config.h"

typedef struct ManagerCommands {
struct ManagerCommands {
std::vector<std::string> set = {"SET", "set"};
std::vector<std::string> del = {"DEL", "del"};
std::vector<std::string> get = {"GET", "get"};
Expand Down

0 comments on commit 6c00fa5

Please sign in to comment.