Skip to content
This repository has been archived by the owner on Aug 1, 2022. It is now read-only.

Commit

Permalink
feat: add pm caching (#31)
Browse files Browse the repository at this point in the history
* feat: add pm caching

* feat: add app type enum、service type enum

* feat: update pm

* style: modify code specification

* feat: update pm client

Co-authored-by: yanpengju <[email protected]>
Co-authored-by: 阎鹏举 <阎鹏举@DESKTOP-28NV352>
  • Loading branch information
3 people authored Apr 7, 2022
1 parent 25a338d commit c53c400
Show file tree
Hide file tree
Showing 10 changed files with 104 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Masa.BuildingBlocks.sln
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Masa.BuildingBlocks.Configu
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Masa.BuildingBlocks.Ddd.Domain.Tests", "test\Masa.BuildingBlocks.Ddd.Domain.Tests\Masa.BuildingBlocks.Ddd.Domain.Tests.csproj", "{1FCBC928-0BD4-4BBC-BDFD-3C5BEB85D9DB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Masa.BuildingBlocks.BasicAbility.Pm", "src\BasicAbility\Masa.BuildingBlocks.BasicAbility.Pm\Masa.BuildingBlocks.BasicAbility.Pm.csproj", "{5692C8E2-7D58-4BB6-B20A-F6CD8C1A4217}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Masa.BuildingBlocks.Isolation", "src\Isolation\Masa.BuildingBlocks.Isolation\Masa.BuildingBlocks.Isolation.csproj", "{5E3CAD7F-B036-4CA0-9473-4CCA4F5AC5A8}"
EndProject
Global
Expand Down Expand Up @@ -120,6 +122,10 @@ Global
{5E3CAD7F-B036-4CA0-9473-4CCA4F5AC5A8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5E3CAD7F-B036-4CA0-9473-4CCA4F5AC5A8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5E3CAD7F-B036-4CA0-9473-4CCA4F5AC5A8}.Release|Any CPU.Build.0 = Release|Any CPU
{5692C8E2-7D58-4BB6-B20A-F6CD8C1A4217}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5692C8E2-7D58-4BB6-B20A-F6CD8C1A4217}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5692C8E2-7D58-4BB6-B20A-F6CD8C1A4217}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5692C8E2-7D58-4BB6-B20A-F6CD8C1A4217}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -150,6 +156,7 @@ Global
{F48B8455-B7A2-402C-8F88-16733A825EAF} = {6ED365E6-4A1A-499F-85FB-F22E865CA4BA}
{1FCBC928-0BD4-4BBC-BDFD-3C5BEB85D9DB} = {6ED365E6-4A1A-499F-85FB-F22E865CA4BA}
{5E3CAD7F-B036-4CA0-9473-4CCA4F5AC5A8} = {022D6FF5-4B65-4213-9A97-C69E2B2F99E1}
{5692C8E2-7D58-4BB6-B20A-F6CD8C1A4217} = {5DFAF4A2-ECB5-46E4-904D-1EA5F48B2D48}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {40383055-CC50-4600-AD9A-53C14F620D03}
Expand Down
14 changes: 14 additions & 0 deletions src/BasicAbility/Masa.BuildingBlocks.BasicAbility.Pm/IPmClient.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

namespace Masa.BuildingBlocks.BasicAbility.Pm
{
public interface IPmClient
{
public IEnvironmentService EnvironmentService { get; init; }

public IClusterService ClusterService { get; init; }

public IProjectService ProjectService { get; init; }

public IAppService AppService { get; init; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
namespace Masa.BuildingBlocks.BasicAbility.Pm.Model
{
public class AppModel
{
public int Id { get; set; }

public string Name { get; set; }

public string Identity { get; set; }

public int ProjectId { get; set; }

public AppModel(int id, string name, string identity, int projectId)
{
Id = id;
Name = name;
Identity = identity;
ProjectId = projectId;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
namespace Masa.BuildingBlocks.BasicAbility.Pm.Model
{
public class ProjectModel
{
public int Id { get; set; }

public string Identity { get; set; }

public string Name { get; set; }

public int LabelId { get; set; }

public Guid TeamId { get; set; }

public List<AppModel> Apps { get; set; } = new();

public ProjectModel(int id, string identity, string name, int labelId, Guid teamId)
{
Id = id;
Identity = identity;
Name = name;
LabelId = labelId;
TeamId = teamId;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace Masa.BuildingBlocks.BasicAbility.Pm.Service
{
public interface IAppService
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace Masa.BuildingBlocks.BasicAbility.Pm.Service
{
public interface IClusterService
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace Masa.BuildingBlocks.BasicAbility.Pm.Service
{
public interface IEnvironmentService
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace Masa.BuildingBlocks.BasicAbility.Pm.Service
{
public interface IProjectService
{
Task<List<ProjectModel>> GetProjectListAsync(string envName);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
global using Masa.BuildingBlocks.BasicAbility.Pm.Service;
global using Masa.BuildingBlocks.BasicAbility.Pm.Model;

0 comments on commit c53c400

Please sign in to comment.