Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🩹 fix: typedef struct #5

Merged
merged 1 commit into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading