Unify picture configuration and options registration
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Musify.Application.Configuration;
|
||||
|
||||
namespace Musify.Infrastructure.Configuration;
|
||||
|
||||
public class AudioConfiguration
|
||||
public class AudioConfiguration : IConfigurationOptions
|
||||
{
|
||||
public const string SectionName = "AudioTranscoder";
|
||||
public static string SectionName => "AudioTranscoder";
|
||||
|
||||
[Required]
|
||||
public TimeSpan TranscodingTimeout { get; set; } = TimeSpan.FromMinutes(5);
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Musify.Application.Configuration;
|
||||
|
||||
namespace Musify.Infrastructure.Configuration;
|
||||
|
||||
public class DatabaseConfiguration
|
||||
public class DatabaseConfiguration : IConfigurationOptions
|
||||
{
|
||||
public const string SectionName = "Database";
|
||||
public static string SectionName => "Database";
|
||||
|
||||
[Required]
|
||||
public required string ConnectionString { get; set; }
|
||||
|
||||
+3
-2
@@ -1,10 +1,11 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Musify.Application.Configuration;
|
||||
|
||||
namespace Musify.Infrastructure.Configuration;
|
||||
|
||||
public class InfrastructureStorageConfiguration
|
||||
public class InfrastructureStorageConfiguration : IConfigurationOptions
|
||||
{
|
||||
public const string SectionName = "InfrastructureStorage";
|
||||
public static string SectionName => "InfrastructureStorage";
|
||||
|
||||
[Url]
|
||||
[Required]
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Musify.Application.Configuration;
|
||||
|
||||
namespace Musify.Infrastructure.Configuration;
|
||||
|
||||
public class MassTransitConfiguration
|
||||
public class MassTransitConfiguration : IConfigurationOptions
|
||||
{
|
||||
public const string SectionName = "MassTransit";
|
||||
public static string SectionName => "MassTransit";
|
||||
|
||||
[Required]
|
||||
public required string Address { get; set; }
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Musify.Application.Configuration;
|
||||
|
||||
namespace Musify.Infrastructure.Configuration;
|
||||
|
||||
public class OpenTelemetryConfiguration
|
||||
public class OpenTelemetryConfiguration : IConfigurationOptions
|
||||
{
|
||||
public const string SectionName = "OpenTelemetry";
|
||||
public static string SectionName => "OpenTelemetry";
|
||||
|
||||
[Url]
|
||||
[Required]
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Musify.Application.Configuration;
|
||||
|
||||
namespace Musify.Infrastructure.Configuration;
|
||||
|
||||
public class StreamTicketConfiguration
|
||||
public class StreamTicketConfiguration : IConfigurationOptions
|
||||
{
|
||||
public const string SectionName = "StreamTicket";
|
||||
public static string SectionName => "StreamTicket";
|
||||
|
||||
[Required]
|
||||
public required string PrivateKeyPath { get; set; }
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Musify.Application.Configuration;
|
||||
|
||||
namespace Musify.Infrastructure.Configuration;
|
||||
|
||||
public class WorkerConfiguration
|
||||
public class WorkerConfiguration : IConfigurationOptions
|
||||
{
|
||||
public const string SectionName = "Workers";
|
||||
public static string SectionName => "Workers";
|
||||
|
||||
[Required]
|
||||
public WorkerRoutes Routes { get; set; } = new WorkerRoutes();
|
||||
|
||||
Reference in New Issue
Block a user