Skip to content

Commit 6ec78fc

Browse files
authored
Merge pull request #39 from geeklearningio/release/0.6.0
0.6.0
2 parents d9c3d81 + 9101531 commit 6ec78fc

File tree

80 files changed

+1080
-701
lines changed

Some content is hidden

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

80 files changed

+1080
-701
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,4 +243,4 @@ ModelManifest.xml
243243

244244
# FAKE - F# Make
245245
.fake/
246-
/tests/GeekLearning.Integration.Test/appsettings.development.json
246+
appsettings.development.json

GeekLearning.Storage.sln

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "GeekLearning.Storage.BasicS
1515
EndProject
1616
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{2DAF5EF9-8F8E-4C51-BE2D-8D63CA143360}"
1717
EndProject
18-
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "GeekLearning.Integration.Test", "tests\GeekLearning.Integration.Test\GeekLearning.Integration.Test.xproj", "{590B21B0-2AFA-4329-82AD-EF180C50EB5C}"
19-
EndProject
2018
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "items", "items", "{6BEB33C6-FA17-4F58-ACC3-83C1EB28B604}"
2119
ProjectSection(SolutionItems) = preProject
2220
.gitattributes = .gitattributes
@@ -31,6 +29,10 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "GeekLearning.Storage.FileSy
3129
EndProject
3230
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{520AB1D3-C501-40FD-ACEB-7CC0D1F00B90}"
3331
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}"
33+
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}"
35+
EndProject
3436
Global
3537
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3638
Debug|Any CPU = Debug|Any CPU
@@ -53,14 +55,18 @@ Global
5355
{63416AEA-DA51-4D62-B566-DB7D9BC800DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
5456
{63416AEA-DA51-4D62-B566-DB7D9BC800DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
5557
{63416AEA-DA51-4D62-B566-DB7D9BC800DC}.Release|Any CPU.Build.0 = Release|Any CPU
56-
{590B21B0-2AFA-4329-82AD-EF180C50EB5C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
57-
{590B21B0-2AFA-4329-82AD-EF180C50EB5C}.Debug|Any CPU.Build.0 = Debug|Any CPU
58-
{590B21B0-2AFA-4329-82AD-EF180C50EB5C}.Release|Any CPU.ActiveCfg = Release|Any CPU
59-
{590B21B0-2AFA-4329-82AD-EF180C50EB5C}.Release|Any CPU.Build.0 = Release|Any CPU
6058
{9D94CD6C-9451-449A-BED2-1C07D624A8E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
6159
{9D94CD6C-9451-449A-BED2-1C07D624A8E0}.Debug|Any CPU.Build.0 = Debug|Any CPU
6260
{9D94CD6C-9451-449A-BED2-1C07D624A8E0}.Release|Any CPU.ActiveCfg = Release|Any CPU
6361
{9D94CD6C-9451-449A-BED2-1C07D624A8E0}.Release|Any CPU.Build.0 = Release|Any CPU
62+
{590B21B0-2AFA-4329-82AD-EF180C50EB5C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
63+
{590B21B0-2AFA-4329-82AD-EF180C50EB5C}.Debug|Any CPU.Build.0 = Debug|Any CPU
64+
{590B21B0-2AFA-4329-82AD-EF180C50EB5C}.Release|Any CPU.ActiveCfg = Release|Any CPU
65+
{590B21B0-2AFA-4329-82AD-EF180C50EB5C}.Release|Any CPU.Build.0 = Release|Any CPU
66+
{8C02EBBE-9EC8-4F47-9464-5A94BDE25A8F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
67+
{8C02EBBE-9EC8-4F47-9464-5A94BDE25A8F}.Debug|Any CPU.Build.0 = Debug|Any CPU
68+
{8C02EBBE-9EC8-4F47-9464-5A94BDE25A8F}.Release|Any CPU.ActiveCfg = Release|Any CPU
69+
{8C02EBBE-9EC8-4F47-9464-5A94BDE25A8F}.Release|Any CPU.Build.0 = Release|Any CPU
6470
EndGlobalSection
6571
GlobalSection(SolutionProperties) = preSolution
6672
HideSolutionNode = FALSE
@@ -70,7 +76,8 @@ Global
7076
{FD8BB8F9-9AF5-4C12-B962-9E08C30B01E2} = {520AB1D3-C501-40FD-ACEB-7CC0D1F00B90}
7177
{4A12B042-76B3-471B-9235-F653E1ABE3C0} = {520AB1D3-C501-40FD-ACEB-7CC0D1F00B90}
7278
{63416AEA-DA51-4D62-B566-DB7D9BC800DC} = {FBAC4C17-D755-49A9-959D-18FD6B95B543}
73-
{590B21B0-2AFA-4329-82AD-EF180C50EB5C} = {2DAF5EF9-8F8E-4C51-BE2D-8D63CA143360}
7479
{9D94CD6C-9451-449A-BED2-1C07D624A8E0} = {520AB1D3-C501-40FD-ACEB-7CC0D1F00B90}
80+
{590B21B0-2AFA-4329-82AD-EF180C50EB5C} = {2DAF5EF9-8F8E-4C51-BE2D-8D63CA143360}
81+
{8C02EBBE-9EC8-4F47-9464-5A94BDE25A8F} = {520AB1D3-C501-40FD-ACEB-7CC0D1F00B90}
7582
EndGlobalSection
7683
EndGlobal

README.md

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,26 @@
33
[![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/)
44
[![Build Status](https://geeklearning.visualstudio.com/_apis/public/build/definitions/f841b266-7595-4d01-9ee1-4864cf65aa73/27/badge)](#)
55

6-
# gl-dotnet-storage
6+
# Geek Learning Cloud Storage Abstraction
77

8-
Coming Soon!
8+
This library abstracts physical data storage in a way which allows you to transparently switch the underlying provider
9+
by configuration.
910

10-
#Storage Abstraction
11+
## Features
1112

12-
#FileSystem provider
13+
* List files, with globbing support
14+
* Read, Write, Delete files
15+
* Public file url
1316

14-
#Azure blob provider
17+
## Providers
18+
19+
The library currently supports:
20+
* Azure Blob Storage
21+
* File System Storage
22+
23+
We don't support for Amazon S3, but it is one of our high priority objective.
24+
25+
## Getting Started
26+
27+
You can head to our introduction [blog post](http://geeklearning.io/dotnet-core-storage-cloud-or-file-system-storage-made-easy/),
28+
or to the [wiki](https://github.com/geeklearningio/gl-dotnet-storage/wiki).

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"projects": [ "src", "tests", "samples" ],
33
"sdk": {
4-
"version": "1.0.0-preview2-003133"
4+
"version": "1.0.0-preview2-1-003177"
55
}
66
}

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

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Threading.Tasks;
5-
using Microsoft.AspNetCore.Mvc;
6-
using System.Text;
7-
8-
// For more information on enabling Web API for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860
9-
10-
namespace GeekLearning.Storage.BasicSample.Controllers
1+
namespace GeekLearning.Storage.BasicSample.Controllers
112
{
3+
using Microsoft.AspNetCore.Mvc;
4+
using System.Collections.Generic;
5+
using System.Linq;
6+
using System.Text;
7+
using System.Threading.Tasks;
8+
129
[Route("api/[controller]")]
1310
public class SampleController : Controller
1411
{
@@ -19,30 +16,26 @@ public SampleController(IStorageFactory storageFactory)
1916
this.sharedAssets = storageFactory.GetStore("SharedAssets");
2017
}
2118

22-
// GET: api/values
2319
[HttpGet]
2420
public async Task<IEnumerable<string>> Get()
2521
{
2622
var summaries = await this.sharedAssets.ListAsync("summaries", "*.txt", recursive: true, withMetadata: false);
2723
return summaries.Select(x => x.Path);
2824
}
2925

30-
// GET api/values/5
3126
[HttpGet]
3227
public async Task<string> Get(string path)
3328
{
3429
var summary = await this.sharedAssets.GetAsync(path);
3530
return await summary.ReadAllTextAsync();
3631
}
3732

38-
// PUT api/values/5
3933
[HttpPut()]
4034
public async Task Put(string path, [FromBody]string value)
4135
{
4236
await sharedAssets.SaveAsync(Encoding.UTF8.GetBytes(value), path, "text/plain");
4337
}
4438

45-
// DELETE api/values/5
4639
[HttpDelete()]
4740
public async Task Delete(string path)
4841
{

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

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,43 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Threading.Tasks;
5-
using Microsoft.AspNetCore.Mvc;
6-
7-
namespace GeekLearning.Storage.BasicSample.Controllers
1+
namespace GeekLearning.Storage.BasicSample.Controllers
82
{
3+
using Microsoft.AspNetCore.Mvc;
4+
using System.Collections.Generic;
5+
using System.Linq;
6+
using System.Threading.Tasks;
7+
98
[Route("api/[controller]")]
109
public class ValuesController : Controller
1110
{
12-
// GET api/values
1311
private TemplatesStore templates;
1412

1513
public ValuesController(TemplatesStore templates)
1614
{
1715
this.templates = templates;
1816
}
1917

20-
// GET: api/values
2118
[HttpGet]
2219
public async Task<IEnumerable<string>> Get()
2320
{
24-
2521
return new string[] { await templates.Store.ReadAllTextAsync("json.json"), "value2" };
2622
}
2723

28-
// GET api/values/5
2924
[HttpGet("files")]
3025
public async Task<IEnumerable<string>> Get(int id)
3126
{
3227
var files = await templates.Store.ListAsync("");
3328
return files.Select(x => x.PublicUrl);
3429
}
3530

36-
// POST api/values
3731
[HttpPost]
3832
public void Post([FromBody]string value)
3933
{
4034
}
4135

42-
// PUT api/values/5
4336
[HttpPut("{id}")]
4437
public void Put(int id, [FromBody]string value)
4538
{
4639
}
4740

48-
// DELETE api/values/5
4941
[HttpDelete("{id}")]
5042
public void Delete(int id)
5143
{

samples/GeekLearning.Storage.BasicSample/Program.cs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.IO;
4-
using System.Linq;
5-
using System.Threading.Tasks;
6-
using Microsoft.AspNetCore.Hosting;
7-
using Microsoft.AspNetCore.Builder;
8-
9-
namespace GeekLearning.Storage.BasicSample
1+
namespace GeekLearning.Storage.BasicSample
102
{
3+
using Microsoft.AspNetCore.Builder;
4+
using Microsoft.AspNetCore.Hosting;
5+
using System.IO;
6+
117
public class Program
128
{
139
public static void Main(string[] args)

samples/GeekLearning.Storage.BasicSample/Startup.cs

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Threading.Tasks;
5-
using Microsoft.AspNetCore.Builder;
6-
using Microsoft.AspNetCore.Hosting;
7-
using Microsoft.Extensions.Configuration;
8-
using Microsoft.Extensions.DependencyInjection;
9-
using Microsoft.Extensions.Logging;
10-
using System.Security.Cryptography;
11-
12-
namespace GeekLearning.Storage.BasicSample
1+
namespace GeekLearning.Storage.BasicSample
132
{
3+
using Microsoft.AspNetCore.Builder;
4+
using Microsoft.AspNetCore.Hosting;
5+
using Microsoft.Extensions.Configuration;
6+
using Microsoft.Extensions.DependencyInjection;
7+
using Microsoft.Extensions.Logging;
8+
using System;
9+
using System.Security.Cryptography;
10+
1411
public class Startup
1512
{
1613
public Startup(IHostingEnvironment env)
@@ -25,12 +22,11 @@ public Startup(IHostingEnvironment env)
2522
}
2623

2724
public IConfigurationRoot Configuration { get; }
25+
2826
public IHostingEnvironment HostingEnvironement { get; }
2927

30-
// This method gets called by the runtime. Use this method to add services to the container.
3128
public void ConfigureServices(IServiceCollection services)
3229
{
33-
// Add framework services.
3430
services.AddMvc();
3531

3632
var rng = RandomNumberGenerator.Create();
@@ -50,7 +46,6 @@ public void ConfigureServices(IServiceCollection services)
5046
services.AddScoped<TemplatesStore>();
5147
}
5248

53-
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
5449
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
5550
{
5651
loggerFactory.AddConsole(Configuration.GetSection("Logging"));

samples/GeekLearning.Storage.BasicSample/TemplatesStore.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Threading.Tasks;
5-
6-
namespace GeekLearning.Storage.BasicSample
1+
namespace GeekLearning.Storage.BasicSample
72
{
83
public class TemplatesStore : StoreBase
94
{

samples/GeekLearning.Storage.BasicSample/project.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
{
22
"dependencies": {
33
"Microsoft.NETCore.App": {
4-
"version": "1.0.1",
4+
"version": "1.1.0",
55
"type": "platform"
66
},
7-
"Microsoft.AspNetCore.Mvc": "1.0.1",
8-
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
9-
"Microsoft.AspNetCore.Server.Kestrel": "1.0.1",
10-
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0",
11-
"Microsoft.Extensions.Configuration.FileExtensions": "1.0.0",
12-
"Microsoft.Extensions.Configuration.Json": "1.0.0",
13-
"Microsoft.Extensions.Logging": "1.0.0",
14-
"Microsoft.Extensions.Logging.Console": "1.0.0",
15-
"Microsoft.Extensions.Logging.Debug": "1.0.0",
16-
"Microsoft.Extensions.Options": "1.0.0",
17-
"Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0",
7+
"Microsoft.AspNetCore.Mvc": "1.1.0",
8+
"Microsoft.AspNetCore.Server.IISIntegration": "1.1.0",
9+
"Microsoft.AspNetCore.Server.Kestrel": "1.1.0",
10+
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.1.0",
11+
"Microsoft.Extensions.Configuration.FileExtensions": "1.1.0",
12+
"Microsoft.Extensions.Configuration.Json": "1.1.0",
13+
"Microsoft.Extensions.Logging": "1.1.0",
14+
"Microsoft.Extensions.Logging.Console": "1.1.0",
15+
"Microsoft.Extensions.Logging.Debug": "1.1.0",
16+
"Microsoft.Extensions.Options": "1.1.0",
17+
"Microsoft.Extensions.Options.ConfigurationExtensions": "1.1.0",
18+
1819
"GeekLearning.Storage": "*",
1920
"GeekLearning.Storage.Azure": "*",
2021
"GeekLearning.Storage.FileSystem": "*",
@@ -26,9 +27,8 @@
2627
},
2728

2829
"frameworks": {
29-
"netcoreapp1.0": {
30+
"netcoreapp1.1": {
3031
"imports": [
31-
"dotnet5.6",
3232
"portable-net45+win8"
3333
]
3434
}

0 commit comments

Comments
 (0)