Add project files.

This commit is contained in:
Sergio Matias Urquin
2025-04-29 18:39:57 -06:00
parent 116793710f
commit 6358f5f199
110 changed files with 4484 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
using Core.Blueprint.Domain.Entities;
namespace Core.Blueprint.DAL.Infrastructure.Contracts
{
public interface IBlueprintRepository : IRepositoryIdentityBase<BlueprintCollection>
{
}
}

View File

@@ -0,0 +1,13 @@
using MongoDB.Driver;
namespace Core.Blueprint.DAL.Infrastructure.Contracts
{
public interface IMongoContext
{
IMongoClient _client { get; }
IMongoDatabase Database { get; }
void DropCollection<TDocument>(string partitionKey = null) where TDocument : class;
void SetUpDatabase(string database);
}
}

View File

@@ -0,0 +1,11 @@
using Core.Blueprint.Domain.Dtos;
namespace Core.Blueprint.DAL.Infrastructure.Contracts
{
public interface IProxyBlobStorage
{
IAsyncEnumerable<ImageUrlDto> ListAllItemsAsync();
Task<ImageUrlDto> GetFirstImageUrlAsync();
Task<ImageUrlDto> GetUploadUrl();
}
}

View File

@@ -0,0 +1,11 @@
namespace Core.Blueprint.DAL.Infrastructure.Contracts
{
public interface IRepositoryBase<T> where T : class
{
ValueTask<T> GetByIdAsync(string id);
ValueTask<IQueryable<T>> GetAllAsync();
ValueTask<T> CreateAsync(T blueprint);
Task<bool> UpdateAsync(string id, T blueprint);
Task<bool> DeleteAsync(string id);
}
}

View File

@@ -0,0 +1,9 @@
using Core.Blueprint.Domain.Entities;
namespace Core.Blueprint.DAL.Infrastructure.Contracts
{
public interface IRepositoryIdentityBase<T> : IRepositoryBase<T> where T : AbsEntity
{
ValueTask<T> GetByIdAsync(Guid id) => GetByIdAsync(id.ToString());
}
}

View File

@@ -0,0 +1,11 @@
using Core.Blueprint.Domain.Dtos;
namespace Core.Blueprint.DAL.Infrastructure.Contracts
{
public interface ISampleImageRepository
{
IAsyncEnumerable<ImageUrlDto> GetAllImagesUrls();
Task<ImageUrlDto> GetFirstImageUrl();
Task<ImageUrlDto> GetUploadUrl();
}
}

View File

@@ -0,0 +1,8 @@
using Core.Blueprint.Domain.Entities;
namespace Core.Blueprint.DAL.Infrastructure.Contracts
{
public interface ISampleItemRepository : IRepositoryIdentityBase<SampleItem>
{
}
}

View File

@@ -0,0 +1,11 @@
using Core.Blueprint.Domain.Entities;
namespace Core.Blueprint.DAL.Infrastructure.Contracts
{
public interface ISecretRepository
{
Task<Secret> GetSecret(string secretName, CancellationToken cancellationToken);
Task SetSecret(string secretName, string secretValue, CancellationToken cancellationToken);
Task RemoveSecret(string secretName, CancellationToken cancellationToken);
}
}