feat(*): Add base implementations of all repositories

This commit is contained in:
Josh Creek
2021-08-30 13:16:43 +01:00
parent a1db5136c6
commit b22d2f7f31
4 changed files with 168 additions and 0 deletions
@@ -0,0 +1,42 @@
using FileRepository.Models;
using Microsoft.Extensions.Configuration;
using System;
using System.Threading.Tasks;
namespace FileRepository.Repositories
{
/// <summary>
/// The repository implementation for Disk.
/// </summary>
internal class DiskRepository : IFileRepository
{
/// <summary>
/// Initialises a new instance of the <see cref="DiskRepository"/> class with configuration.
/// </summary>
/// <param name="config">The configuration to initialise the repository with.</param>
internal DiskRepository(IConfiguration config)
{
//this.host = config["DiskRepository:host"];
}
public async Task<string> CreateFileAsync(RepoFile file)
{
throw new NotImplementedException();
}
public async Task<bool> DeleteFileAsync(string filename)
{
throw new NotImplementedException();
}
public async Task<RepoFile> ReadFileAsync(string filename)
{
throw new NotImplementedException();
}
public async Task<bool> UpdateFileAsync(RepoFile file)
{
throw new NotImplementedException();
}
}
}
@@ -0,0 +1,42 @@
using FileRepository.Models;
using Microsoft.Extensions.Configuration;
using System;
using System.Threading.Tasks;
namespace FileRepository.Repositories
{
/// <summary>
/// The repository implementation for MongoDb.
/// </summary>
internal class MongoDbRepository : IFileRepository
{
/// <summary>
/// Initialises a new instance of the <see cref="MongoDbRepository"/> class with configuration.
/// </summary>
/// <param name="config">The configuration to initialise the repository with.</param>
internal MongoDbRepository(IConfiguration config)
{
//this.host = config["MongoDbRepository:host"];
}
public async Task<string> CreateFileAsync(RepoFile file)
{
throw new NotImplementedException();
}
public async Task<bool> DeleteFileAsync(string filename)
{
throw new NotImplementedException();
}
public async Task<RepoFile> ReadFileAsync(string filename)
{
throw new NotImplementedException();
}
public async Task<bool> UpdateFileAsync(RepoFile file)
{
throw new NotImplementedException();
}
}
}
@@ -0,0 +1,42 @@
using FileRepository.Models;
using Microsoft.Extensions.Configuration;
using System;
using System.Threading.Tasks;
namespace FileRepository.Repositories
{
/// <summary>
/// The repository implementation for S3.
/// </summary>
internal class S3Repository : IFileRepository
{
/// <summary>
/// Initialises a new instance of the <see cref="S3Repository"/> class with configuration.
/// </summary>
/// <param name="config">The configuration to initialise the repository with.</param>
internal S3Repository(IConfiguration config)
{
//this.host = config["S3Repository:host"];
}
public async Task<string> CreateFileAsync(RepoFile file)
{
throw new NotImplementedException();
}
public async Task<bool> DeleteFileAsync(string filename)
{
throw new NotImplementedException();
}
public async Task<RepoFile> ReadFileAsync(string filename)
{
throw new NotImplementedException();
}
public async Task<bool> UpdateFileAsync(RepoFile file)
{
throw new NotImplementedException();
}
}
}
@@ -0,0 +1,42 @@
using FileRepository.Models;
using Microsoft.Extensions.Configuration;
using System;
using System.Threading.Tasks;
namespace FileRepository.Repositories
{
/// <summary>
/// The repository implementation for SQL.
/// </summary>
internal class SqlRepository : IFileRepository
{
/// <summary>
/// Initialises a new instance of the <see cref="SqlRepository"/> class with configuration.
/// </summary>
/// <param name="config">The configuration to initialise the repository with.</param>
internal SqlRepository(IConfiguration config)
{
//this.host = config["SqlRepository:host"];
}
public async Task<string> CreateFileAsync(RepoFile file)
{
throw new NotImplementedException();
}
public async Task<bool> DeleteFileAsync(string filename)
{
throw new NotImplementedException();
}
public async Task<RepoFile> ReadFileAsync(string filename)
{
throw new NotImplementedException();
}
public async Task<bool> UpdateFileAsync(RepoFile file)
{
throw new NotImplementedException();
}
}
}