Skip to content
Open
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
19 changes: 19 additions & 0 deletions FluentStorage.sln
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluentStorage.Tests.FTP", "
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluentStorage.Azure", "FluentStorage.Azure\FluentStorage.Azure.csproj", "{D5FC3BA6-3C86-4DE5-A3E7-BA5F3AA1623C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Docs", "Docs", "{FF16C733-2521-4D9B-9B32-7834EFD89BA8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluentStorage.Docs", "docs\FluentStorage.Docs.csproj", "{765ADC12-5BCC-4BEE-8B6A-EB05800D7DAA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -209,11 +213,26 @@ Global
{D5FC3BA6-3C86-4DE5-A3E7-BA5F3AA1623C}.Release|x64.Build.0 = Release|Any CPU
{D5FC3BA6-3C86-4DE5-A3E7-BA5F3AA1623C}.Release|x86.ActiveCfg = Release|Any CPU
{D5FC3BA6-3C86-4DE5-A3E7-BA5F3AA1623C}.Release|x86.Build.0 = Release|Any CPU
{765ADC12-5BCC-4BEE-8B6A-EB05800D7DAA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{765ADC12-5BCC-4BEE-8B6A-EB05800D7DAA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{765ADC12-5BCC-4BEE-8B6A-EB05800D7DAA}.Debug|x64.ActiveCfg = Debug|Any CPU
{765ADC12-5BCC-4BEE-8B6A-EB05800D7DAA}.Debug|x64.Build.0 = Debug|Any CPU
{765ADC12-5BCC-4BEE-8B6A-EB05800D7DAA}.Debug|x86.ActiveCfg = Debug|Any CPU
{765ADC12-5BCC-4BEE-8B6A-EB05800D7DAA}.Debug|x86.Build.0 = Debug|Any CPU
{765ADC12-5BCC-4BEE-8B6A-EB05800D7DAA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{765ADC12-5BCC-4BEE-8B6A-EB05800D7DAA}.Release|Any CPU.Build.0 = Release|Any CPU
{765ADC12-5BCC-4BEE-8B6A-EB05800D7DAA}.Release|x64.ActiveCfg = Release|Any CPU
{765ADC12-5BCC-4BEE-8B6A-EB05800D7DAA}.Release|x64.Build.0 = Release|Any CPU
{765ADC12-5BCC-4BEE-8B6A-EB05800D7DAA}.Release|x86.ActiveCfg = Release|Any CPU
{765ADC12-5BCC-4BEE-8B6A-EB05800D7DAA}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {5D54105E-9F32-4017-85A4-4DB893648110}
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{765ADC12-5BCC-4BEE-8B6A-EB05800D7DAA} = {FF16C733-2521-4D9B-9B32-7834EFD89BA8}
EndGlobalSection
EndGlobal
52 changes: 26 additions & 26 deletions README.md

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
_site/
api/
7 changes: 7 additions & 0 deletions docs/FluentStorage.Docs.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<IsPackable>false</IsPackable>
<!--This is just a wrapper .csproj so we can edit the files from the IDE-->
</PropertyGroup>
</Project>
75 changes: 75 additions & 0 deletions docs/docfx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{
"metadata": [
{
"src": [
{
"src": "..",
"files": [
"FluentStorage/FluentStorage.csproj",
"FluentStorage.AWS/FluentStorage.AWS.csproj",
"FluentStorage.Azure/FluentStorage.Azure.csproj",
"FluentStorage.Azure.Blobs/FluentStorage.Azure.Blobs.csproj",
"FluentStorage.Azure.Files/FluentStorage.Azure.Files.csproj",
"FluentStorage.Azure.KeyVault/FluentStorage.Azure.KeyVault.csproj",
"FluentStorage.Azure.Queues/FluentStorage.Azure.Queues.csproj",
"FluentStorage.Azure.ServiceBus/FluentStorage.Azure.ServiceBus.csproj",
"FluentStorage.FTP/FluentStorage.FTP.csproj",
"FluentStorage.GCP/FluentStorage.GCP.csproj",
"FluentStorage.SFTP/FluentStorage.SFTP.csproj"
]
}
],
"dest": "api",
"properties": {
"TargetFramework": "netstandard2.0"
}
}
],
"build": {
"content": [
{
"files": [
"toc.yml",
"index.md",
"wiki/**.md",
"wiki/toc.yml",
"api/**.yml",
"api/index.md"
]
}
],
"resource": [
{
"files": [
"images/**"
]
}
],
"dest": "_site",
"globalMetadata": {
"_appName":"FluentStorage",
"_disableContribution": false,
"_enableSearch": true,
"_gitContribute": {
"branch": "develop",
"apiSpecFolder":"api",
"repo": "https://github.com/robinrodricks/FluentStorage"
},
"_gitUrlPattern": "github",
"_disableSideFilter":true,
"_appLogoPath": "images/logo.png"
},
"globalMetadataFiles": [],
"fileMetadataFiles": [],
"template": [
"default",
"modern",
"templates"
],
"postProcessors": [ "ExtractSearchIndex" ],
"noLangKeyword": false,
"keepFileLink": true,
"cleanupCacheHistory": false,
"disableGitFeatures": false
}
}
Binary file added docs/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# <img src="https://github.com/robinrodricks/FluentStorage/raw/develop/.github/logo.png" height="50" align="top"> Documentation

- [Migration Guide](articles/Migration-Guide.md) - how to migrate from Storage.NET and previous versions

- [Blob Storage](articles/Blob-Storage.md) - store unstructured binary files of any size. (AWS S3, Azure Blob Storage, GCP Storage, local folder..)

- [Message Storage](articles/Message-Storage.md) - send and receive messages between systems. (AWS SQS, MSMQ, Azure Service Bus..)

- [Standard Storage](articles/Standard-Storage.md) - In-Memory, Disk & ZIP storage included in the base package.

- [Data Transformation](articles/Data-Transformation.md) - encryption and compression data transformation sinks.
4 changes: 4 additions & 0 deletions docs/templates/public/main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#logo {
max-height: 32px;
width: auto;
}
4 changes: 4 additions & 0 deletions docs/toc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- name: Wiki
href: wiki/
- name: API
href: api/
72 changes: 72 additions & 0 deletions docs/wiki/AWS-S3-Storage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<img src="https://raw.githubusercontent.com/robinrodricks/FluentStorage/develop/.github/providers/aws-s3.png" width="128" align="right"></img> In order to use **AWS S3** or **S3-compatible** storage you need to reference [![NuGet](https://img.shields.io/nuget/v/FluentStorage.AWS.svg)](https://www.nuget.org/packages/FluentStorage.AWS/) package first. The provider wraps around the standard AWS SDK which is updated regularly, but adds a lot of untrivial workarounds that makes your life painless.

## Connect to AWS S3

You can use the `AwsS3` methods to connect to [AWS S3](https://aws.amazon.com/s3/) storage.

```csharp
IBlobStorage storage = StorageFactory.Blobs.AwsS3(
accessKeyId, secretAccessKey, sessionToken, bucketName);
```

## Connection Strings

To create with a connection string, first reference the module:

```csharp
StorageFactory.Modules.UseAwsStorage();
```

Then construct using the following format:

```csharp
IBlobStorage storage = StorageFactory.Blobs.FromConnectionString("aws.s3://keyId=...;key=...;bucket=...;region=...");
```

where:
- **keyId** is (optional) access key ID.
- **key** is (optional) secret access key.
- **bucket** is bucket name.
- **region** is the AWS account region (such as `us-east-1`).
- **serviceUrl** is the optional URL of the storage provider (for example for DigitalOcean).

If **keyId** and **key** are omitted, the AWS SDK's default approach to credential resolution will be used. For example: if running in Lambda, it will assume the Lambda execution role; if there are credentials configured in ~/.aws, it will use those; etc. See [AWS SDK Documentation](https://docs.aws.amazon.com/sdk-for-net/v3/developer-guide/net-dg-config-creds.html) for more details.

## AWS CLI Profile Support

If you already have credentials in the local `~/.aws/credentials` generated by AWS CLI, you can also use them to connect to a bucket with FluentStorage. Credentials file example:


```ini
[default]
aws_access_key_id = ASIAV44FYRYLSBYIPG67
aws_secret_access_key = zhuh8nSUAR0pR5jbi4vhUym95JsC7ay3iiE2v9Jq
aws_session_token = FQoGZXIvY...

[anotherProfile]
aws_access_key_id = ASIAXEKXYP2H7MRN45FD
aws_secret_access_key = 8i6jnOOurRtTiK4CWN+uUD115SYS8++ZuQjO/LtW
aws_session_token = FQoGZXI...

...
```

To connect using say `anotherProfile` credentials, construct the instance by:

```csharp
IBlobStorage bs = StorageFactory.Blobs.AwsS3(
"anotherProfile",
"bucketName",
"region");
```

[AwsCliCredentials](xref:FluentStorage.AWS.AwsCliCredentials) class contains `credentials` file parrsing logic and some utility methods you mind find useful, for instance enumerating available profiles and so on.

## Special features for S3

- Remote directory recursion occurs on S3 cloud rather than locally (`ListFolderAsync` API).
- `ListOptions` has a `PageSize` parameter which can be used to control the internal paging size used for remote recursion.

## Native Operations

Native operations are exposed via [IS3Storage](xref:FluentStorage.AWS.Blobs.IS3Storage) interface.
25 changes: 25 additions & 0 deletions docs/wiki/AWS-SQS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<img src="https://raw.githubusercontent.com/robinrodricks/FluentStorage/develop/.github/providers/aws-sqs.png" width="128" align="right"></img> In order to use [AWS Simple Queue Service](https://aws.amazon.com/sqs/) you need to reference
[![NuGet](https://img.shields.io/nuget/v/FluentStorage.AWS.svg)](https://www.nuget.org/packages/FluentStorage.AWS/) first. The provider wraps around the standard AWS SDK.

To construct a publisher use the following:

```csharp
IMessagePublisher queuePublisher = StorageFactory.Messages.AmazonSQSMessagePublisher(
accessKeyId,
secretAccessKey,
serviceUrl,
queueName,
regionEndpoint);

IMessagePublisher topicPublisher = StorageFactory.Messages.AmazonSQSMessageReceiver(
accessKeyId,
secretAccessKey,
serviceUrl,
queueName,
regionEndpoint);
```

- **accessKeyId** and **secretAccessKey*) are credentials to access the queue.
- **serviceUrl** indicates the service URL, for instance `https://sqs.us-east-1.amazonaws.com`
- **queueName** is the name of the queue
- **retionEndpoint** is optional and defaults to `USEast1`
Loading