Renames
This commit is contained in:
+2
-2
@@ -2,9 +2,9 @@ using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Musify.Application.Configuration
|
||||
{
|
||||
public class StorageSettings
|
||||
public class ApplicationStorageConfiguration
|
||||
{
|
||||
public const string SectionName = "Storage";
|
||||
public const string SectionName = "ApplicationStorage";
|
||||
|
||||
[Required]
|
||||
[MinLength(3)]
|
||||
@@ -9,7 +9,7 @@ namespace Musify.Application.Configuration
|
||||
public static IServiceCollection AddApplicationConfigurations(this IServiceCollection serviceDescriptors, IConfiguration configuration)
|
||||
{
|
||||
serviceDescriptors
|
||||
.AddValidatedConfiguration<StorageSettings>(configuration, StorageSettings.SectionName)
|
||||
.AddValidatedConfiguration<ApplicationStorageConfiguration>(configuration, ApplicationStorageConfiguration.SectionName)
|
||||
.AddValidatedConfiguration<PlayListConfiguration>(configuration, PlayListConfiguration.SectionName);
|
||||
|
||||
return serviceDescriptors;
|
||||
|
||||
@@ -11,7 +11,7 @@ using Musify.Domain.Entities;
|
||||
namespace Musify.Application.PlayLists.Commands.CreatePlayList
|
||||
{
|
||||
public class CreatePlayListCommandHandler(IEventBus eventBus, IDatabase database, IStorageHandler storageHandler,
|
||||
ILogger<CreatePlayListCommandHandler> logger, StorageSettings storageConfiguration, PlayListConfiguration playListConfiguration)
|
||||
ILogger<CreatePlayListCommandHandler> logger, ApplicationStorageConfiguration storageConfiguration, PlayListConfiguration playListConfiguration)
|
||||
: IRequestHandler<CreatePlayListCommand, Task<Result<PlayListResponse>> >
|
||||
{
|
||||
public async Task<Result<PlayListResponse>> Handle(CreatePlayListCommand request, CancellationToken cancellationToken)
|
||||
|
||||
@@ -10,7 +10,7 @@ using Musify.Application.PlayLists;
|
||||
namespace Musify.Application.PlayLists.Commands.DeletePlayList
|
||||
{
|
||||
public class DeletePlayListCommandHandler(IDatabase database, IEventBus eventBus,
|
||||
StorageSettings storageConfiguration, PlayListConfiguration playListConfiguration, ILogger<DeletePlayListCommandHandler> logger)
|
||||
ApplicationStorageConfiguration storageConfiguration, PlayListConfiguration playListConfiguration, ILogger<DeletePlayListCommandHandler> logger)
|
||||
: IRequestHandler<DeletePlayListCommand, Task<Result>>
|
||||
{
|
||||
public async Task<Result> Handle(DeletePlayListCommand request, CancellationToken cancellationToken)
|
||||
|
||||
@@ -11,7 +11,7 @@ using Musify.Application.PlayLists.Contracts;
|
||||
namespace Musify.Application.PlayLists.Commands.UpdatePlayList
|
||||
{
|
||||
public class UpdatePlayListCommandHandler(IEventBus eventBus, IDatabase database, IStorageHandler storageHandler,
|
||||
ILogger<UpdatePlayListCommandHandler> logger, StorageSettings storageConfiguration, PlayListConfiguration playListConfiguration)
|
||||
ILogger<UpdatePlayListCommandHandler> logger, ApplicationStorageConfiguration storageConfiguration, PlayListConfiguration playListConfiguration)
|
||||
: IRequestHandler<UpdatePlayListCommand, Task<Result<PlayListResponse>> >
|
||||
{
|
||||
public async Task<Result<PlayListResponse>> Handle(UpdatePlayListCommand request, CancellationToken cancellationToken)
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Musify.Infrastructure.Configuration
|
||||
serviceDescriptors
|
||||
.AddValidatedConfiguration<DatabaseConfiguration>(configuration, DatabaseConfiguration.SectionName)
|
||||
.AddValidatedConfiguration<KeycloakConfiguration>(configuration, KeycloakConfiguration.SectionName)
|
||||
.AddValidatedConfiguration<StorageClientConfiguration>(configuration, StorageClientConfiguration.SectionName);
|
||||
.AddValidatedConfiguration<InfrastructureStorageConfiguration>(configuration, InfrastructureStorageConfiguration.SectionName);
|
||||
|
||||
return serviceDescriptors;
|
||||
}
|
||||
|
||||
+2
-2
@@ -2,9 +2,9 @@ using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Musify.Infrastructure.Configuration
|
||||
{
|
||||
public class StorageClientConfiguration
|
||||
public class InfrastructureStorageConfiguration
|
||||
{
|
||||
public const string SectionName = "Storage";
|
||||
public const string SectionName = "InfrastructureStorage";
|
||||
|
||||
[Required]
|
||||
[Url]
|
||||
@@ -8,7 +8,7 @@ using Musify.Infrastructure.Messaging.Activities.Arguments;
|
||||
namespace Musify.Infrastructure.Messaging.Consumers
|
||||
{
|
||||
public class UpdatePlayListPictureConsumer(IBus bus, IPictureHandler pictureHandler,
|
||||
StorageSettings storageSettings, PlayListConfiguration playListConfiguration)
|
||||
ApplicationStorageConfiguration storageSettings, PlayListConfiguration playListConfiguration)
|
||||
: IConsumer<UpdatePlayListPictureEvent>
|
||||
{
|
||||
public const string QueueName = "Update-PlayList-Picture";
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Musify.Infrastructure.Storage
|
||||
{
|
||||
serviceDescriptors.AddScoped<IAmazonS3>(serviceProvider =>
|
||||
{
|
||||
var configuration = serviceProvider.GetRequiredService<StorageClientConfiguration>();
|
||||
var configuration = serviceProvider.GetRequiredService<InfrastructureStorageConfiguration>();
|
||||
var s3Configuration = new AmazonS3Config
|
||||
{
|
||||
ServiceURL = configuration.ServiceUrl,
|
||||
|
||||
@@ -9,7 +9,7 @@ using Musify.Infrastructure.Configuration;
|
||||
|
||||
namespace Musify.Infrastructure.Storage
|
||||
{
|
||||
public class StorageHandler(IDatabase database, IAmazonS3 amazonS3, StorageClientConfiguration storageClientConfiguration, ILogger<StorageHandler> logger)
|
||||
public class StorageHandler(IDatabase database, IAmazonS3 amazonS3, InfrastructureStorageConfiguration storageClientConfiguration, ILogger<StorageHandler> logger)
|
||||
: IStorageHandler
|
||||
{
|
||||
public async Task<Result<Stream>> GetFileAsync(string bucketName, string keyName, CancellationToken cancellationToken)
|
||||
|
||||
Reference in New Issue
Block a user