This commit is contained in:
2024-07-03 22:18:32 +02:00
Unverified
parent 4b333878b8
commit 008dcdf4ec
88 changed files with 3389 additions and 644 deletions

View File

@@ -0,0 +1,13 @@
using Microsoft.Extensions.Configuration;
using WatchIt.Website.Services.Utility.Configuration.Model;
namespace WatchIt.Website.Services.Utility.Configuration;
public class ConfigurationService(IConfiguration configuration) : IConfigurationService
{
#region PROPERTIES
public ConfigurationData Data => configuration.Get<ConfigurationData>()!;
#endregion
}

View File

@@ -0,0 +1,8 @@
using WatchIt.Website.Services.Utility.Configuration.Model;
namespace WatchIt.Website.Services.Utility.Configuration;
public interface IConfigurationService
{
ConfigurationData Data { get; }
}

View File

@@ -0,0 +1,9 @@
namespace WatchIt.Website.Services.Utility.Configuration.Model;
public class Accounts
{
public string Base { get; set; }
public string Register { get; set; }
public string Authenticate { get; set; }
public string AuthenticateRefresh { get; set; }
}

View File

@@ -0,0 +1,8 @@
namespace WatchIt.Website.Services.Utility.Configuration.Model;
public class ConfigurationData
{
public Logging Logging { get; set; }
public string AllowedHosts { get; set; }
public Endpoints Endpoints { get; set; }
}

View File

@@ -0,0 +1,10 @@
namespace WatchIt.Website.Services.Utility.Configuration.Model;
public class Endpoints
{
public string Base { get; set; }
public Accounts Accounts { get; set; }
public Genres Genres { get; set; }
public Movies Movies { get; set; }
public Media Media { get; set; }
}

View File

@@ -0,0 +1,11 @@
namespace WatchIt.Website.Services.Utility.Configuration.Model;
public class Genres
{
public string Base { get; set; }
public string GetAll { get; set; }
public string Get { get; set; }
public string Post { get; set; }
public string Put { get; set; }
public string Delete { get; set; }
}

View File

@@ -0,0 +1,7 @@
namespace WatchIt.Website.Services.Utility.Configuration.Model;
public class LogLevel
{
public string Default { get; set; }
public string Microsoft_AspNetCore { get; set; }
}

View File

@@ -0,0 +1,6 @@
namespace WatchIt.Website.Services.Utility.Configuration.Model;
public class Logging
{
public LogLevel LogLevel { get; set; }
}

View File

@@ -0,0 +1,16 @@
namespace WatchIt.Website.Services.Utility.Configuration.Model;
public class Media
{
public string Base { get; set; }
public string GetGenres { get; set; }
public string PostGenre { get; set; }
public string DeleteGenre { get; set; }
public string GetPhotoMediaRandomBackground { get; set; }
public string GetPhoto { get; set; }
public string GetPhotos { get; set; }
public string GetPhotoRandomBackground { get; set; }
public string PostPhoto { get; set; }
public string PutPhoto { get; set; }
public string DeletePhoto { get; set; }
}

View File

@@ -0,0 +1,14 @@
namespace WatchIt.Website.Services.Utility.Configuration.Model;
public class Movies
{
public string Base { get; set; }
public string GetAll { get; set; }
public string Get { get; set; }
public string Post { get; set; }
public string Put { get; set; }
public string Delete { get; set; }
public string GetGenres { get; set; }
public string PostGenre { get; set; }
public string DeleteGenre { get; set; }
}

View File

@@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.1" />
</ItemGroup>
</Project>