-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from romanett/clean_architecture
Switch to Clean architecture
- Loading branch information
Showing
45 changed files
with
864 additions
and
1,430 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 3 additions & 4 deletions
7
...dels/ApiModels/X509CertificateApiModel.cs → ...main/ApiModels/X509CertificateApiModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
GDSwithREST/Data/Models/ApplicationNames.cs → ...thREST.Domain/Entities/ApplicationName.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
namespace GDSwithREST.Data.Models | ||
namespace GDSwithREST.Domain.Entities | ||
{ | ||
public partial class ApplicationNames | ||
public sealed class ApplicationName | ||
{ | ||
public int Id { get; set; } | ||
public int ApplicationId { get; set; } | ||
public string Locale { get; set; } = null!; | ||
public string? Text { get; set; } | ||
|
||
public Applications Application { get; set; } = null!; | ||
public Application Application { get; set; } = null!; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
namespace GDSwithREST.Domain.Entities | ||
{ | ||
public sealed class CertificateStore | ||
{ | ||
public CertificateStore() | ||
{ | ||
ApplicationsHttpsTrustList = new HashSet<Application>(); | ||
ApplicationsTrustList = new HashSet<Application>(); | ||
} | ||
|
||
public int Id { get; set; } | ||
public string Path { get; set; } = null!; | ||
public string AuthorityId { get; set; } = null!; | ||
|
||
public ICollection<Application> ApplicationsHttpsTrustList { get; set; } | ||
public ICollection<Application> ApplicationsTrustList { get; set; } | ||
} | ||
} |
6 changes: 3 additions & 3 deletions
6
GDSwithREST/Data/Models/ServerEndpoints.cs → ...ithREST.Domain/Entities/ServerEndpoint.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
namespace GDSwithREST.Data.Models | ||
namespace GDSwithREST.Domain.Entities | ||
{ | ||
public partial class ServerEndpoints | ||
public sealed class ServerEndpoint | ||
{ | ||
public int Id { get; set; } | ||
public int ApplicationId { get; set; } | ||
public string DiscoveryUrl { get; set; } = null!; | ||
|
||
public Applications Application { get; set; } = null!; | ||
public Application Application { get; set; } = null!; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net7.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" /> | ||
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Gds.Server.Common" Version="1.4.372.76" /> | ||
</ItemGroup> | ||
|
||
</Project> |
18 changes: 18 additions & 0 deletions
18
GDSwithREST.Domain/Repositories/IApplicationNameRepository.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using GDSwithREST.Domain.Entities; | ||
using System; | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace GDSwithREST.Domain.Repositories | ||
{ | ||
public interface IApplicationNameRepository | ||
{ | ||
public Task<IEnumerable<ApplicationName>> GetAllApplicationNames(); | ||
public Task<IEnumerable<ApplicationName>> GetApplicationNamesByApplicationId(int id); | ||
public void RemoveApplicationNames(ApplicationName[] applicationNames); | ||
public ApplicationName AddApplicationName(ApplicationName applicationName); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using GDSwithREST.Domain.Entities; | ||
|
||
namespace GDSwithREST.Domain.Repositories | ||
{ | ||
public interface IApplicationRepository | ||
{ | ||
public Task<IEnumerable<Application>> GetAllApplications(); | ||
public Task<Application?> GetApplicationById(Guid id); | ||
public IQueryable<Application> GetApplicationsByUri(string ApplicationUri); | ||
public void RemoveApplication(Application application); | ||
public Application AddApplication(Application application); | ||
|
||
/// <summary> | ||
/// persists the changes made to an Application instance | ||
/// </summary> | ||
public void SaveChanges(); | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
GDSwithREST.Domain/Repositories/ICertificateRequestRepository.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using GDSwithREST.Domain.Entities; | ||
|
||
namespace GDSwithREST.Domain.Repositories | ||
{ | ||
public interface ICertificateRequestRepository | ||
{ | ||
public void RemoveCertificateRequests(CertificateRequest[] certificateRequests); | ||
|
||
public Task<CertificateRequest?> GetCertificateRequestById(Guid id); | ||
|
||
/// <summary> | ||
/// persists the changes made to an CeritificateRequest instance | ||
/// </summary> | ||
public void SaveChanges(); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
GDSwithREST.Domain/Repositories/ICertificateStoreRepository.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using GDSwithREST.Domain.Entities; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace GDSwithREST.Domain.Repositories | ||
{ | ||
public interface ICertificateStoreRepository | ||
{ | ||
public Task<CertificateStore?> GetCertificateStoreByPath(string path); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace GDSwithREST.Domain.Repositories | ||
{ | ||
public interface IPersistencyRepository | ||
{ | ||
public Task MigrateDatabaseAsync(); | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
GDSwithREST.Domain/Repositories/IServerEndpointRepository.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using GDSwithREST.Domain.Entities; | ||
using System; | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace GDSwithREST.Domain.Repositories | ||
{ | ||
public interface IServerEndpointRepository | ||
{ | ||
public Task<IEnumerable<ServerEndpoint>> GetAllServerEndpoints(); | ||
public Task<IEnumerable<ServerEndpoint>> GetServerEndpointsByApplicationId(int id); | ||
public void RemoveServerEndpoints(ServerEndpoint[] serverEndpoints); | ||
public ServerEndpoint AddServerEndpoint(ServerEndpoint serverEndpoint); | ||
} | ||
} |
Oops, something went wrong.