Skip to content

Commit c9dc2c8

Browse files
authored
Merge pull request #61 from geeklearningio/release/0.7.0
Release/0.7.0
2 parents 6ec78fc + 21bace7 commit c9dc2c8

File tree

109 files changed

+2023
-965
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+2023
-965
lines changed

GeekLearning.Storage.sln

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,36 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 14
4-
VisualStudioVersion = 14.0.25420.1
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.26228.10
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "GeekLearning.Storage", "src\GeekLearning.Storage\GeekLearning.Storage.xproj", "{1F419C53-73C6-4460-B284-6A49AE41C596}"
7-
EndProject
86
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{FBAC4C17-D755-49A9-959D-18FD6B95B543}"
97
EndProject
10-
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "GeekLearning.Storage.Azure", "src\GeekLearning.Storage.Azure\GeekLearning.Storage.Azure.xproj", "{FD8BB8F9-9AF5-4C12-B962-9E08C30B01E2}"
11-
EndProject
12-
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "GeekLearning.Storage.FileSystem", "src\GeekLearning.Storage.FileSystem\GeekLearning.Storage.FileSystem.xproj", "{4A12B042-76B3-471B-9235-F653E1ABE3C0}"
13-
EndProject
14-
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "GeekLearning.Storage.BasicSample", "samples\GeekLearning.Storage.BasicSample\GeekLearning.Storage.BasicSample.xproj", "{63416AEA-DA51-4D62-B566-DB7D9BC800DC}"
15-
EndProject
168
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{2DAF5EF9-8F8E-4C51-BE2D-8D63CA143360}"
179
EndProject
1810
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "items", "items", "{6BEB33C6-FA17-4F58-ACC3-83C1EB28B604}"
1911
ProjectSection(SolutionItems) = preProject
2012
.gitattributes = .gitattributes
2113
.gitignore = .gitignore
2214
GitVersion.yml = GitVersion.yml
23-
global.json = global.json
2415
LICENSE.md = LICENSE.md
2516
README.md = README.md
2617
EndProjectSection
2718
EndProject
28-
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "GeekLearning.Storage.FileSystem.Server", "src\GeekLearning.Storage.FileSystem.Server\GeekLearning.Storage.FileSystem.Server.xproj", "{9D94CD6C-9451-449A-BED2-1C07D624A8E0}"
29-
EndProject
3019
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{520AB1D3-C501-40FD-ACEB-7CC0D1F00B90}"
3120
EndProject
32-
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "GeekLearning.Storage.Integration.Test", "tests\GeekLearning.Storage.Integration.Test\GeekLearning.Storage.Integration.Test.xproj", "{590B21B0-2AFA-4329-82AD-EF180C50EB5C}"
21+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GeekLearning.Storage", "src\GeekLearning.Storage\GeekLearning.Storage.csproj", "{1F419C53-73C6-4460-B284-6A49AE41C596}"
22+
EndProject
23+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GeekLearning.Storage.Azure", "src\GeekLearning.Storage.Azure\GeekLearning.Storage.Azure.csproj", "{FD8BB8F9-9AF5-4C12-B962-9E08C30B01E2}"
24+
EndProject
25+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GeekLearning.Storage.FileSystem", "src\GeekLearning.Storage.FileSystem\GeekLearning.Storage.FileSystem.csproj", "{4A12B042-76B3-471B-9235-F653E1ABE3C0}"
26+
EndProject
27+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GeekLearning.Storage.BasicSample", "samples\GeekLearning.Storage.BasicSample\GeekLearning.Storage.BasicSample.csproj", "{63416AEA-DA51-4D62-B566-DB7D9BC800DC}"
28+
EndProject
29+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GeekLearning.Storage.FileSystem.Server", "src\GeekLearning.Storage.FileSystem.Server\GeekLearning.Storage.FileSystem.Server.csproj", "{9D94CD6C-9451-449A-BED2-1C07D624A8E0}"
30+
EndProject
31+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GeekLearning.Storage.Integration.Test", "tests\GeekLearning.Storage.Integration.Test\GeekLearning.Storage.Integration.Test.csproj", "{590B21B0-2AFA-4329-82AD-EF180C50EB5C}"
3332
EndProject
34-
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "GeekLearning.Storage.FileSystem.ExtendedProperties.FileSystem", "src\GeekLearning.Storage.FileSystem.ExtendedProperties.FileSystem\GeekLearning.Storage.FileSystem.ExtendedProperties.FileSystem.xproj", "{8C02EBBE-9EC8-4F47-9464-5A94BDE25A8F}"
33+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GeekLearning.Storage.FileSystem.ExtendedProperties.FileSystem", "src\GeekLearning.Storage.FileSystem.ExtendedProperties.FileSystem\GeekLearning.Storage.FileSystem.ExtendedProperties.FileSystem.csproj", "{8C02EBBE-9EC8-4F47-9464-5A94BDE25A8F}"
3534
EndProject
3635
Global
3736
GlobalSection(SolutionConfigurationPlatforms) = preSolution

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
[![NuGet Version](http://img.shields.io/nuget/v/GeekLearning.Storage.svg?style=flat-square&label=nuget:%20primitives)](https://www.nuget.org/packages/GeekLearning.Storage/)
2-
[![NuGet Version](http://img.shields.io/nuget/v/GeekLearning.Storage.FileSystem.svg?style=flat-square&label=nuget:%20filesystem)](https://www.nuget.org/packages/GeekLearning.Storage.FileSystem/)
3-
[![NuGet Version](http://img.shields.io/nuget/v/GeekLearning.Storage.Azure.svg?style=flat-square&label=nuget:%20azure%20 storage)](https://www.nuget.org/packages/GeekLearning.Storage.Azure/)
1+
[![NuGet Version](http://img.shields.io/nuget/v/GeekLearning.Storage.svg?style=flat-square&label=NuGet)](https://www.nuget.org/packages/GeekLearning.Storage/)
42
[![Build Status](https://geeklearning.visualstudio.com/_apis/public/build/definitions/f841b266-7595-4d01-9ee1-4864cf65aa73/27/badge)](#)
53

64
# Geek Learning Cloud Storage Abstraction
7-
5+
86
This library abstracts physical data storage in a way which allows you to transparently switch the underlying provider
97
by configuration.
108

@@ -26,3 +24,4 @@ We don't support for Amazon S3, but it is one of our high priority objective.
2624

2725
You can head to our introduction [blog post](http://geeklearning.io/dotnet-core-storage-cloud-or-file-system-storage-made-easy/),
2826
or to the [wiki](https://github.com/geeklearningio/gl-dotnet-storage/wiki).
27+

global.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

samples/GeekLearning.Storage.BasicSample/Controllers/SampleController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ public SampleController(IStorageFactory storageFactory)
1717
}
1818

1919
[HttpGet]
20-
public async Task<IEnumerable<string>> Get()
20+
public async ValueTask<IEnumerable<string>> Get()
2121
{
2222
var summaries = await this.sharedAssets.ListAsync("summaries", "*.txt", recursive: true, withMetadata: false);
2323
return summaries.Select(x => x.Path);
2424
}
2525

2626
[HttpGet]
27-
public async Task<string> Get(string path)
27+
public async ValueTask<string> Get(string path)
2828
{
2929
var summary = await this.sharedAssets.GetAsync(path);
3030
return await summary.ReadAllTextAsync();

samples/GeekLearning.Storage.BasicSample/Controllers/ValuesController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ public ValuesController(TemplatesStore templates)
1616
}
1717

1818
[HttpGet]
19-
public async Task<IEnumerable<string>> Get()
19+
public async ValueTask<IEnumerable<string>> Get()
2020
{
2121
return new string[] { await templates.Store.ReadAllTextAsync("json.json"), "value2" };
2222
}
2323

2424
[HttpGet("files")]
25-
public async Task<IEnumerable<string>> Get(int id)
25+
public async ValueTask<IEnumerable<string>> Get(int id)
2626
{
2727
var files = await templates.Store.ListAsync("");
2828
return files.Select(x => x.PublicUrl);
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
2+
3+
<PropertyGroup>
4+
<TargetFramework>netcoreapp1.1</TargetFramework>
5+
<PreserveCompilationContext>true</PreserveCompilationContext>
6+
<AssemblyName>GeekLearning.Storage.BasicSample</AssemblyName>
7+
<OutputType>Exe</OutputType>
8+
<PackageId>GeekLearning.Storage.BasicSample</PackageId>
9+
<RuntimeFrameworkVersion>1.1.2</RuntimeFrameworkVersion>
10+
<PackageTargetFallback>$(PackageTargetFallback);portable-net45+win8</PackageTargetFallback>
11+
</PropertyGroup>
12+
13+
<ItemGroup>
14+
<None Update="Views;Templates\**\*">
15+
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
16+
</None>
17+
</ItemGroup>
18+
19+
<ItemGroup>
20+
<ProjectReference Include="..\..\src\GeekLearning.Storage\GeekLearning.Storage.csproj" />
21+
<ProjectReference Include="..\..\src\GeekLearning.Storage.Azure\GeekLearning.Storage.Azure.csproj" />
22+
<ProjectReference Include="..\..\src\GeekLearning.Storage.FileSystem\GeekLearning.Storage.FileSystem.csproj" />
23+
<ProjectReference Include="..\..\src\GeekLearning.Storage.FileSystem.Server\GeekLearning.Storage.FileSystem.Server.csproj" />
24+
</ItemGroup>
25+
26+
<ItemGroup>
27+
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.3" />
28+
<PackageReference Include="Microsoft.AspNetCore.Server.IISIntegration" Version="1.1.2" />
29+
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="1.1.2" />
30+
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="1.1.2" />
31+
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="1.1.2" />
32+
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="1.1.2" />
33+
<PackageReference Include="Microsoft.Extensions.Logging" Version="1.1.2" />
34+
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.1.2" />
35+
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.1.2" />
36+
<PackageReference Include="Microsoft.Extensions.Options" Version="1.1.2" />
37+
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="1.1.2" />
38+
</ItemGroup>
39+
40+
</Project>

samples/GeekLearning.Storage.BasicSample/GeekLearning.Storage.BasicSample.xproj

Lines changed: 0 additions & 19 deletions
This file was deleted.

samples/GeekLearning.Storage.BasicSample/Startup.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,14 @@ public void ConfigureServices(IServiceCollection services)
3333
byte[] signingKey = new byte[512];
3434
rng.GetBytes(signingKey);
3535

36-
services.AddStorage()
36+
services.AddStorage(this.Configuration.GetSection("Storage"))
3737
.AddAzureStorage()
3838
.AddFileSystemStorage(HostingEnvironement.ContentRootPath)
39-
.AddFileSystemStorageServer(options=> {
39+
.AddFileSystemStorageServer(options =>
40+
{
4041
options.SigningKey = signingKey;
4142
options.BaseUri = new Uri("http://localhost:11149/");
4243
});
43-
44-
services.Configure<StorageOptions>(Configuration.GetSection("Storage"));
4544

4645
services.AddScoped<TemplatesStore>();
4746
}

samples/GeekLearning.Storage.BasicSample/appsettings.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,8 @@
1010
"Storage": {
1111
"Stores": {
1212
"Templates": {
13-
"Provider": "FileSystem",
14-
"Parameters": {
15-
"Path": "Templates",
16-
"Access" : "Public"
17-
}
13+
"ProviderType": "FileSystem",
14+
"AccessLevel": "Public"
1815
}
1916
}
2017
}

samples/GeekLearning.Storage.BasicSample/project.json

Lines changed: 0 additions & 61 deletions
This file was deleted.

0 commit comments

Comments
 (0)