diff --git a/services/backup/src/DatabaseEntities/LogItem.cpp b/services/backup/src/DatabaseEntities/LogItem.cpp --- a/services/backup/src/DatabaseEntities/LogItem.cpp +++ b/services/backup/src/DatabaseEntities/LogItem.cpp @@ -1,6 +1,5 @@ #include "LogItem.h" -#include "AwsTools.h" #include "Constants.h" #include diff --git a/services/backup/src/DatabaseManager.h b/services/backup/src/DatabaseManager.h --- a/services/backup/src/DatabaseManager.h +++ b/services/backup/src/DatabaseManager.h @@ -1,7 +1,7 @@ #pragma once -#include "AwsTools.h" #include "DatabaseEntitiesTools.h" +#include "DynamoDBTools.h" #include #include diff --git a/services/backup/src/AwsTools.h b/services/backup/src/DynamoDBTools.h rename from services/backup/src/AwsTools.h rename to services/backup/src/DynamoDBTools.h --- a/services/backup/src/AwsTools.h +++ b/services/backup/src/DynamoDBTools.h @@ -1,5 +1,7 @@ #pragma once +#include "Constants.h" + #include #include diff --git a/services/backup/src/AwsTools.cpp b/services/backup/src/DynamoDBTools.cpp rename from services/backup/src/AwsTools.cpp rename to services/backup/src/DynamoDBTools.cpp --- a/services/backup/src/AwsTools.cpp +++ b/services/backup/src/DynamoDBTools.cpp @@ -1,8 +1,5 @@ -#include "AwsTools.h" +#include "DynamoDBTools.h" #include "Constants.h" -#include "Tools.h" - -#include namespace comm { namespace network { diff --git a/services/blob/src/AwsS3Bucket.cpp b/services/blob/src/AwsS3Bucket.cpp --- a/services/blob/src/AwsS3Bucket.cpp +++ b/services/blob/src/AwsS3Bucket.cpp @@ -1,7 +1,7 @@ #include "AwsS3Bucket.h" -#include "AwsTools.h" #include "Constants.h" #include "MultiPartUploader.h" +#include "S3Tools.h" #include "Tools.h" #include diff --git a/services/blob/src/BlobServiceImpl.cpp b/services/blob/src/BlobServiceImpl.cpp --- a/services/blob/src/BlobServiceImpl.cpp +++ b/services/blob/src/BlobServiceImpl.cpp @@ -1,9 +1,9 @@ #include "BlobServiceImpl.h" -#include "AwsTools.h" #include "Constants.h" #include "DatabaseManager.h" #include "MultiPartUploader.h" +#include "S3Tools.h" #include "Tools.h" #include "GetReactor.h" diff --git a/services/blob/src/DatabaseEntities/BlobItem.cpp b/services/blob/src/DatabaseEntities/BlobItem.cpp --- a/services/blob/src/DatabaseEntities/BlobItem.cpp +++ b/services/blob/src/DatabaseEntities/BlobItem.cpp @@ -1,6 +1,5 @@ #include "BlobItem.h" -#include "AwsTools.h" #include "Constants.h" namespace comm { diff --git a/services/blob/src/DatabaseEntities/ReverseIndexItem.cpp b/services/blob/src/DatabaseEntities/ReverseIndexItem.cpp --- a/services/blob/src/DatabaseEntities/ReverseIndexItem.cpp +++ b/services/blob/src/DatabaseEntities/ReverseIndexItem.cpp @@ -1,6 +1,5 @@ #include "ReverseIndexItem.h" -#include "AwsTools.h" #include "Constants.h" namespace comm { diff --git a/services/blob/src/DatabaseManager.h b/services/blob/src/DatabaseManager.h --- a/services/blob/src/DatabaseManager.h +++ b/services/blob/src/DatabaseManager.h @@ -1,7 +1,7 @@ #pragma once -#include "AwsTools.h" #include "DatabaseEntitiesTools.h" +#include "DynamoDBTools.h" #include #include diff --git a/services/backup/src/AwsTools.h b/services/blob/src/DynamoDBTools.h rename from services/backup/src/AwsTools.h rename to services/blob/src/DynamoDBTools.h --- a/services/backup/src/AwsTools.h +++ b/services/blob/src/DynamoDBTools.h @@ -1,5 +1,7 @@ #pragma once +#include "Constants.h" + #include #include diff --git a/services/backup/src/AwsTools.cpp b/services/blob/src/DynamoDBTools.cpp rename from services/backup/src/AwsTools.cpp rename to services/blob/src/DynamoDBTools.cpp --- a/services/backup/src/AwsTools.cpp +++ b/services/blob/src/DynamoDBTools.cpp @@ -1,8 +1,5 @@ -#include "AwsTools.h" +#include "DynamoDBTools.h" #include "Constants.h" -#include "Tools.h" - -#include namespace comm { namespace network { diff --git a/services/blob/src/Reactors/server/GetReactor.h b/services/blob/src/Reactors/server/GetReactor.h --- a/services/blob/src/Reactors/server/GetReactor.h +++ b/services/blob/src/Reactors/server/GetReactor.h @@ -1,5 +1,6 @@ #pragma once +#include "S3Tools.h" #include "ServerWriteReactorBase.h" #include "../_generated/blob.grpc.pb.h" diff --git a/services/blob/src/AwsTools.h b/services/blob/src/S3Tools.h rename from services/blob/src/AwsTools.h rename to services/blob/src/S3Tools.h --- a/services/blob/src/AwsTools.h +++ b/services/blob/src/S3Tools.h @@ -17,8 +17,6 @@ std::vector listBuckets(); -std::unique_ptr getDynamoDBClient(); - std::unique_ptr getS3Client(); } // namespace network diff --git a/services/blob/src/AwsTools.cpp b/services/blob/src/S3Tools.cpp rename from services/blob/src/AwsTools.cpp rename to services/blob/src/S3Tools.cpp --- a/services/blob/src/AwsTools.cpp +++ b/services/blob/src/S3Tools.cpp @@ -1,4 +1,4 @@ -#include "AwsTools.h" +#include "S3Tools.h" #include "Constants.h" #include "Tools.h" @@ -27,16 +27,6 @@ return result; } -std::unique_ptr getDynamoDBClient() { - Aws::Client::ClientConfiguration config; - config.region = AWS_REGION; - if (isDevMode()) { - config.endpointOverride = Aws::String("localstack:4566"); - config.scheme = Aws::Http::Scheme::HTTP; - } - return std::make_unique(config); -} - std::unique_ptr getS3Client() { Aws::Client::ClientConfiguration config; config.region = AWS_REGION; diff --git a/services/blob/src/Tools.cpp b/services/blob/src/Tools.cpp --- a/services/blob/src/Tools.cpp +++ b/services/blob/src/Tools.cpp @@ -1,9 +1,9 @@ #include "Tools.h" -#include "AwsTools.h" #include "Constants.h" #include "DatabaseEntitiesTools.h" #include "DatabaseManager.h" +#include "S3Tools.h" #include diff --git a/services/blob/test/MultiPartUploadTest.cpp b/services/blob/test/MultiPartUploadTest.cpp --- a/services/blob/test/MultiPartUploadTest.cpp +++ b/services/blob/test/MultiPartUploadTest.cpp @@ -1,8 +1,8 @@ #include #include "AwsS3Bucket.h" -#include "AwsTools.h" #include "MultiPartUploader.h" +#include "S3Tools.h" #include "TestTools.h" #include "Tools.h" diff --git a/services/blob/test/StorageManagerTest.cpp b/services/blob/test/StorageManagerTest.cpp --- a/services/blob/test/StorageManagerTest.cpp +++ b/services/blob/test/StorageManagerTest.cpp @@ -1,6 +1,6 @@ #include -#include "AwsTools.h" +#include "S3Tools.h" #include "TestTools.h" #include