Skip to content

Commit

Permalink
dry run fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sbera87 committed Feb 11, 2025
1 parent 72ca83b commit 2eeab3f
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <aws/s3/S3ExpressIdentity.h>
#include <thread>
#include <condition_variable>
#include <aws/s3/S3_EXPORTS.h>

namespace Aws {
namespace Http {
Expand All @@ -21,7 +22,7 @@ namespace Aws {

namespace S3 {
class S3Client;
class S3ExpressIdentityProvider : public smithy::IdentityResolverBase<S3ExpressIdentity> {
class AWS_S3_API S3ExpressIdentityProvider : public smithy::IdentityResolverBase<S3ExpressIdentity> {
public:
explicit S3ExpressIdentityProvider(const S3Client& s3Client);
ResolveIdentityFutureOutcome getIdentity(
Expand All @@ -45,7 +46,7 @@ namespace Aws {
};


class DefaultS3ExpressIdentityProvider : public S3ExpressIdentityProvider {
class AWS_S3_API DefaultS3ExpressIdentityProvider : public S3ExpressIdentityProvider {
public:
explicit DefaultS3ExpressIdentityProvider(const S3Client& s3Client);
explicit DefaultS3ExpressIdentityProvider(
Expand All @@ -62,7 +63,7 @@ namespace Aws {
mutable std::shared_ptr<Aws::Utils::ConcurrentCache<Aws::String, S3ExpressIdentity>> m_credentialsCache;
};

class DefaultAsyncS3ExpressIdentityProvider : public S3ExpressIdentityProvider {
class AWS_S3_API DefaultAsyncS3ExpressIdentityProvider : public S3ExpressIdentityProvider {
public:
explicit DefaultAsyncS3ExpressIdentityProvider(
const S3Client& s3Client,
Expand Down Expand Up @@ -97,7 +98,7 @@ namespace Aws {
};

/*------ Smithy version -----*/
class SmithyS3ExpressIdentityProvider : public smithy::IdentityResolverBase<smithy::AwsCredentialIdentityBase> {
class AWS_S3_API SmithyS3ExpressIdentityProvider : public smithy::IdentityResolverBase<smithy::AwsCredentialIdentityBase> {
public:
explicit SmithyS3ExpressIdentityProvider(const S3Client& s3Client);
ResolveIdentityFutureOutcome getIdentity(
Expand All @@ -118,7 +119,7 @@ namespace Aws {
std::shared_ptr<std::mutex> GetMutexForBucketName(const Aws::String& bucketName);
};

class SmithyDefaultS3ExpressIdentityProvider : public SmithyS3ExpressIdentityProvider {
class AWS_S3_API SmithyDefaultS3ExpressIdentityProvider : public SmithyS3ExpressIdentityProvider {
public:
explicit SmithyDefaultS3ExpressIdentityProvider(const S3Client& s3Client);
explicit SmithyDefaultS3ExpressIdentityProvider(
Expand All @@ -137,7 +138,7 @@ namespace Aws {
mutable std::shared_ptr<Aws::Utils::ConcurrentCache<Aws::String, smithy::AwsCredentialIdentity>> m_credentialsCache;
};

class SmithyDefaultAsyncS3ExpressIdentityProvider : public SmithyS3ExpressIdentityProvider {
class AWS_S3_API SmithyDefaultAsyncS3ExpressIdentityProvider : public SmithyS3ExpressIdentityProvider {
public:
explicit SmithyDefaultAsyncS3ExpressIdentityProvider(
const S3Client& s3Client,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,13 @@
namespace Aws {
namespace S3 {

struct S3ExpressSigV4AuthSchemeOption
struct AWS_S3_API S3ExpressSigV4AuthSchemeOption
{
static AWS_S3_API smithy::AuthSchemeOption s3ExpressSigV4AuthSchemeOption;
static smithy::AuthSchemeOption s3ExpressSigV4AuthSchemeOption;
static smithy::AuthSchemeOption GetS3ExpressSigV4AuthSchemeOption() {
return s3ExpressSigV4AuthSchemeOption;
}

};
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
namespace Aws {
namespace S3 {

smithy::AuthSchemeOption S3ExpressSigV4AuthSchemeOption::s3ExpressSigV4AuthSchemeOption = smithy::AuthSchemeOption("sigv4-s3express");
AWS_S3_API smithy::AuthSchemeOption S3ExpressSigV4AuthSchemeOption::s3ExpressSigV4AuthSchemeOption = smithy::AuthSchemeOption("sigv4-s3express");

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
#include <smithy/identity/auth/AuthSchemeResolverBase.h>
#include <smithy/identity/auth/built-in/SigV4AuthSchemeOption.h>
#include <smithy/identity/auth/built-in/SigV4aAuthSchemeOption.h>

#include "SigV4AuthScheme.h"
#include <smithy/identity/auth/built-in/SigV4AuthScheme.h>

namespace smithy {
template<typename EndPointProviderType, typename ClientConfigType,typename ServiceAuthSchemeParametersT = DefaultAuthSchemeResolverParameters>
Expand Down
8 changes: 4 additions & 4 deletions tests/aws-cpp-sdk-s3-integration-tests/S3ExpressTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ class TestSmithyDefaultS3ExpressIdentityProvider : public SmithyDefaultS3Express
smithy::AwsCredentialIdentity getCreds() {

for(auto& auth : m_authSchemes) {
if(auth.first == S3::S3ExpressSigV4AuthSchemeOption::s3ExpressSigV4AuthSchemeOption.schemeId)
if(auth.first == S3::S3ExpressSigV4AuthSchemeOption::GetS3ExpressSigV4AuthSchemeOption().schemeId)
{
smithy::IdentityResolverBase<smithy::AwsCredentialIdentity>::IdentityProperties props;
auto tmp = auth.second.get<S3::S3ExpressSigV4AuthScheme>();
Expand All @@ -601,7 +601,7 @@ class TestSmithyDefaultS3ExpressIdentityProvider : public SmithyDefaultS3Express
{
for(auto& auth : m_authSchemes)
{
if(auth.first == S3::S3ExpressSigV4AuthSchemeOption::s3ExpressSigV4AuthSchemeOption.schemeId)
if(auth.first == S3::S3ExpressSigV4AuthSchemeOption::GetS3ExpressSigV4AuthSchemeOption().schemeId)
{

auth.second = S3::S3ExpressSigV4AuthScheme{Aws::MakeShared<TestSmithyDefaultS3ExpressIdentityProvider>(ALLOCATION_TAG, *this), GetServiceName(), Aws::Region::ComputeSignerRegion(m_clientConfiguration.region), m_clientConfiguration.payloadSigningPolicy, false};
Expand Down Expand Up @@ -630,8 +630,8 @@ class TestSmithyDefaultS3ExpressIdentityProvider : public SmithyDefaultS3Express
{
S3ClientConfiguration configuration{};
configuration.identityProviderSupplier =
[](const S3Client &client) -> std::shared_ptr<S3ExpressIdentityProvider> {
return Aws::MakeShared<DefaultS3ExpressIdentityProvider>("log_tag", client);
[](const S3Client &clientref) -> std::shared_ptr<S3ExpressIdentityProvider> {
return Aws::MakeShared<DefaultS3ExpressIdentityProvider>("log_tag", clientref);
};
S3Client testclient{configuration};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
\#include <aws/${metadata.projectName}/S3ExpressIdentity.h>
\#include <thread>
\#include <condition_variable>
\#include <aws/s3/S3_EXPORTS.h>

namespace ${rootNamespace} {
namespace Http {
Expand All @@ -21,7 +22,7 @@ namespace ${rootNamespace} {

namespace ${serviceNamespace} {
class ${serviceNamespace}Client;
class S3ExpressIdentityProvider : public smithy::IdentityResolverBase<S3ExpressIdentity> {
class ${CppViewHelper.computeExportValue($serviceNamespace)} S3ExpressIdentityProvider : public smithy::IdentityResolverBase<S3ExpressIdentity> {
public:
explicit S3ExpressIdentityProvider(const S3Client& s3Client);
ResolveIdentityFutureOutcome getIdentity(
Expand All @@ -45,7 +46,7 @@ namespace ${rootNamespace} {
};


class DefaultS3ExpressIdentityProvider : public S3ExpressIdentityProvider {
class ${CppViewHelper.computeExportValue($serviceNamespace)} DefaultS3ExpressIdentityProvider : public S3ExpressIdentityProvider {
public:
explicit DefaultS3ExpressIdentityProvider(const S3Client& s3Client);
explicit DefaultS3ExpressIdentityProvider(
Expand All @@ -62,7 +63,7 @@ namespace ${rootNamespace} {
mutable std::shared_ptr<Aws::Utils::ConcurrentCache<Aws::String, S3ExpressIdentity>> m_credentialsCache;
};

class DefaultAsyncS3ExpressIdentityProvider : public S3ExpressIdentityProvider {
class ${CppViewHelper.computeExportValue($serviceNamespace)} DefaultAsyncS3ExpressIdentityProvider : public S3ExpressIdentityProvider {
public:
explicit DefaultAsyncS3ExpressIdentityProvider(
const S3Client& s3Client,
Expand Down Expand Up @@ -97,7 +98,7 @@ namespace ${rootNamespace} {
};

/*------ Smithy version -----*/
class SmithyS3ExpressIdentityProvider : public smithy::IdentityResolverBase<smithy::AwsCredentialIdentityBase> {
class ${CppViewHelper.computeExportValue($serviceNamespace)} SmithyS3ExpressIdentityProvider : public smithy::IdentityResolverBase<smithy::AwsCredentialIdentityBase> {
public:
explicit SmithyS3ExpressIdentityProvider(const S3Client& s3Client);
ResolveIdentityFutureOutcome getIdentity(
Expand All @@ -118,7 +119,7 @@ namespace ${rootNamespace} {
std::shared_ptr<std::mutex> GetMutexForBucketName(const Aws::String& bucketName);
};

class SmithyDefaultS3ExpressIdentityProvider : public SmithyS3ExpressIdentityProvider {
class ${CppViewHelper.computeExportValue($serviceNamespace)} SmithyDefaultS3ExpressIdentityProvider : public SmithyS3ExpressIdentityProvider {
public:
explicit SmithyDefaultS3ExpressIdentityProvider(const S3Client& s3Client);
explicit SmithyDefaultS3ExpressIdentityProvider(
Expand All @@ -137,7 +138,7 @@ namespace ${rootNamespace} {
mutable std::shared_ptr<Aws::Utils::ConcurrentCache<Aws::String, smithy::AwsCredentialIdentity>> m_credentialsCache;
};

class SmithyDefaultAsyncS3ExpressIdentityProvider : public SmithyS3ExpressIdentityProvider {
class ${CppViewHelper.computeExportValue($serviceNamespace)} SmithyDefaultAsyncS3ExpressIdentityProvider : public SmithyS3ExpressIdentityProvider {
public:
explicit SmithyDefaultAsyncS3ExpressIdentityProvider(
const S3Client& s3Client,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,13 @@
namespace ${rootNamespace} {
namespace ${serviceNamespace} {

struct S3ExpressSigV4AuthSchemeOption
struct ${CppViewHelper.computeExportValue($serviceNamespace)} S3ExpressSigV4AuthSchemeOption
{
static ${CppViewHelper.computeExportValue($serviceNamespace)} smithy::AuthSchemeOption s3ExpressSigV4AuthSchemeOption;
static smithy::AuthSchemeOption s3ExpressSigV4AuthSchemeOption;
static smithy::AuthSchemeOption GetS3ExpressSigV4AuthSchemeOption() {
return s3ExpressSigV4AuthSchemeOption;
}

};
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
namespace ${rootNamespace} {
namespace ${serviceNamespace} {

smithy::AuthSchemeOption S3ExpressSigV4AuthSchemeOption::s3ExpressSigV4AuthSchemeOption = smithy::AuthSchemeOption("sigv4-s3express");
${CppViewHelper.computeExportValue($serviceNamespace)} smithy::AuthSchemeOption S3ExpressSigV4AuthSchemeOption::s3ExpressSigV4AuthSchemeOption = smithy::AuthSchemeOption("sigv4-s3express");

}
}

0 comments on commit 2eeab3f

Please sign in to comment.