Skip to content

Commit 7ae8d6b

Browse files
committed
NuGet v1.0.3, bucket GET location API
1 parent 3d74e45 commit 7ae8d6b

File tree

18 files changed

+156
-95
lines changed

18 files changed

+156
-95
lines changed

Less3/Api/S3/ApiHandler.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,16 @@ public S3Response BucketExists(S3Request req)
121121
return _BucketHandler.Exists(req);
122122
}
123123

124+
/// <summary>
125+
/// Bucket read location API callback.
126+
/// </summary>
127+
/// <param name="req">S3Request.</param>
128+
/// <returns>S3Response.</returns>
129+
public S3Response BucketReadLocation(S3Request req)
130+
{
131+
return _BucketHandler.ReadLocation(req);
132+
}
133+
124134
/// <summary>
125135
/// Bucket read API callback.
126136
/// </summary>

Less3/Api/S3/BucketHandler.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,18 @@ public S3Response Read(S3Request req)
302302
return new S3Response(req, 200, "application/xml", null, Encoding.UTF8.GetBytes(Common.SerializeXml(resp)));
303303
}
304304

305+
/// <summary>
306+
/// Bucket read location API callback.
307+
/// </summary>
308+
/// <param name="req">S3Request.</param>
309+
/// <returns>S3Response.</returns>
310+
public S3Response ReadLocation(S3Request req)
311+
{
312+
LocationConstraint resp = new LocationConstraint();
313+
resp.Text = _Settings.Server.RegionString;
314+
return new S3Response(req, 200, "application/xml", null, Encoding.UTF8.GetBytes(Common.SerializeXml(resp)));
315+
}
316+
305317
/// <summary>
306318
/// Bucket read ACL API callback.
307319
/// </summary>

Less3/Classes/Settings.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@ public class SettingsServer
8383
/// Admin API key.
8484
/// </summary>
8585
public string AdminApiKey;
86+
87+
/// <summary>
88+
/// Region string to supply on location inquiry.
89+
/// </summary>
90+
public string RegionString;
8691
}
8792

8893
/// <summary>

Less3/Classes/Setup.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ private void RunSetup()
8989
currSettings.Server = new Settings.SettingsServer();
9090
currSettings.Server.DnsHostname = "localhost";
9191
currSettings.Server.ListenerPort = 8000;
92-
currSettings.Server.Ssl = false;
93-
92+
currSettings.Server.Ssl = false;
9493
currSettings.Server.HeaderApiKey = "x-api-key";
95-
currSettings.Server.AdminApiKey = "less3admin";
94+
currSettings.Server.AdminApiKey = "less3admin";
95+
currSettings.Server.RegionString = "us-west-1";
9696

9797
currSettings.Storage = new Settings.SettingsStorage();
9898
currSettings.Storage.Directory = "./Storage/";

Less3/Less3.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@
1515
<RepositoryUrl>https://github.com/jchristn/less3</RepositoryUrl>
1616
<RepositoryType>Github</RepositoryType>
1717
<PackageTags>S3 storage blob object storage rest restful</PackageTags>
18-
<PackageReleaseNotes>Dependency update</PackageReleaseNotes>
18+
<PackageReleaseNotes>Added bucket GET location API.</PackageReleaseNotes>
1919
<PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest>
20-
<Version>1.0.2</Version>
20+
<Version>1.0.3</Version>
2121
</PropertyGroup>
2222

2323
<ItemGroup>
24-
<PackageReference Include="AWSSDK.S3" Version="3.3.104.16" />
24+
<PackageReference Include="AWSSDK.S3" Version="3.3.104.17" />
2525
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
26-
<PackageReference Include="S3ServerInterface" Version="1.5.1.5" />
26+
<PackageReference Include="S3ServerInterface" Version="1.5.1.6" />
2727
<PackageReference Include="SqliteHelper" Version="1.0.13" />
2828
<PackageReference Include="SyslogLogging" Version="1.2.0" />
2929
<PackageReference Include="Watson" Version="2.1.6" />

Less3/Program.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ static void Main(string[] args)
104104
_S3Server.Bucket.Exists = _ApiHandler.BucketExists;
105105
_S3Server.Bucket.Read = _ApiHandler.BucketRead;
106106
_S3Server.Bucket.ReadAcl = _ApiHandler.BucketReadAcl;
107+
_S3Server.Bucket.ReadLocation = _ApiHandler.BucketReadLocation;
107108
_S3Server.Bucket.ReadTags = _ApiHandler.BucketReadTags;
108109
_S3Server.Bucket.ReadVersions = _ApiHandler.BucketReadVersions;
109110
_S3Server.Bucket.ReadVersioning = _ApiHandler.BucketReadVersioning;

Less3/bin/Debug/netcoreapp2.2/Less3.deps.json

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
22
"runtimeTarget": {
33
"name": ".NETCoreApp,Version=v2.2",
4-
"signature": "115ff4f470c90dfa4d8c0b98183c64b4a439e631"
4+
"signature": "37ac0a41e4a91d5d6d06c550afe7d8ca4ef82dc0"
55
},
66
"compilationOptions": {},
77
"targets": {
88
".NETCoreApp,Version=v2.2": {
9-
"Less3/1.0.2": {
9+
"Less3/1.0.3": {
1010
"dependencies": {
11-
"AWSSDK.S3": "3.3.104.16",
11+
"AWSSDK.S3": "3.3.104.17",
1212
"Newtonsoft.Json": "12.0.2",
13-
"S3ServerInterface": "1.5.1.5",
13+
"S3ServerInterface": "1.5.1.6",
1414
"SqliteHelper": "1.0.13",
1515
"SyslogLogging": "1.2.0",
1616
"Watson": "2.1.6",
@@ -20,22 +20,22 @@
2020
"Less3.dll": {}
2121
}
2222
},
23-
"AWSSDK.Core/3.3.103.28": {
23+
"AWSSDK.Core/3.3.103.29": {
2424
"runtime": {
2525
"lib/netstandard2.0/AWSSDK.Core.dll": {
2626
"assemblyVersion": "3.3.0.0",
27-
"fileVersion": "3.3.103.28"
27+
"fileVersion": "3.3.103.29"
2828
}
2929
}
3030
},
31-
"AWSSDK.S3/3.3.104.16": {
31+
"AWSSDK.S3/3.3.104.17": {
3232
"dependencies": {
33-
"AWSSDK.Core": "3.3.103.28"
33+
"AWSSDK.Core": "3.3.103.29"
3434
},
3535
"runtime": {
3636
"lib/netstandard2.0/AWSSDK.S3.dll": {
3737
"assemblyVersion": "3.3.0.0",
38-
"fileVersion": "3.3.104.16"
38+
"fileVersion": "3.3.104.17"
3939
}
4040
}
4141
},
@@ -72,17 +72,17 @@
7272
}
7373
}
7474
},
75-
"S3ServerInterface/1.5.1.5": {
75+
"S3ServerInterface/1.5.1.6": {
7676
"dependencies": {
77-
"AWSSDK.S3": "3.3.104.16",
77+
"AWSSDK.S3": "3.3.104.17",
7878
"ChunkDecoder": "1.0.3",
7979
"Newtonsoft.Json": "12.0.2",
8080
"Watson": "2.1.6"
8181
},
8282
"runtime": {
8383
"lib/netstandard2.0/S3ServerInterface.dll": {
84-
"assemblyVersion": "1.5.1.5",
85-
"fileVersion": "1.5.1.5"
84+
"assemblyVersion": "1.5.1.6",
85+
"fileVersion": "1.5.1.6"
8686
}
8787
}
8888
},
@@ -167,24 +167,24 @@
167167
}
168168
},
169169
"libraries": {
170-
"Less3/1.0.2": {
170+
"Less3/1.0.3": {
171171
"type": "project",
172172
"serviceable": false,
173173
"sha512": ""
174174
},
175-
"AWSSDK.Core/3.3.103.28": {
175+
"AWSSDK.Core/3.3.103.29": {
176176
"type": "package",
177177
"serviceable": true,
178-
"sha512": "sha512-ZwDOYwXr/UeNMpBIx0mi8dEfr4TphHOxeVLyLMRZP5+s9/sNVGluRtJZolOjvbPrd9k0w58FJzkRlyxEjOWUPA==",
179-
"path": "awssdk.core/3.3.103.28",
180-
"hashPath": "awssdk.core.3.3.103.28.nupkg.sha512"
178+
"sha512": "sha512-2rvyBaL2QyqVmNWGRpJWQYNG+vtv0bHq1XtVdKzm/bUuq6Aa4eTVvuIHLcT12GNx4ZA/lPNrmN0kd3joAZIGOA==",
179+
"path": "awssdk.core/3.3.103.29",
180+
"hashPath": "awssdk.core.3.3.103.29.nupkg.sha512"
181181
},
182-
"AWSSDK.S3/3.3.104.16": {
182+
"AWSSDK.S3/3.3.104.17": {
183183
"type": "package",
184184
"serviceable": true,
185-
"sha512": "sha512-tZImmdonhDf5AHzHAeOevk2HFcd5JJ2QtHCKsRIQ8xa8VHP1LC+v1KcJFZvCRBWCVQFpKReTjm0G9CxpgNeiGw==",
186-
"path": "awssdk.s3/3.3.104.16",
187-
"hashPath": "awssdk.s3.3.3.104.16.nupkg.sha512"
185+
"sha512": "sha512-fvPiseR2HC8P9J1caKRCQ1bLLxMU57mX0sj899jg1XrBBDcPRUcyt9n8ibmrhloQdCEgvX2wqywCqv/fDETMKg==",
186+
"path": "awssdk.s3/3.3.104.17",
187+
"hashPath": "awssdk.s3.3.3.104.17.nupkg.sha512"
188188
},
189189
"ChunkDecoder/1.0.3": {
190190
"type": "package",
@@ -221,12 +221,12 @@
221221
"path": "regexmatcher/1.0.2",
222222
"hashPath": "regexmatcher.1.0.2.nupkg.sha512"
223223
},
224-
"S3ServerInterface/1.5.1.5": {
224+
"S3ServerInterface/1.5.1.6": {
225225
"type": "package",
226226
"serviceable": true,
227-
"sha512": "sha512-osQib5LJJEoQJuarXmwK8wkn+7RqNPsllG5mepPL0csEvVA44kHxK7KEMAzCjHWHeDXznh5lAuid25Xc65DbDA==",
228-
"path": "s3serverinterface/1.5.1.5",
229-
"hashPath": "s3serverinterface.1.5.1.5.nupkg.sha512"
227+
"sha512": "sha512-95yNV8SiU9jVWKUY5ZbSStCIkCqNhhdKxMDySpOxySM4+xXzyyM2RAKCNWACrmJBdEJu6xtRC7XoPRGOIDd12g==",
228+
"path": "s3serverinterface/1.5.1.6",
229+
"hashPath": "s3serverinterface.1.5.1.6.nupkg.sha512"
230230
},
231231
"SqliteHelper/1.0.13": {
232232
"type": "package",
0 Bytes
Binary file not shown.

Less3/bin/Release/netcoreapp2.2/Less3.deps.json

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
22
"runtimeTarget": {
33
"name": ".NETCoreApp,Version=v2.2",
4-
"signature": "115ff4f470c90dfa4d8c0b98183c64b4a439e631"
4+
"signature": "37ac0a41e4a91d5d6d06c550afe7d8ca4ef82dc0"
55
},
66
"compilationOptions": {},
77
"targets": {
88
".NETCoreApp,Version=v2.2": {
99
"Less3/1.0.2": {
1010
"dependencies": {
11-
"AWSSDK.S3": "3.3.104.16",
11+
"AWSSDK.S3": "3.3.104.17",
1212
"Newtonsoft.Json": "12.0.2",
13-
"S3ServerInterface": "1.5.1.5",
13+
"S3ServerInterface": "1.5.1.6",
1414
"SqliteHelper": "1.0.13",
1515
"SyslogLogging": "1.2.0",
1616
"Watson": "2.1.6",
@@ -20,22 +20,22 @@
2020
"Less3.dll": {}
2121
}
2222
},
23-
"AWSSDK.Core/3.3.103.28": {
23+
"AWSSDK.Core/3.3.103.29": {
2424
"runtime": {
2525
"lib/netstandard2.0/AWSSDK.Core.dll": {
2626
"assemblyVersion": "3.3.0.0",
27-
"fileVersion": "3.3.103.28"
27+
"fileVersion": "3.3.103.29"
2828
}
2929
}
3030
},
31-
"AWSSDK.S3/3.3.104.16": {
31+
"AWSSDK.S3/3.3.104.17": {
3232
"dependencies": {
33-
"AWSSDK.Core": "3.3.103.28"
33+
"AWSSDK.Core": "3.3.103.29"
3434
},
3535
"runtime": {
3636
"lib/netstandard2.0/AWSSDK.S3.dll": {
3737
"assemblyVersion": "3.3.0.0",
38-
"fileVersion": "3.3.104.16"
38+
"fileVersion": "3.3.104.17"
3939
}
4040
}
4141
},
@@ -72,17 +72,17 @@
7272
}
7373
}
7474
},
75-
"S3ServerInterface/1.5.1.5": {
75+
"S3ServerInterface/1.5.1.6": {
7676
"dependencies": {
77-
"AWSSDK.S3": "3.3.104.16",
77+
"AWSSDK.S3": "3.3.104.17",
7878
"ChunkDecoder": "1.0.3",
7979
"Newtonsoft.Json": "12.0.2",
8080
"Watson": "2.1.6"
8181
},
8282
"runtime": {
8383
"lib/netstandard2.0/S3ServerInterface.dll": {
84-
"assemblyVersion": "1.5.1.5",
85-
"fileVersion": "1.5.1.5"
84+
"assemblyVersion": "1.5.1.6",
85+
"fileVersion": "1.5.1.6"
8686
}
8787
}
8888
},
@@ -172,19 +172,19 @@
172172
"serviceable": false,
173173
"sha512": ""
174174
},
175-
"AWSSDK.Core/3.3.103.28": {
175+
"AWSSDK.Core/3.3.103.29": {
176176
"type": "package",
177177
"serviceable": true,
178-
"sha512": "sha512-ZwDOYwXr/UeNMpBIx0mi8dEfr4TphHOxeVLyLMRZP5+s9/sNVGluRtJZolOjvbPrd9k0w58FJzkRlyxEjOWUPA==",
179-
"path": "awssdk.core/3.3.103.28",
180-
"hashPath": "awssdk.core.3.3.103.28.nupkg.sha512"
178+
"sha512": "sha512-2rvyBaL2QyqVmNWGRpJWQYNG+vtv0bHq1XtVdKzm/bUuq6Aa4eTVvuIHLcT12GNx4ZA/lPNrmN0kd3joAZIGOA==",
179+
"path": "awssdk.core/3.3.103.29",
180+
"hashPath": "awssdk.core.3.3.103.29.nupkg.sha512"
181181
},
182-
"AWSSDK.S3/3.3.104.16": {
182+
"AWSSDK.S3/3.3.104.17": {
183183
"type": "package",
184184
"serviceable": true,
185-
"sha512": "sha512-tZImmdonhDf5AHzHAeOevk2HFcd5JJ2QtHCKsRIQ8xa8VHP1LC+v1KcJFZvCRBWCVQFpKReTjm0G9CxpgNeiGw==",
186-
"path": "awssdk.s3/3.3.104.16",
187-
"hashPath": "awssdk.s3.3.3.104.16.nupkg.sha512"
185+
"sha512": "sha512-fvPiseR2HC8P9J1caKRCQ1bLLxMU57mX0sj899jg1XrBBDcPRUcyt9n8ibmrhloQdCEgvX2wqywCqv/fDETMKg==",
186+
"path": "awssdk.s3/3.3.104.17",
187+
"hashPath": "awssdk.s3.3.3.104.17.nupkg.sha512"
188188
},
189189
"ChunkDecoder/1.0.3": {
190190
"type": "package",
@@ -221,12 +221,12 @@
221221
"path": "regexmatcher/1.0.2",
222222
"hashPath": "regexmatcher.1.0.2.nupkg.sha512"
223223
},
224-
"S3ServerInterface/1.5.1.5": {
224+
"S3ServerInterface/1.5.1.6": {
225225
"type": "package",
226226
"serviceable": true,
227-
"sha512": "sha512-osQib5LJJEoQJuarXmwK8wkn+7RqNPsllG5mepPL0csEvVA44kHxK7KEMAzCjHWHeDXznh5lAuid25Xc65DbDA==",
228-
"path": "s3serverinterface/1.5.1.5",
229-
"hashPath": "s3serverinterface.1.5.1.5.nupkg.sha512"
227+
"sha512": "sha512-95yNV8SiU9jVWKUY5ZbSStCIkCqNhhdKxMDySpOxySM4+xXzyyM2RAKCNWACrmJBdEJu6xtRC7XoPRGOIDd12g==",
228+
"path": "s3serverinterface/1.5.1.6",
229+
"hashPath": "s3serverinterface.1.5.1.6.nupkg.sha512"
230230
},
231231
"SqliteHelper/1.0.13": {
232232
"type": "package",
512 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)