-
-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #219 from SixLabors/js/aws-options
Separate AWS cache options and normalize implementations
- Loading branch information
Showing
9 changed files
with
109 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/ImageSharp.Web.Providers.AWS/Caching/AWSS3StorageCacheOptions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Copyright (c) Six Labors. | ||
// Licensed under the Apache License, Version 2.0. | ||
|
||
namespace SixLabors.ImageSharp.Web.Caching.AWS | ||
{ | ||
/// <summary> | ||
/// Configuration options for the <see cref="AWSS3StorageCache"/> provider. | ||
/// </summary> | ||
public class AWSS3StorageCacheOptions : IAWSS3BucketClientOptions | ||
{ | ||
/// <inheritdoc/> | ||
public string Region { get; set; } | ||
|
||
/// <inheritdoc/> | ||
public string BucketName { get; set; } | ||
|
||
/// <inheritdoc/> | ||
public string AccessKey { get; set; } | ||
|
||
/// <inheritdoc/> | ||
public string AccessSecret { get; set; } | ||
|
||
/// <inheritdoc/> | ||
public string Endpoint { get; set; } | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
src/ImageSharp.Web.Providers.AWS/IAWSS3BucketClientOptions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// Copyright (c) Six Labors. | ||
// Licensed under the Apache License, Version 2.0. | ||
|
||
namespace SixLabors.ImageSharp.Web | ||
{ | ||
/// <summary> | ||
/// Provides a common interface for AWS S3 Bucket Client Options. | ||
/// </summary> | ||
internal interface IAWSS3BucketClientOptions | ||
{ | ||
/// <summary> | ||
/// Gets or sets the AWS region endpoint (us-east-1/us-west-1/ap-southeast-2). | ||
/// </summary> | ||
string Region { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the AWS bucket name. | ||
/// </summary> | ||
string BucketName { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the AWS key - Can be used to override keys provided by the environment. | ||
/// If deploying inside an EC2 instance AWS keys will already be available via environment | ||
/// variables and don't need to be specified. Follow AWS best security practices on <see href="https://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html"/>. | ||
/// </summary> | ||
string AccessKey { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the AWS secret - Can be used to override keys provided by the environment. | ||
/// If deploying inside an EC2 instance AWS keys will already be available via environment | ||
/// variables and don't need to be specified. Follow AWS best security practices on <see href="https://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html"/>. | ||
/// </summary> | ||
string AccessSecret { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the AWS endpoint - used for testing to over region endpoint allowing it | ||
/// to be set to localhost. | ||
/// </summary> | ||
string Endpoint { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/ImageSharp.Web.Providers.Azure/IAzureBlobContainerClientOptions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright (c) Six Labors. | ||
// Licensed under the Apache License, Version 2.0. | ||
|
||
namespace SixLabors.ImageSharp.Web | ||
{ | ||
/// <summary> | ||
/// Provides a common interface for Azure Blob Container Options. | ||
/// </summary> | ||
internal interface IAzureBlobContainerClientOptions | ||
{ | ||
/// <summary> | ||
/// Gets or sets the Azure Blob Storage connection string. | ||
/// <see href="https://docs.microsoft.com/en-us/azure/storage/common/storage-configure-connection-string."/> | ||
/// </summary> | ||
public string ConnectionString { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the Azure Blob Storage container name. | ||
/// Must conform to Azure Blob Storage container naming guidlines. | ||
/// <see href="https://docs.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata#container-names"/> | ||
/// </summary> | ||
public string ContainerName { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters