Skip to content

Commit c149fae

Browse files
feature: this commit introduces a new boundary responsible for orchestration, migrating the organization and repository to a monorepo structure
1 parent 639d6a0 commit c149fae

138 files changed

Lines changed: 4577 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
**/.vs
2+
**/.git
3+
4+
**/bin
5+
**/obj
6+
**/.vscode
7+
**/TestResults
8+
9+
*.user
10+
*.suo
11+
*.userosscache
12+
*.sln.docstates
13+
14+
**/appsettings.json
15+
**/appsettings.*.json
16+
17+
Dockerfile
18+
README.md
19+
LICENSE
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# the credentials presented here are false
2+
# copy this file to .env and update the values as needed
3+
4+
MONGO_INITDB_ROOT_USERNAME=admin
5+
MONGO_INITDB_ROOT_PASSWORD=admin
6+
7+
MONGO_CONNECTIONSTRING=mongodb://admin:admin@vinder.comanda.orchestrator.infrastructure.mongo.database:27017/comanda?authSource=admin
8+
MONGO_DATABASENAME=comanda
9+
10+
SEQ_FIRSTRUN_ADMINPASSWORD=admin
11+
12+
ADMIN_USERNAME=admin
13+
ADMIN_PASSWORD=admin
14+
15+
FEDERATION_BASEURL=http://vinder.comanda.infrastructure.federation:5000
16+
FEDERATION_TENANT=comanda
17+
18+
FEDERATION_CLIENT_ID=72c1c5bc-4ac0-40a9-9ca4-5b271b93cfcd
19+
FEDERATION_CLIENT_SECRET=f79bf76a-f814-4a96-95e0-0dd6a83cd162
20+
21+
ABACATEPAY_URL=https://api.abacatepay.com/v1/
22+
STRIPE_SECRET=sk_test_wiZMUOTSEWvpigHlfRBmWOGz4RLDrAZt
23+
24+
ADMIN_USERNAME=admin
25+
ADMIN_PASSWORD=admin
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.0.31903.59
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Source", "Source", "{B8EFCA5F-814F-285C-A8CB-F00F14650265}"
7+
EndProject
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Comanda.Orchestrator.Application", "Source\Comanda.Orchestrator.Application\Comanda.Orchestrator.Application.csproj", "{5B4760C0-F3BD-4837-8D1B-19E59A13BDDF}"
9+
EndProject
10+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Comanda.Orchestrator.Infrastructure", "Source\Comanda.Orchestrator.Infrastructure\Comanda.Orchestrator.Infrastructure.csproj", "{31C332BD-1EA3-4A7B-B737-BCB46C78AFF3}"
11+
EndProject
12+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Comanda.Orchestrator.Infrastructure.IoC", "Source\Comanda.Orchestrator.Infrastructure.IoC\Comanda.Orchestrator.Infrastructure.IoC.csproj", "{329A734D-2607-40FD-9ED2-3BF7ABEC2A14}"
13+
EndProject
14+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Comanda.Orchestrator.WebApi", "Source\Comanda.Orchestrator.WebApi\Comanda.Orchestrator.WebApi.csproj", "{37A746D8-CD9D-449A-AB1B-2C02F5366694}"
15+
EndProject
16+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Comanda.Orchestrator.CrossCutting", "Source\Comanda.Orchestrator.CrossCutting\Comanda.Orchestrator.CrossCutting.csproj", "{F218FF09-497E-4E48-A960-2BE2A0FD38F1}"
17+
EndProject
18+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{0AB3BF05-4346-4AA6-1389-037BE0695223}"
19+
EndProject
20+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Comanda.Orchestrator.TestSuite", "Tests\Comanda.Orchestrator.TestSuite.csproj", "{8434AF6E-FEDA-4692-A448-720429C00800}"
21+
EndProject
22+
Global
23+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
24+
Debug|Any CPU = Debug|Any CPU
25+
Debug|x64 = Debug|x64
26+
Debug|x86 = Debug|x86
27+
Release|Any CPU = Release|Any CPU
28+
Release|x64 = Release|x64
29+
Release|x86 = Release|x86
30+
EndGlobalSection
31+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
32+
{5B4760C0-F3BD-4837-8D1B-19E59A13BDDF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
33+
{5B4760C0-F3BD-4837-8D1B-19E59A13BDDF}.Debug|Any CPU.Build.0 = Debug|Any CPU
34+
{5B4760C0-F3BD-4837-8D1B-19E59A13BDDF}.Debug|x64.ActiveCfg = Debug|Any CPU
35+
{5B4760C0-F3BD-4837-8D1B-19E59A13BDDF}.Debug|x64.Build.0 = Debug|Any CPU
36+
{5B4760C0-F3BD-4837-8D1B-19E59A13BDDF}.Debug|x86.ActiveCfg = Debug|Any CPU
37+
{5B4760C0-F3BD-4837-8D1B-19E59A13BDDF}.Debug|x86.Build.0 = Debug|Any CPU
38+
{5B4760C0-F3BD-4837-8D1B-19E59A13BDDF}.Release|Any CPU.ActiveCfg = Release|Any CPU
39+
{5B4760C0-F3BD-4837-8D1B-19E59A13BDDF}.Release|Any CPU.Build.0 = Release|Any CPU
40+
{5B4760C0-F3BD-4837-8D1B-19E59A13BDDF}.Release|x64.ActiveCfg = Release|Any CPU
41+
{5B4760C0-F3BD-4837-8D1B-19E59A13BDDF}.Release|x64.Build.0 = Release|Any CPU
42+
{5B4760C0-F3BD-4837-8D1B-19E59A13BDDF}.Release|x86.ActiveCfg = Release|Any CPU
43+
{5B4760C0-F3BD-4837-8D1B-19E59A13BDDF}.Release|x86.Build.0 = Release|Any CPU
44+
{31C332BD-1EA3-4A7B-B737-BCB46C78AFF3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
45+
{31C332BD-1EA3-4A7B-B737-BCB46C78AFF3}.Debug|Any CPU.Build.0 = Debug|Any CPU
46+
{31C332BD-1EA3-4A7B-B737-BCB46C78AFF3}.Debug|x64.ActiveCfg = Debug|Any CPU
47+
{31C332BD-1EA3-4A7B-B737-BCB46C78AFF3}.Debug|x64.Build.0 = Debug|Any CPU
48+
{31C332BD-1EA3-4A7B-B737-BCB46C78AFF3}.Debug|x86.ActiveCfg = Debug|Any CPU
49+
{31C332BD-1EA3-4A7B-B737-BCB46C78AFF3}.Debug|x86.Build.0 = Debug|Any CPU
50+
{31C332BD-1EA3-4A7B-B737-BCB46C78AFF3}.Release|Any CPU.ActiveCfg = Release|Any CPU
51+
{31C332BD-1EA3-4A7B-B737-BCB46C78AFF3}.Release|Any CPU.Build.0 = Release|Any CPU
52+
{31C332BD-1EA3-4A7B-B737-BCB46C78AFF3}.Release|x64.ActiveCfg = Release|Any CPU
53+
{31C332BD-1EA3-4A7B-B737-BCB46C78AFF3}.Release|x64.Build.0 = Release|Any CPU
54+
{31C332BD-1EA3-4A7B-B737-BCB46C78AFF3}.Release|x86.ActiveCfg = Release|Any CPU
55+
{31C332BD-1EA3-4A7B-B737-BCB46C78AFF3}.Release|x86.Build.0 = Release|Any CPU
56+
{329A734D-2607-40FD-9ED2-3BF7ABEC2A14}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
57+
{329A734D-2607-40FD-9ED2-3BF7ABEC2A14}.Debug|Any CPU.Build.0 = Debug|Any CPU
58+
{329A734D-2607-40FD-9ED2-3BF7ABEC2A14}.Debug|x64.ActiveCfg = Debug|Any CPU
59+
{329A734D-2607-40FD-9ED2-3BF7ABEC2A14}.Debug|x64.Build.0 = Debug|Any CPU
60+
{329A734D-2607-40FD-9ED2-3BF7ABEC2A14}.Debug|x86.ActiveCfg = Debug|Any CPU
61+
{329A734D-2607-40FD-9ED2-3BF7ABEC2A14}.Debug|x86.Build.0 = Debug|Any CPU
62+
{329A734D-2607-40FD-9ED2-3BF7ABEC2A14}.Release|Any CPU.ActiveCfg = Release|Any CPU
63+
{329A734D-2607-40FD-9ED2-3BF7ABEC2A14}.Release|Any CPU.Build.0 = Release|Any CPU
64+
{329A734D-2607-40FD-9ED2-3BF7ABEC2A14}.Release|x64.ActiveCfg = Release|Any CPU
65+
{329A734D-2607-40FD-9ED2-3BF7ABEC2A14}.Release|x64.Build.0 = Release|Any CPU
66+
{329A734D-2607-40FD-9ED2-3BF7ABEC2A14}.Release|x86.ActiveCfg = Release|Any CPU
67+
{329A734D-2607-40FD-9ED2-3BF7ABEC2A14}.Release|x86.Build.0 = Release|Any CPU
68+
{37A746D8-CD9D-449A-AB1B-2C02F5366694}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
69+
{37A746D8-CD9D-449A-AB1B-2C02F5366694}.Debug|Any CPU.Build.0 = Debug|Any CPU
70+
{37A746D8-CD9D-449A-AB1B-2C02F5366694}.Debug|x64.ActiveCfg = Debug|Any CPU
71+
{37A746D8-CD9D-449A-AB1B-2C02F5366694}.Debug|x64.Build.0 = Debug|Any CPU
72+
{37A746D8-CD9D-449A-AB1B-2C02F5366694}.Debug|x86.ActiveCfg = Debug|Any CPU
73+
{37A746D8-CD9D-449A-AB1B-2C02F5366694}.Debug|x86.Build.0 = Debug|Any CPU
74+
{37A746D8-CD9D-449A-AB1B-2C02F5366694}.Release|Any CPU.ActiveCfg = Release|Any CPU
75+
{37A746D8-CD9D-449A-AB1B-2C02F5366694}.Release|Any CPU.Build.0 = Release|Any CPU
76+
{37A746D8-CD9D-449A-AB1B-2C02F5366694}.Release|x64.ActiveCfg = Release|Any CPU
77+
{37A746D8-CD9D-449A-AB1B-2C02F5366694}.Release|x64.Build.0 = Release|Any CPU
78+
{37A746D8-CD9D-449A-AB1B-2C02F5366694}.Release|x86.ActiveCfg = Release|Any CPU
79+
{37A746D8-CD9D-449A-AB1B-2C02F5366694}.Release|x86.Build.0 = Release|Any CPU
80+
{F218FF09-497E-4E48-A960-2BE2A0FD38F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
81+
{F218FF09-497E-4E48-A960-2BE2A0FD38F1}.Debug|Any CPU.Build.0 = Debug|Any CPU
82+
{F218FF09-497E-4E48-A960-2BE2A0FD38F1}.Debug|x64.ActiveCfg = Debug|Any CPU
83+
{F218FF09-497E-4E48-A960-2BE2A0FD38F1}.Debug|x64.Build.0 = Debug|Any CPU
84+
{F218FF09-497E-4E48-A960-2BE2A0FD38F1}.Debug|x86.ActiveCfg = Debug|Any CPU
85+
{F218FF09-497E-4E48-A960-2BE2A0FD38F1}.Debug|x86.Build.0 = Debug|Any CPU
86+
{F218FF09-497E-4E48-A960-2BE2A0FD38F1}.Release|Any CPU.ActiveCfg = Release|Any CPU
87+
{F218FF09-497E-4E48-A960-2BE2A0FD38F1}.Release|Any CPU.Build.0 = Release|Any CPU
88+
{F218FF09-497E-4E48-A960-2BE2A0FD38F1}.Release|x64.ActiveCfg = Release|Any CPU
89+
{F218FF09-497E-4E48-A960-2BE2A0FD38F1}.Release|x64.Build.0 = Release|Any CPU
90+
{F218FF09-497E-4E48-A960-2BE2A0FD38F1}.Release|x86.ActiveCfg = Release|Any CPU
91+
{F218FF09-497E-4E48-A960-2BE2A0FD38F1}.Release|x86.Build.0 = Release|Any CPU
92+
{8434AF6E-FEDA-4692-A448-720429C00800}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
93+
{8434AF6E-FEDA-4692-A448-720429C00800}.Debug|Any CPU.Build.0 = Debug|Any CPU
94+
{8434AF6E-FEDA-4692-A448-720429C00800}.Debug|x64.ActiveCfg = Debug|Any CPU
95+
{8434AF6E-FEDA-4692-A448-720429C00800}.Debug|x64.Build.0 = Debug|Any CPU
96+
{8434AF6E-FEDA-4692-A448-720429C00800}.Debug|x86.ActiveCfg = Debug|Any CPU
97+
{8434AF6E-FEDA-4692-A448-720429C00800}.Debug|x86.Build.0 = Debug|Any CPU
98+
{8434AF6E-FEDA-4692-A448-720429C00800}.Release|Any CPU.ActiveCfg = Release|Any CPU
99+
{8434AF6E-FEDA-4692-A448-720429C00800}.Release|Any CPU.Build.0 = Release|Any CPU
100+
{8434AF6E-FEDA-4692-A448-720429C00800}.Release|x64.ActiveCfg = Release|Any CPU
101+
{8434AF6E-FEDA-4692-A448-720429C00800}.Release|x64.Build.0 = Release|Any CPU
102+
{8434AF6E-FEDA-4692-A448-720429C00800}.Release|x86.ActiveCfg = Release|Any CPU
103+
{8434AF6E-FEDA-4692-A448-720429C00800}.Release|x86.Build.0 = Release|Any CPU
104+
EndGlobalSection
105+
GlobalSection(SolutionProperties) = preSolution
106+
HideSolutionNode = FALSE
107+
EndGlobalSection
108+
GlobalSection(NestedProjects) = preSolution
109+
{5B4760C0-F3BD-4837-8D1B-19E59A13BDDF} = {B8EFCA5F-814F-285C-A8CB-F00F14650265}
110+
{31C332BD-1EA3-4A7B-B737-BCB46C78AFF3} = {B8EFCA5F-814F-285C-A8CB-F00F14650265}
111+
{329A734D-2607-40FD-9ED2-3BF7ABEC2A14} = {B8EFCA5F-814F-285C-A8CB-F00F14650265}
112+
{37A746D8-CD9D-449A-AB1B-2C02F5366694} = {B8EFCA5F-814F-285C-A8CB-F00F14650265}
113+
{F218FF09-497E-4E48-A960-2BE2A0FD38F1} = {B8EFCA5F-814F-285C-A8CB-F00F14650265}
114+
{8434AF6E-FEDA-4692-A448-720429C00800} = {0AB3BF05-4346-4AA6-1389-037BE0695223}
115+
EndGlobalSection
116+
EndGlobal
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# use ASP.NET Core 9.0 runtime image as base
2+
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
3+
WORKDIR /app
4+
EXPOSE 8085
5+
6+
# use SDK image for build
7+
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
8+
WORKDIR /src
9+
10+
# copy project files to restore dependencies
11+
COPY ["Source/Comanda.Orchestrator.WebApi/Comanda.Orchestrator.WebApi.csproj", "Comanda.Orchestrator.WebApi/"]
12+
13+
# copy the entire solution 'n related projects
14+
COPY ["Comanda.Orchestrator.sln", "./"]
15+
16+
# restore dependencies for the project
17+
RUN dotnet restore "Comanda.Orchestrator.WebApi/Comanda.Orchestrator.WebApi.csproj"
18+
19+
# copy all source code into the container
20+
COPY Source/ ./Source/
21+
22+
# set working directory to the web project
23+
WORKDIR "/src/Source/Comanda.Orchestrator.WebApi"
24+
25+
# build in Release mode
26+
RUN dotnet build "Comanda.Orchestrator.WebApi.csproj" -c Release -o /app/build
27+
28+
# publish the project for production
29+
FROM build AS publish
30+
RUN dotnet publish "Comanda.Orchestrator.WebApi.csproj" -c Release -o /app/publish /p:UseAppHost=false
31+
32+
# final image to run the app
33+
FROM base AS final
34+
WORKDIR /app
35+
36+
# copy published files from the publish stage
37+
COPY --from=publish /app/publish .
38+
39+
# set the command to start the application
40+
ENTRYPOINT ["dotnet", "Comanda.Orchestrator.WebApi.dll"]
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Comanda.Orchestrator - Overview
2+
3+
O projeto **Comanda.Orchestrator** atua como um BFF (Backend For Frontend) e também incorpora características de um API Gateway. Sua principal responsabilidade é orquestrar chamadas entre diferentes serviços e APIs do sistema **Comanda**, centralizando o acesso e simplificando a comunicação entre o frontend e os diversos backends.
4+
5+
## Principais Responsabilidades
6+
- **Orquestração de Chamadas:** Centraliza e coordena as requisições entre múltiplos serviços, reunindo dados e respostas para o frontend de forma eficiente.
7+
8+
- **API Gateway:** Expõe endpoints unificados para o frontend, abstraindo a complexidade dos serviços internos e facilitando a integração.
9+
10+
- **Aplicação de Patterns de Resiliência:** Implementa padrões de resiliência, como circuit breaker, retry, timeout e fallback, garantindo maior robustez e disponibilidade. Esses padrões podem ser observados, por exemplo, nos gateways implementados na camada de infraestrutura.
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Padrões de Código - Comanda.Orchestrator
2+
3+
Este documento define os principais padrões e convenções que devem ser seguidos na codebase do Comanda.Orchestrator. O objetivo é garantir consistência, legibilidade e robustez em todo o projeto.
4+
5+
---
6+
7+
## 1. Pattern Matching com Switch nos Controllers
8+
9+
Sempre utilize pattern matching com `switch` para tratar os retornos dos handlers nos controllers. Isso garante padronização no tratamento de respostas e facilita a manutenção.
10+
11+
**Exemplo:**
12+
```csharp
13+
return result switch
14+
{
15+
{ IsSuccess: true } when result.Data is not null =>
16+
StatusCode(StatusCodes.Status200OK, result.Data),
17+
18+
{ IsFailure: true } when result.Error == AbacatePayErrors.OperationFailed =>
19+
StatusCode(StatusCodes.Status502BadGateway, result.Error),
20+
21+
{ IsFailure: true } when result.Error == CommonErrors.OperationFailed =>
22+
StatusCode(StatusCodes.Status500InternalServerError, result.Error),
23+
24+
{ IsFailure: true } when result.Error == CommonErrors.RateLimitExceeded =>
25+
StatusCode(StatusCodes.Status429TooManyRequests, result.Error)
26+
};
27+
```
28+
> **Importante:** Não utilize `if/else` ou `try/catch` para tratar retornos de handlers nos controllers. Sempre siga o padrão acima.
29+
30+
---
31+
32+
## 2. Encapsulamento de Clients via Gateways
33+
34+
Todo client HTTP/externo deve ser encapsulado por um Gateway.
35+
36+
- **Gateway:** Classe responsável por isolar a comunicação com sistemas externos, aplicar patterns de resiliência e expor métodos claros para uso interno.
37+
- Nunca consuma APIs externas diretamente em handlers ou services.
38+
---
39+
40+
## 3. Patterns de Resiliência com Polly
41+
42+
Toda chamada externa (via Gateway) deve obrigatoriamente aplicar patterns de resiliência usando Polly:
43+
44+
- Retry
45+
- Circuit Breaker
46+
- Timeout
47+
- Fallback
48+
49+
---
50+
51+
## 4. Early Return / Fail Fast
52+
53+
Prefira sempre o uso de early return/fail fast para simplificar o fluxo dos métodos e evitar aninhamentos desnecessários. Isso torna o código mais limpo e fácil de entender.
54+
55+
**Exemplo:**
56+
```csharp
57+
if (!request.IsValid)
58+
return BadRequest("Dados inválidos");
59+
60+
// lógica principal aqui
61+
```
62+
63+
---
64+
65+
> **Siga estes padrões para garantir qualidade, previsibilidade e robustez em toda a codebase do Comanda.Orchestrator.**
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net9.0</TargetFramework>
5+
<ImplicitUsings>enable</ImplicitUsings>
6+
<Nullable>enable</Nullable>
7+
</PropertyGroup>
8+
9+
<ItemGroup>
10+
<PackageReference Include="FluentValidation" Version="12.1.1" />
11+
<PackageReference Include="HttpsRichardy.Dispatcher" Version="1.0.2" />
12+
<PackageReference Include="HttpsRichardy.Federation.Sdk.Contracts" Version="1.0.2" />
13+
<PackageReference Include="Comanda.Internal.Contracts" Version="1.0.1" />
14+
</ItemGroup>
15+
16+
<ItemGroup>
17+
<ProjectReference Include="..\Comanda.Orchestrator.CrossCutting\Comanda.Orchestrator.CrossCutting.csproj" />
18+
</ItemGroup>
19+
20+
</Project>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
namespace Comanda.Orchestrator.Application.Gateways;
2+
3+
public interface ICredentialsGateway
4+
{
5+
public Task<Result<IReadOnlyCollection<CredentialScheme>>> GetCredentialsAsync(
6+
CredentialsFetchParameters parameters,
7+
CancellationToken cancellation = default
8+
);
9+
10+
public Task<Result<CredentialScheme>> AssignIntegrationCredentialAsync(
11+
CredentialCreationScheme parameters,
12+
CancellationToken cancellation = default
13+
);
14+
15+
public Task<Result<CredentialScheme>> UpdateCredentialAsync(
16+
CredentialModificationScheme parameters,
17+
CancellationToken cancellation = default
18+
);
19+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
namespace Comanda.Orchestrator.Application.Gateways;
2+
3+
public interface IEstablishmentGateway
4+
{
5+
public Task<Result<PaginationScheme<EstablishmentScheme>>> GetEstablishmentsAsync(
6+
EstablishmentsFetchParameters parameters,
7+
CancellationToken cancellation = default
8+
);
9+
10+
public Task<Result<EstablishmentScheme>> CreateEstablishmentAsync(
11+
EstablishmentCreationScheme parameters,
12+
CancellationToken cancellation = default
13+
);
14+
15+
public Task<Result<EstablishmentScheme>> UpdateEstablishmentAsync(
16+
EstablishmentModificationScheme parameters,
17+
CancellationToken cancellation = default
18+
);
19+
20+
public Task<Result> DeleteEstablishmentAsync(
21+
EstablishmentDeletionScheme parameters,
22+
CancellationToken cancellation = default
23+
);
24+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
namespace Comanda.Orchestrator.Application.Gateways;
2+
3+
public interface IOrdersGateway
4+
{
5+
public Task<Result<PaginationScheme<OrderScheme>>> GetOrdersAsync(
6+
OrdersFetchParameters parameters,
7+
CancellationToken cancellation = default
8+
);
9+
10+
public Task<Result<OrderScheme>> CreateOrderAsync(
11+
OrderCreationScheme parameters,
12+
CancellationToken cancellation = default
13+
);
14+
15+
public Task<Result<OrderScheme>> UpdateOrderAsync(
16+
OrderModificationScheme parameters,
17+
CancellationToken cancellation = default
18+
);
19+
}

0 commit comments

Comments
 (0)