添加项目文件。
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
using FileService.Application.StorageContracts;
|
||||
|
||||
namespace FileService.Application.Ports
|
||||
{
|
||||
public interface IObjectStoragePort
|
||||
{
|
||||
string ProviderCode { get; }
|
||||
public Task<InitiateUploadResult> InitUploadAsync(InitiateUploadCommand command,CancellationToken token);
|
||||
public Task<PresignedUrl> GenerateUploadUrlAsync(GenerateUploadUrlCommand command, CancellationToken token);
|
||||
public Task<CompleteUploadResult> CompleteUploadAsync(CompleteUploadCommand command, CancellationToken token);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FileService.Application.Ports
|
||||
{
|
||||
public interface IObjectStorageRouter
|
||||
{
|
||||
IObjectStoragePort Route(string providerCode);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using FileService.Application.StorageContracts;
|
||||
|
||||
namespace FileService.Application.Ports
|
||||
{
|
||||
public interface IStorageRedisCache
|
||||
{
|
||||
Task SetAsync(UploadRuntimeCache upload);
|
||||
Task DeleteAsync(string sessionId);
|
||||
Task DeleteByTaskIdAsync(string taskId);
|
||||
Task<UploadRuntimeCache?> GetAsync(string sessionId);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user