添加项目文件。
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
using FileService.Application.Ports;
|
||||
using FileService.Application.StorageContracts;
|
||||
using FileService.Domain.ValueObjects;
|
||||
using IM.Commons;
|
||||
using MassTransit;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FileService.Infrastructure.Storage
|
||||
{
|
||||
public class LocalStorageAdapter : IObjectStoragePort
|
||||
{
|
||||
private readonly IRedisService redis;
|
||||
|
||||
public LocalStorageAdapter(IRedisService redis)
|
||||
{
|
||||
this.redis = redis;
|
||||
}
|
||||
|
||||
public string ProviderCode => "Local";
|
||||
|
||||
public Task<CompleteUploadResult> CompleteUploadAsync(CompleteUploadCommand command, CancellationToken token)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Task<PresignedUrl> GenerateUploadUrlAsync(GenerateUploadUrlCommand command, CancellationToken token)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public async Task<InitiateUploadResult> InitUploadAsync(InitiateUploadCommand command, CancellationToken token)
|
||||
{
|
||||
var sessionId = Guid.NewGuid();
|
||||
var location = new StorageLocation();
|
||||
return new InitiateUploadResult(sessionId.ToString(),location);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user