diff --git a/Endpoint/Common/Services/PairPeriodTimeConverter.cs b/Endpoint/Common/Services/PairPeriodTimeConverter.cs index d4efc40..5a4db03 100644 --- a/Endpoint/Common/Services/PairPeriodTimeConverter.cs +++ b/Endpoint/Common/Services/PairPeriodTimeConverter.cs @@ -1,4 +1,4 @@ -using Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Settings; +using Mirea.Api.Endpoint.Configuration.Model.GeneralSettings; using System.Collections.Generic; using System.Linq; diff --git a/Endpoint/Configuration/Core/Middleware/CacheMaxAgeMiddleware.cs b/Endpoint/Configuration/Core/Middleware/CacheMaxAgeMiddleware.cs index 03b4c5a..ee68ee0 100644 --- a/Endpoint/Configuration/Core/Middleware/CacheMaxAgeMiddleware.cs +++ b/Endpoint/Configuration/Core/Middleware/CacheMaxAgeMiddleware.cs @@ -8,7 +8,7 @@ using System; using System.Reflection; using System.Threading.Tasks; -namespace Mirea.Api.Endpoint.Middleware; +namespace Mirea.Api.Endpoint.Configuration.Core.Middleware; public class CacheMaxAgeMiddleware(RequestDelegate next, IServiceProvider serviceProvider) { diff --git a/Endpoint/Configuration/Core/Middleware/CustomExceptionHandlerMiddleware.cs b/Endpoint/Configuration/Core/Middleware/CustomExceptionHandlerMiddleware.cs index 5800f7d..337e5dc 100644 --- a/Endpoint/Configuration/Core/Middleware/CustomExceptionHandlerMiddleware.cs +++ b/Endpoint/Configuration/Core/Middleware/CustomExceptionHandlerMiddleware.cs @@ -7,7 +7,7 @@ using System; using System.Text.Json; using System.Threading.Tasks; -namespace Mirea.Api.Endpoint.Middleware; +namespace Mirea.Api.Endpoint.Configuration.Core.Middleware; public class CustomExceptionHandlerMiddleware(RequestDelegate next) { diff --git a/Endpoint/Configuration/Core/Middleware/JwtRevocationMiddleware.cs b/Endpoint/Configuration/Core/Middleware/JwtRevocationMiddleware.cs index 5d657f8..9cf244a 100644 --- a/Endpoint/Configuration/Core/Middleware/JwtRevocationMiddleware.cs +++ b/Endpoint/Configuration/Core/Middleware/JwtRevocationMiddleware.cs @@ -2,7 +2,7 @@ using Mirea.Api.Security.Common.Interfaces; using System.Threading.Tasks; -namespace Mirea.Api.Endpoint.Middleware; +namespace Mirea.Api.Endpoint.Configuration.Core.Middleware; public class JwtRevocationMiddleware(RequestDelegate next) { diff --git a/Endpoint/Configuration/Core/Middleware/MaintenanceModeMiddleware.cs b/Endpoint/Configuration/Core/Middleware/MaintenanceModeMiddleware.cs index 128ed7c..2687eb9 100644 --- a/Endpoint/Configuration/Core/Middleware/MaintenanceModeMiddleware.cs +++ b/Endpoint/Configuration/Core/Middleware/MaintenanceModeMiddleware.cs @@ -3,7 +3,7 @@ using Mirea.Api.Endpoint.Common.Attributes; using Mirea.Api.Endpoint.Common.Interfaces; using System.Threading.Tasks; -namespace Mirea.Api.Endpoint.Middleware; +namespace Mirea.Api.Endpoint.Configuration.Core.Middleware; public class MaintenanceModeMiddleware(RequestDelegate next, IMaintenanceModeService maintenanceModeService, IMaintenanceModeNotConfigureService maintenanceModeNotConfigureService) { diff --git a/Endpoint/Configuration/Core/Startup/CacheConfiguration.cs b/Endpoint/Configuration/Core/Startup/CacheConfiguration.cs index 8239398..504a655 100644 --- a/Endpoint/Configuration/Core/Startup/CacheConfiguration.cs +++ b/Endpoint/Configuration/Core/Startup/CacheConfiguration.cs @@ -1,7 +1,7 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; -using Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Settings; using Mirea.Api.Endpoint.Configuration.Model; +using Mirea.Api.Endpoint.Configuration.Model.GeneralSettings; namespace Mirea.Api.Endpoint.Configuration.Core.Startup; diff --git a/Endpoint/Configuration/Core/Startup/SecureConfiguration.cs b/Endpoint/Configuration/Core/Startup/SecureConfiguration.cs index 3452751..f9f7a81 100644 --- a/Endpoint/Configuration/Core/Startup/SecureConfiguration.cs +++ b/Endpoint/Configuration/Core/Startup/SecureConfiguration.cs @@ -1,8 +1,8 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Mirea.Api.Endpoint.Common.Services.Security; -using Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Settings; using Mirea.Api.Endpoint.Configuration.Model; +using Mirea.Api.Endpoint.Configuration.Model.GeneralSettings; using Mirea.Api.Security; using Mirea.Api.Security.Common.Interfaces; diff --git a/Endpoint/Configuration/ISaveSettings.cs b/Endpoint/Configuration/ISaveSettings.cs index 4b0fd92..860cf5a 100644 --- a/Endpoint/Configuration/ISaveSettings.cs +++ b/Endpoint/Configuration/ISaveSettings.cs @@ -1,4 +1,4 @@ -namespace Mirea.Api.Endpoint.Common.Interfaces; +namespace Mirea.Api.Endpoint.Configuration; public interface ISaveSettings { void SaveSetting(); diff --git a/Endpoint/Configuration/Model/Admin.cs b/Endpoint/Configuration/Model/Admin.cs index 99f798f..73db8d7 100644 --- a/Endpoint/Configuration/Model/Admin.cs +++ b/Endpoint/Configuration/Model/Admin.cs @@ -1,5 +1,4 @@ -using Mirea.Api.Endpoint.Common.Interfaces; -using Mirea.Api.Endpoint.Common.Services; +using Mirea.Api.Endpoint.Common.Services; using System.IO; using System.Text.Json; using System.Text.Json.Serialization; diff --git a/Endpoint/Configuration/Model/GeneralConfig.cs b/Endpoint/Configuration/Model/GeneralConfig.cs index 5674169..454ee90 100644 --- a/Endpoint/Configuration/Model/GeneralConfig.cs +++ b/Endpoint/Configuration/Model/GeneralConfig.cs @@ -1,6 +1,5 @@ -using Mirea.Api.Endpoint.Common.Interfaces; -using Mirea.Api.Endpoint.Common.Services; -using Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Settings; +using Mirea.Api.Endpoint.Common.Services; +using Mirea.Api.Endpoint.Configuration.Model.GeneralSettings; using System.IO; using System.Text.Json; using System.Text.Json.Serialization; diff --git a/Endpoint/Configuration/Validation/Settings/CacheSettings.cs b/Endpoint/Configuration/Model/GeneralSettings/CacheSettings.cs similarity index 64% rename from Endpoint/Configuration/Validation/Settings/CacheSettings.cs rename to Endpoint/Configuration/Model/GeneralSettings/CacheSettings.cs index cf229ce..c5e5dc9 100644 --- a/Endpoint/Configuration/Validation/Settings/CacheSettings.cs +++ b/Endpoint/Configuration/Model/GeneralSettings/CacheSettings.cs @@ -1,7 +1,7 @@ -using Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Attributes; -using Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Interfaces; +using Mirea.Api.Endpoint.Configuration.Validation.Attributes; +using Mirea.Api.Endpoint.Configuration.Validation.Interfaces; -namespace Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Settings; +namespace Mirea.Api.Endpoint.Configuration.Model.GeneralSettings; [RequiredSettings] public class CacheSettings : IIsConfigured diff --git a/Endpoint/Configuration/Validation/Settings/DbSettings.cs b/Endpoint/Configuration/Model/GeneralSettings/DbSettings.cs similarity index 79% rename from Endpoint/Configuration/Validation/Settings/DbSettings.cs rename to Endpoint/Configuration/Model/GeneralSettings/DbSettings.cs index e251eb2..28921e9 100644 --- a/Endpoint/Configuration/Validation/Settings/DbSettings.cs +++ b/Endpoint/Configuration/Model/GeneralSettings/DbSettings.cs @@ -1,10 +1,10 @@ using Mirea.Api.DataAccess.Persistence.Common; -using Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Attributes; -using Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Interfaces; +using Mirea.Api.Endpoint.Configuration.Validation.Attributes; +using Mirea.Api.Endpoint.Configuration.Validation.Interfaces; using System; using System.Text.Json.Serialization; -namespace Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Settings; +namespace Mirea.Api.Endpoint.Configuration.Model.GeneralSettings; [RequiredSettings] public class DbSettings : IIsConfigured diff --git a/Endpoint/Configuration/Validation/Settings/EmailSettings.cs b/Endpoint/Configuration/Model/GeneralSettings/EmailSettings.cs similarity index 79% rename from Endpoint/Configuration/Validation/Settings/EmailSettings.cs rename to Endpoint/Configuration/Model/GeneralSettings/EmailSettings.cs index 9729e8e..b572202 100644 --- a/Endpoint/Configuration/Validation/Settings/EmailSettings.cs +++ b/Endpoint/Configuration/Model/GeneralSettings/EmailSettings.cs @@ -1,6 +1,6 @@ -using Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Interfaces; +using Mirea.Api.Endpoint.Configuration.Validation.Interfaces; -namespace Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Settings; +namespace Mirea.Api.Endpoint.Configuration.Model.GeneralSettings; public class EmailSettings : IIsConfigured { diff --git a/Endpoint/Configuration/Validation/Settings/LogSettings.cs b/Endpoint/Configuration/Model/GeneralSettings/LogSettings.cs similarity index 63% rename from Endpoint/Configuration/Validation/Settings/LogSettings.cs rename to Endpoint/Configuration/Model/GeneralSettings/LogSettings.cs index 9c00d93..3f8deb1 100644 --- a/Endpoint/Configuration/Validation/Settings/LogSettings.cs +++ b/Endpoint/Configuration/Model/GeneralSettings/LogSettings.cs @@ -1,7 +1,7 @@ -using Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Attributes; -using Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Interfaces; +using Mirea.Api.Endpoint.Configuration.Validation.Attributes; +using Mirea.Api.Endpoint.Configuration.Validation.Interfaces; -namespace Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Settings; +namespace Mirea.Api.Endpoint.Configuration.Model.GeneralSettings; [RequiredSettings] public class LogSettings : IIsConfigured diff --git a/Endpoint/Configuration/Validation/Settings/ScheduleSettings.cs b/Endpoint/Configuration/Model/GeneralSettings/ScheduleSettings.cs similarity index 82% rename from Endpoint/Configuration/Validation/Settings/ScheduleSettings.cs rename to Endpoint/Configuration/Model/GeneralSettings/ScheduleSettings.cs index 936c4da..ac1e6d4 100644 --- a/Endpoint/Configuration/Validation/Settings/ScheduleSettings.cs +++ b/Endpoint/Configuration/Model/GeneralSettings/ScheduleSettings.cs @@ -1,10 +1,10 @@ -using Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Attributes; -using Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Interfaces; +using Mirea.Api.Endpoint.Configuration.Validation.Attributes; +using Mirea.Api.Endpoint.Configuration.Validation.Interfaces; using System; using System.Collections.Generic; using System.Linq; -namespace Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Settings; +namespace Mirea.Api.Endpoint.Configuration.Model.GeneralSettings; [RequiredSettings] public class ScheduleSettings : IIsConfigured diff --git a/Endpoint/Configuration/Validation/Attributes/RequiredSettingsAttribute.cs b/Endpoint/Configuration/Validation/Attributes/RequiredSettingsAttribute.cs index 000a4cb..0cf246f 100644 --- a/Endpoint/Configuration/Validation/Attributes/RequiredSettingsAttribute.cs +++ b/Endpoint/Configuration/Validation/Attributes/RequiredSettingsAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Attributes; +namespace Mirea.Api.Endpoint.Configuration.Validation.Attributes; [AttributeUsage(AttributeTargets.Class, Inherited = false)] public class RequiredSettingsAttribute : Attribute; diff --git a/Endpoint/Configuration/Validation/Interfaces/IIsConfigured.cs b/Endpoint/Configuration/Validation/Interfaces/IIsConfigured.cs index 1aa1ec9..3c6fabb 100644 --- a/Endpoint/Configuration/Validation/Interfaces/IIsConfigured.cs +++ b/Endpoint/Configuration/Validation/Interfaces/IIsConfigured.cs @@ -1,4 +1,4 @@ -namespace Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Interfaces; +namespace Mirea.Api.Endpoint.Configuration.Validation.Interfaces; public interface IIsConfigured { diff --git a/Endpoint/Configuration/Validation/SetupTokenService.cs b/Endpoint/Configuration/Validation/SetupTokenService.cs index 58b1ad1..5ef3559 100644 --- a/Endpoint/Configuration/Validation/SetupTokenService.cs +++ b/Endpoint/Configuration/Validation/SetupTokenService.cs @@ -1,7 +1,7 @@ using Mirea.Api.Endpoint.Common.Interfaces; using System; -namespace Mirea.Api.Endpoint.Configuration.ConfigurationChecks; +namespace Mirea.Api.Endpoint.Configuration.Validation; public class SetupTokenService : ISetupToken { diff --git a/Endpoint/Configuration/Validation/Validators/SettingsRequiredValidator.cs b/Endpoint/Configuration/Validation/Validators/SettingsRequiredValidator.cs index 8ab315f..1e0ec77 100644 --- a/Endpoint/Configuration/Validation/Validators/SettingsRequiredValidator.cs +++ b/Endpoint/Configuration/Validation/Validators/SettingsRequiredValidator.cs @@ -1,11 +1,11 @@ using Microsoft.Extensions.Options; -using Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Attributes; -using Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Interfaces; using Mirea.Api.Endpoint.Configuration.Model; +using Mirea.Api.Endpoint.Configuration.Validation.Attributes; +using Mirea.Api.Endpoint.Configuration.Validation.Interfaces; using System; using System.Reflection; -namespace Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Validators; +namespace Mirea.Api.Endpoint.Configuration.Validation.Validators; public class SettingsRequiredValidator { diff --git a/Endpoint/Controllers/Configuration/SetupController.cs b/Endpoint/Controllers/Configuration/SetupController.cs index 68fbd3d..e306092 100644 --- a/Endpoint/Controllers/Configuration/SetupController.cs +++ b/Endpoint/Controllers/Configuration/SetupController.cs @@ -10,9 +10,9 @@ using Mirea.Api.Endpoint.Common.Attributes; using Mirea.Api.Endpoint.Common.Exceptions; using Mirea.Api.Endpoint.Common.Interfaces; using Mirea.Api.Endpoint.Common.Services; -using Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Settings; -using Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Validators; using Mirea.Api.Endpoint.Configuration.Model; +using Mirea.Api.Endpoint.Configuration.Model.GeneralSettings; +using Mirea.Api.Endpoint.Configuration.Validation.Validators; using Mirea.Api.Security.Services; using MySqlConnector; using Npgsql; diff --git a/Endpoint/Program.cs b/Endpoint/Program.cs index 74adcd0..7843cd3 100644 --- a/Endpoint/Program.cs +++ b/Endpoint/Program.cs @@ -10,11 +10,11 @@ using Mirea.Api.DataAccess.Persistence; using Mirea.Api.DataAccess.Persistence.Common; using Mirea.Api.Endpoint.Common.Interfaces; using Mirea.Api.Endpoint.Common.Services; -using Mirea.Api.Endpoint.Configuration.ConfigurationChecks; -using Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Validators; +using Mirea.Api.Endpoint.Configuration.Core.Middleware; using Mirea.Api.Endpoint.Configuration.Core.Startup; using Mirea.Api.Endpoint.Configuration.Model; -using Mirea.Api.Endpoint.Middleware; +using Mirea.Api.Endpoint.Configuration.Validation; +using Mirea.Api.Endpoint.Configuration.Validation.Validators; using Mirea.Api.Security.Services; using System; using System.IO;