2021-08-07 07:26:09 +02:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using Teknik.Configuration;
|
|
|
|
|
|
2021-08-12 03:44:15 +02:00
|
|
|
|
namespace Teknik.StorageService
|
2021-08-07 07:26:09 +02:00
|
|
|
|
{
|
|
|
|
|
public abstract class StorageService : IStorageService
|
|
|
|
|
{
|
|
|
|
|
protected readonly StorageConfig _config;
|
|
|
|
|
|
|
|
|
|
public StorageService(StorageConfig config)
|
|
|
|
|
{
|
|
|
|
|
_config = config;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public abstract string GetUniqueFileName();
|
|
|
|
|
public abstract Stream GetFile(string fileName);
|
|
|
|
|
public abstract List<string> GetFileNames();
|
|
|
|
|
public abstract void SaveFile(string fileName, Stream file);
|
|
|
|
|
public abstract void SaveEncryptedFile(string fileName, Stream file, int chunkSize, byte[] key, byte[] iv);
|
|
|
|
|
public abstract void DeleteFile(string fileName);
|
|
|
|
|
}
|
|
|
|
|
}
|