Change editor rule
This commit is contained in:
@@ -1,41 +1,42 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Musify.Application.Configuration;
|
||||
|
||||
namespace Musify.Infrastructure.Configuration;
|
||||
|
||||
public class AudioConfiguration : IConfigurationOptions
|
||||
namespace Musify.Infrastructure.Configuration
|
||||
{
|
||||
public static string SectionName => "AudioTranscoder";
|
||||
public class AudioConfiguration : IConfigurationOptions
|
||||
{
|
||||
public static string SectionName => "AudioTranscoder";
|
||||
|
||||
[Required]
|
||||
public TimeSpan TranscodingTimeout { get; set; } = TimeSpan.FromMinutes(5);
|
||||
[Required]
|
||||
public TimeSpan TranscodingTimeout { get; set; } = TimeSpan.FromMinutes(5);
|
||||
|
||||
[Required]
|
||||
public FfmpegConfiguration Ffmpeg { get; set; } = new FfmpegConfiguration();
|
||||
}
|
||||
[Required]
|
||||
public FfmpegConfiguration Ffmpeg { get; set; } = new FfmpegConfiguration();
|
||||
}
|
||||
|
||||
public class FfmpegConfiguration
|
||||
{
|
||||
[Required]
|
||||
public string ExecutableName { get; set; } = "ffmpeg";
|
||||
public class FfmpegConfiguration
|
||||
{
|
||||
[Required]
|
||||
public string ExecutableName { get; set; } = "ffmpeg";
|
||||
|
||||
[Required]
|
||||
public string OutputFileName { get; set; } = "audio.m4a";
|
||||
[Required]
|
||||
public string OutputFileName { get; set; } = "audio.m4a";
|
||||
|
||||
[Required]
|
||||
public string AudioCodec { get; set; } = "aac";
|
||||
[Required]
|
||||
public string AudioCodec { get; set; } = "aac";
|
||||
|
||||
[Required]
|
||||
public string AudioBitrate { get; set; } = "128k";
|
||||
[Required]
|
||||
public string AudioBitrate { get; set; } = "128k";
|
||||
|
||||
[Range(1, 8)]
|
||||
public int AudioChannels { get; set; } = 2;
|
||||
[Range(1, 8)]
|
||||
public int AudioChannels { get; set; } = 2;
|
||||
|
||||
[Range(8000, 192000)]
|
||||
public int AudioSampleRate { get; set; } = 48000;
|
||||
[Range(8000, 192000)]
|
||||
public int AudioSampleRate { get; set; } = 48000;
|
||||
|
||||
[Required]
|
||||
public string AudioProfile { get; set; } = "aac_low";
|
||||
[Required]
|
||||
public string AudioProfile { get; set; } = "aac_low";
|
||||
|
||||
public string AdditionalArguments { get; set; } = string.Empty;
|
||||
public string AdditionalArguments { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Musify.Application.Configuration;
|
||||
|
||||
namespace Musify.Infrastructure.Configuration;
|
||||
|
||||
public class DatabaseConfiguration : IConfigurationOptions
|
||||
namespace Musify.Infrastructure.Configuration
|
||||
{
|
||||
public static string SectionName => "Database";
|
||||
public class DatabaseConfiguration : IConfigurationOptions
|
||||
{
|
||||
public static string SectionName => "Database";
|
||||
|
||||
[Required]
|
||||
public required string ConnectionString { get; set; }
|
||||
[Required]
|
||||
public required string ConnectionString { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
+16
-15
@@ -1,25 +1,26 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Musify.Application.Configuration;
|
||||
|
||||
namespace Musify.Infrastructure.Configuration;
|
||||
|
||||
public class InfrastructureStorageConfiguration : IConfigurationOptions
|
||||
namespace Musify.Infrastructure.Configuration
|
||||
{
|
||||
public static string SectionName => "InfrastructureStorage";
|
||||
public class InfrastructureStorageConfiguration : IConfigurationOptions
|
||||
{
|
||||
public static string SectionName => "InfrastructureStorage";
|
||||
|
||||
[Url]
|
||||
[Required]
|
||||
public required string Address { get; set; }
|
||||
[Url]
|
||||
[Required]
|
||||
public required string Address { get; set; }
|
||||
|
||||
[Required]
|
||||
public required string AccessKey { get; set; }
|
||||
[Required]
|
||||
public required string AccessKey { get; set; }
|
||||
|
||||
[Required]
|
||||
public required string SecretAccessKey { get; set; }
|
||||
[Required]
|
||||
public required string SecretAccessKey { get; set; }
|
||||
|
||||
[Required]
|
||||
public bool ForcePathStyle { get; set; }
|
||||
[Required]
|
||||
public bool ForcePathStyle { get; set; }
|
||||
|
||||
[Required]
|
||||
public bool UseHttp { get; set; }
|
||||
[Required]
|
||||
public bool UseHttp { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Musify.Application.Configuration;
|
||||
|
||||
namespace Musify.Infrastructure.Configuration;
|
||||
|
||||
public class MassTransitConfiguration : IConfigurationOptions
|
||||
namespace Musify.Infrastructure.Configuration
|
||||
{
|
||||
public static string SectionName => "MassTransit";
|
||||
public class MassTransitConfiguration : IConfigurationOptions
|
||||
{
|
||||
public static string SectionName => "MassTransit";
|
||||
|
||||
[Required]
|
||||
public required string Address { get; set; }
|
||||
[Required]
|
||||
public required string Address { get; set; }
|
||||
|
||||
[Required]
|
||||
public required string Username { get; set; }
|
||||
[Required]
|
||||
public required string Username { get; set; }
|
||||
|
||||
[Required]
|
||||
public required string Password { get; set; }
|
||||
[Required]
|
||||
public required string Password { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Musify.Application.Configuration;
|
||||
|
||||
namespace Musify.Infrastructure.Configuration;
|
||||
|
||||
public class OpenTelemetryConfiguration : IConfigurationOptions
|
||||
namespace Musify.Infrastructure.Configuration
|
||||
{
|
||||
public static string SectionName => "OpenTelemetry";
|
||||
public class OpenTelemetryConfiguration : IConfigurationOptions
|
||||
{
|
||||
public static string SectionName => "OpenTelemetry";
|
||||
|
||||
[Url]
|
||||
[Required]
|
||||
public required string OtlpEndpoint { get; set; }
|
||||
[Url]
|
||||
[Required]
|
||||
public required string OtlpEndpoint { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,21 +1,22 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Musify.Application.Configuration;
|
||||
|
||||
namespace Musify.Infrastructure.Configuration;
|
||||
|
||||
public class StreamTicketConfiguration : IConfigurationOptions
|
||||
namespace Musify.Infrastructure.Configuration
|
||||
{
|
||||
public static string SectionName => "StreamTicket";
|
||||
public class StreamTicketConfiguration : IConfigurationOptions
|
||||
{
|
||||
public static string SectionName => "StreamTicket";
|
||||
|
||||
[Required]
|
||||
public required string PrivateKeyPath { get; set; }
|
||||
[Required]
|
||||
public required string PrivateKeyPath { get; set; }
|
||||
|
||||
[Required]
|
||||
public string Audience { get; set; } = "media-gateway";
|
||||
[Required]
|
||||
public string Audience { get; set; } = "media-gateway";
|
||||
|
||||
[Required]
|
||||
public string Issuer { get; set; } = "musify-webapi";
|
||||
[Required]
|
||||
public string Issuer { get; set; } = "musify-webapi";
|
||||
|
||||
[Range(60, 86400)]
|
||||
public int TicketTtlSeconds { get; set; } = 3600;
|
||||
[Range(60, 86400)]
|
||||
public int TicketTtlSeconds { get; set; } = 3600;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Musify.Application.Configuration;
|
||||
|
||||
namespace Musify.Infrastructure.Configuration;
|
||||
|
||||
public class WorkerConfiguration : IConfigurationOptions
|
||||
namespace Musify.Infrastructure.Configuration
|
||||
{
|
||||
public static string SectionName => "Workers";
|
||||
public class WorkerConfiguration : IConfigurationOptions
|
||||
{
|
||||
public static string SectionName => "Workers";
|
||||
|
||||
[Required]
|
||||
public WorkerRoutes Routes { get; set; } = new WorkerRoutes();
|
||||
}
|
||||
[Required]
|
||||
public WorkerRoutes Routes { get; set; } = new WorkerRoutes();
|
||||
}
|
||||
|
||||
public class WorkerRoutes
|
||||
{
|
||||
[Required]
|
||||
public string TemporaryFilesDirectory { get; set; } = Path.GetTempPath();
|
||||
public class WorkerRoutes
|
||||
{
|
||||
[Required]
|
||||
public string TemporaryFilesDirectory { get; set; } = Path.GetTempPath();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user