@ -0,0 +1,11 @@
namespace EternalArrowBackup.Contracts.Encryption
{
using System.Threading.Tasks;
public interface IContentEncryptor
Task<byte[]> Encrypt(byte[] originalData);
Task<byte[]> Decrypt(byte[] encryptedData);
}
@ -0,0 +1,9 @@
namespace EternalArrowBackup.Contracts.ContentTransformations
public interface IContentHasher
Task<string> ComputeHash(byte[] content);
@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard1.4</TargetFramework>
@ -0,0 +1,14 @@
namespace EternalArrowBackup.Contracts.SourceStorage
using System;
public interface ISourceDirectory
string NormalizedRelativePath { get; }
Task<ISourceFile> GetFile(string filename);
IObservable<ISourceFile> GetAllFiles();
@ -0,0 +1,13 @@
public interface ISourceFile
string Filename { get; }
long Size { get; }
Task<byte[]> ReadContents();
@ -0,0 +1,12 @@
public interface ISourceStorage
Task<ISourceDirectory> GetDirectory(string normalizedRelativePath);
IObservable<ISourceDirectory> GetAllDirectories();
namespace EternalArrowBackup.Contracts.TargetStorage
public interface ITargetDirectory
Task UploadFile(string filename, byte[] content, string hash);
Task<ITargetFile> GetFile(string filename, string hash);
IObservable<ITargetFile> GetAllFiles();
@ -0,0 +1,18 @@
public interface ITargetFile
string Hash { get; }
DateTime UploadDate { get; }
Task<byte[]> RetrieveContents();
public interface ITargetStorage
Task<ITargetDirectory> GetDirectory(string normalizedRelativePath);
public interface ITargetStorageForRecovery
IObservable<ITargetDirectory> GetAllDirectories();