diff --git a/src/ApiGateways/O2NextGen.ApiGateway.sln b/src/ApiGateways/O2NextGen.ApiGateway.sln new file mode 100644 index 00000000..5c535c46 --- /dev/null +++ b/src/ApiGateways/O2NextGen.ApiGateway.sln @@ -0,0 +1,17 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 25.0.1700.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {C85BA32B-7971-4292-AA04-8F8B90743E8E} + EndGlobalSection +EndGlobal diff --git a/src/ApiGateways/O2NextGen.Mobile.BFF.Core/O2NextGen.Mobile.BFF.Core.sln b/src/ApiGateways/O2NextGen.Mobile.BFF.Core/O2NextGen.Mobile.BFF.Core.sln new file mode 100644 index 00000000..6f39e607 --- /dev/null +++ b/src/ApiGateways/O2NextGen.Mobile.BFF.Core/O2NextGen.Mobile.BFF.Core.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 25.0.1700.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "O2NextGen.Mobile.BFF.Core", "O2NextGen.Mobile.BFF.Core\O2NextGen.Mobile.BFF.Core.csproj", "{48CD18D1-12AD-4114-A22C-5A18ADB1989C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {48CD18D1-12AD-4114-A22C-5A18ADB1989C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {48CD18D1-12AD-4114-A22C-5A18ADB1989C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {48CD18D1-12AD-4114-A22C-5A18ADB1989C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {48CD18D1-12AD-4114-A22C-5A18ADB1989C}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {0697DC00-F6C0-4E2B-9542-AEE4FFE51C3B} + EndGlobalSection +EndGlobal diff --git a/src/ApiGateways/O2NextGen.Mobile.BFF.Core/O2NextGen.Mobile.BFF.Core/Features/C-Gen/CertificatesController.cs b/src/ApiGateways/O2NextGen.Mobile.BFF.Core/O2NextGen.Mobile.BFF.Core/Features/C-Gen/CertificatesController.cs new file mode 100644 index 00000000..8b9b4550 --- /dev/null +++ b/src/ApiGateways/O2NextGen.Mobile.BFF.Core/O2NextGen.Mobile.BFF.Core/Features/C-Gen/CertificatesController.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; + +namespace O2NextGen.Mobile.BFF.Core.Features.CGen +{ + [Route("api/features/c-gen/[controller]")] + public class CertificatesController : Controller + { + // GET: api/features/c-gen/certificates + [HttpGet] + public IActionResult Get() + { + return Ok(); + } + } +} + diff --git a/src/ApiGateways/O2NextGen.Mobile.BFF.Core/O2NextGen.Mobile.BFF.Core/Features/C-Gen/VersionController.cs b/src/ApiGateways/O2NextGen.Mobile.BFF.Core/O2NextGen.Mobile.BFF.Core/Features/C-Gen/VersionController.cs new file mode 100644 index 00000000..7305f73b --- /dev/null +++ b/src/ApiGateways/O2NextGen.Mobile.BFF.Core/O2NextGen.Mobile.BFF.Core/Features/C-Gen/VersionController.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; + +namespace O2NextGen.Mobile.BFF.Core.Features.CGen +{ + [Route("api/features/c-gen/[controller]")] + public class VersionController : Controller + { + // GET: api/features/c-gen/version + [HttpGet] + public IActionResult Get() + { + return Ok(); + } + } +} + diff --git a/src/ApiGateways/O2NextGen.Mobile.BFF.Core/O2NextGen.Mobile.BFF.Core/Features/E-Sender/VersionController.cs b/src/ApiGateways/O2NextGen.Mobile.BFF.Core/O2NextGen.Mobile.BFF.Core/Features/E-Sender/VersionController.cs new file mode 100644 index 00000000..c0cec782 --- /dev/null +++ b/src/ApiGateways/O2NextGen.Mobile.BFF.Core/O2NextGen.Mobile.BFF.Core/Features/E-Sender/VersionController.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; + +namespace O2NextGen.Mobile.BFF.Core.Features.ESender +{ + [Route("api/features/e-sender/[controller]")] + public class VersionController : Controller + { + // GET: api/features/e-sender/version + [HttpGet] + public IActionResult Get() + { + return Ok(); + } + } +} + diff --git a/src/ApiGateways/O2NextGen.Mobile.BFF.Core/O2NextGen.Mobile.BFF.Core/O2NextGen.Mobile.BFF.Core.csproj b/src/ApiGateways/O2NextGen.Mobile.BFF.Core/O2NextGen.Mobile.BFF.Core/O2NextGen.Mobile.BFF.Core.csproj new file mode 100644 index 00000000..747837c1 --- /dev/null +++ b/src/ApiGateways/O2NextGen.Mobile.BFF.Core/O2NextGen.Mobile.BFF.Core/O2NextGen.Mobile.BFF.Core.csproj @@ -0,0 +1,24 @@ + + + + netcoreapp2.1 + + + + + + + + + + + + + + + + + + + + diff --git a/src/ApiGateways/O2NextGen.Mobile.BFF.Core/O2NextGen.Mobile.BFF.Core/Program.cs b/src/ApiGateways/O2NextGen.Mobile.BFF.Core/O2NextGen.Mobile.BFF.Core/Program.cs new file mode 100644 index 00000000..d08604d7 --- /dev/null +++ b/src/ApiGateways/O2NextGen.Mobile.BFF.Core/O2NextGen.Mobile.BFF.Core/Program.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Logging; + +namespace O2NextGen.Mobile.BFF.Core +{ + public class Program + { + public static void Main(string[] args) + { + CreateWebHostBuilder(args).Build().Run(); + } + + public static IWebHostBuilder CreateWebHostBuilder(string[] args) => + WebHost.CreateDefaultBuilder(args) + .UseStartup(); + } +} + diff --git a/src/ApiGateways/O2NextGen.Mobile.BFF.Core/O2NextGen.Mobile.BFF.Core/Properties/launchSettings.json b/src/ApiGateways/O2NextGen.Mobile.BFF.Core/O2NextGen.Mobile.BFF.Core/Properties/launchSettings.json new file mode 100644 index 00000000..3aaa3363 --- /dev/null +++ b/src/ApiGateways/O2NextGen.Mobile.BFF.Core/O2NextGen.Mobile.BFF.Core/Properties/launchSettings.json @@ -0,0 +1,31 @@ +{ + "$schema": "http://json.schemastore.org/launchsettings.json", + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:38657", + "sslPort": 44375 + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "launchUrl": "api/values", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "O2NextGen.Mobile.BFF.Core": { + "commandName": "Project", + "launchBrowser": true, + "launchUrl": "api/values", + "applicationUrl": "https://localhost:5001;http://localhost:5000", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} + diff --git a/src/ApiGateways/O2NextGen.Mobile.BFF.Core/O2NextGen.Mobile.BFF.Core/Startup.cs b/src/ApiGateways/O2NextGen.Mobile.BFF.Core/O2NextGen.Mobile.BFF.Core/Startup.cs new file mode 100644 index 00000000..f532564f --- /dev/null +++ b/src/ApiGateways/O2NextGen.Mobile.BFF.Core/O2NextGen.Mobile.BFF.Core/Startup.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.HttpsPolicy; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Options; + +namespace O2NextGen.Mobile.BFF.Core +{ + public class Startup + { + public Startup(IConfiguration configuration) + { + Configuration = configuration; + } + + public IConfiguration Configuration { get; } + + public void ConfigureServices(IServiceCollection services) + { + services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1); + } + + public void Configure(IApplicationBuilder app, IHostingEnvironment env) + { + if (env.IsDevelopment()) + { + app.UseDeveloperExceptionPage(); + } + else + { + app.UseHsts(); + } + + app.UseHttpsRedirection(); + app.UseMvc(); + } + } +} + diff --git a/src/ApiGateways/O2NextGen.Mobile.BFF.Core/O2NextGen.Mobile.BFF.Core/appsettings.Development.json b/src/ApiGateways/O2NextGen.Mobile.BFF.Core/O2NextGen.Mobile.BFF.Core/appsettings.Development.json new file mode 100644 index 00000000..11a51145 --- /dev/null +++ b/src/ApiGateways/O2NextGen.Mobile.BFF.Core/O2NextGen.Mobile.BFF.Core/appsettings.Development.json @@ -0,0 +1,10 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Debug", + "System": "Information", + "Microsoft": "Information" + } + } +} + diff --git a/src/ApiGateways/O2NextGen.Mobile.BFF.Core/O2NextGen.Mobile.BFF.Core/appsettings.json b/src/ApiGateways/O2NextGen.Mobile.BFF.Core/O2NextGen.Mobile.BFF.Core/appsettings.json new file mode 100644 index 00000000..013120d6 --- /dev/null +++ b/src/ApiGateways/O2NextGen.Mobile.BFF.Core/O2NextGen.Mobile.BFF.Core/appsettings.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Warning" + } + }, + "AllowedHosts": "*" +} + diff --git a/src/ApiGateways/O2NextGen.Web.BFF.Core/O2NextGen.Web.BFF.Core.sln b/src/ApiGateways/O2NextGen.Web.BFF.Core/O2NextGen.Web.BFF.Core.sln new file mode 100644 index 00000000..31d4c301 --- /dev/null +++ b/src/ApiGateways/O2NextGen.Web.BFF.Core/O2NextGen.Web.BFF.Core.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 25.0.1700.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "O2NextGen.Web.BFF.Core", "O2NextGen.Web.BFF.Core\O2NextGen.Web.BFF.Core.csproj", "{ED553F89-6C2C-48BA-8937-B597A421118E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {ED553F89-6C2C-48BA-8937-B597A421118E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ED553F89-6C2C-48BA-8937-B597A421118E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ED553F89-6C2C-48BA-8937-B597A421118E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ED553F89-6C2C-48BA-8937-B597A421118E}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {53512CC3-EAC0-4BD6-BDE5-E58683B423CC} + EndGlobalSection +EndGlobal diff --git a/src/ApiGateways/O2NextGen.Web.BFF.Core/O2NextGen.Web.BFF.Core/Controllers/ValuesController.cs b/src/ApiGateways/O2NextGen.Web.BFF.Core/O2NextGen.Web.BFF.Core/Controllers/ValuesController.cs new file mode 100644 index 00000000..80788fcb --- /dev/null +++ b/src/ApiGateways/O2NextGen.Web.BFF.Core/O2NextGen.Web.BFF.Core/Controllers/ValuesController.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; + +namespace O2NextGen.Web.BFF.Core.Controllers +{ + [Route("api/[controller]")] + [ApiController] + public class ValuesController : ControllerBase + { + // GET api/values + [HttpGet] + public ActionResult> Get() + { + return new string[] { "value1", "value2" }; + } + + // GET api/values/5 + [HttpGet("{id}")] + public ActionResult Get(int id) + { + return "value"; + } + + // POST api/values + [HttpPost] + public void Post([FromBody] string value) + { + } + + // PUT api/values/5 + [HttpPut("{id}")] + public void Put(int id, [FromBody] string value) + { + } + + // DELETE api/values/5 + [HttpDelete("{id}")] + public void Delete(int id) + { + } + } +} + diff --git a/src/ApiGateways/O2NextGen.Web.BFF.Core/O2NextGen.Web.BFF.Core/O2NextGen.Web.BFF.Core.csproj b/src/ApiGateways/O2NextGen.Web.BFF.Core/O2NextGen.Web.BFF.Core/O2NextGen.Web.BFF.Core.csproj new file mode 100644 index 00000000..e7a1cb80 --- /dev/null +++ b/src/ApiGateways/O2NextGen.Web.BFF.Core/O2NextGen.Web.BFF.Core/O2NextGen.Web.BFF.Core.csproj @@ -0,0 +1,16 @@ + + + + netcoreapp2.1 + + + + + + + + + + + + diff --git a/src/ApiGateways/O2NextGen.Web.BFF.Core/O2NextGen.Web.BFF.Core/Program.cs b/src/ApiGateways/O2NextGen.Web.BFF.Core/O2NextGen.Web.BFF.Core/Program.cs new file mode 100644 index 00000000..ac1ab2a9 --- /dev/null +++ b/src/ApiGateways/O2NextGen.Web.BFF.Core/O2NextGen.Web.BFF.Core/Program.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Logging; + +namespace O2NextGen.Web.BFF.Core +{ + public class Program + { + public static void Main(string[] args) + { + CreateWebHostBuilder(args).Build().Run(); + } + + public static IWebHostBuilder CreateWebHostBuilder(string[] args) => + WebHost.CreateDefaultBuilder(args) + .UseStartup(); + } +} + diff --git a/src/ApiGateways/O2NextGen.Web.BFF.Core/O2NextGen.Web.BFF.Core/Properties/launchSettings.json b/src/ApiGateways/O2NextGen.Web.BFF.Core/O2NextGen.Web.BFF.Core/Properties/launchSettings.json new file mode 100644 index 00000000..8541d245 --- /dev/null +++ b/src/ApiGateways/O2NextGen.Web.BFF.Core/O2NextGen.Web.BFF.Core/Properties/launchSettings.json @@ -0,0 +1,31 @@ +{ + "$schema": "http://json.schemastore.org/launchsettings.json", + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:41774", + "sslPort": 44379 + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "launchUrl": "api/values", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "O2NextGen.Web.BFF.Core": { + "commandName": "Project", + "launchBrowser": true, + "launchUrl": "api/values", + "applicationUrl": "https://localhost:5001;http://localhost:5000", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} + diff --git a/src/ApiGateways/O2NextGen.Web.BFF.Core/O2NextGen.Web.BFF.Core/Startup.cs b/src/ApiGateways/O2NextGen.Web.BFF.Core/O2NextGen.Web.BFF.Core/Startup.cs new file mode 100644 index 00000000..6350818d --- /dev/null +++ b/src/ApiGateways/O2NextGen.Web.BFF.Core/O2NextGen.Web.BFF.Core/Startup.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.HttpsPolicy; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Options; + +namespace O2NextGen.Web.BFF.Core +{ + public class Startup + { + public Startup(IConfiguration configuration) + { + Configuration = configuration; + } + + public IConfiguration Configuration { get; } + + // This method gets called by the runtime. Use this method to add services to the container. + public void ConfigureServices(IServiceCollection services) + { + services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1); + } + + // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. + public void Configure(IApplicationBuilder app, IHostingEnvironment env) + { + if (env.IsDevelopment()) + { + app.UseDeveloperExceptionPage(); + } + else + { + app.UseHsts(); + } + + app.UseHttpsRedirection(); + app.UseMvc(); + } + } +} + diff --git a/src/ApiGateways/O2NextGen.Web.BFF.Core/O2NextGen.Web.BFF.Core/appsettings.Development.json b/src/ApiGateways/O2NextGen.Web.BFF.Core/O2NextGen.Web.BFF.Core/appsettings.Development.json new file mode 100644 index 00000000..11a51145 --- /dev/null +++ b/src/ApiGateways/O2NextGen.Web.BFF.Core/O2NextGen.Web.BFF.Core/appsettings.Development.json @@ -0,0 +1,10 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Debug", + "System": "Information", + "Microsoft": "Information" + } + } +} + diff --git a/src/ApiGateways/O2NextGen.Web.BFF.Core/O2NextGen.Web.BFF.Core/appsettings.json b/src/ApiGateways/O2NextGen.Web.BFF.Core/O2NextGen.Web.BFF.Core/appsettings.json new file mode 100644 index 00000000..013120d6 --- /dev/null +++ b/src/ApiGateways/O2NextGen.Web.BFF.Core/O2NextGen.Web.BFF.Core/appsettings.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Warning" + } + }, + "AllowedHosts": "*" +} +