Implemented node crud and status health check. Added daemon status health endpoint. Refactored project structure. Added sidebar items and ui views
This commit is contained in:
6
MoonlightServers.DaemonShared/Http/Daemon/HealthDto.cs
Normal file
6
MoonlightServers.DaemonShared/Http/Daemon/HealthDto.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
namespace MoonlightServers.DaemonShared.Http.Daemon;
|
||||
|
||||
public class HealthDto
|
||||
{
|
||||
public int RemoteStatusCode { get; set; }
|
||||
}
|
||||
14
MoonlightServers.DaemonShared/Http/ProblemDetails.cs
Normal file
14
MoonlightServers.DaemonShared/Http/ProblemDetails.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
namespace MoonlightServers.DaemonShared.Http;
|
||||
|
||||
public class ProblemDetails
|
||||
{
|
||||
public string Type { get; set; }
|
||||
|
||||
public string Title { get; set; }
|
||||
|
||||
public int Status { get; set; }
|
||||
|
||||
public string? Detail { get; set; }
|
||||
|
||||
public Dictionary<string, string[]>? Errors { get; set; }
|
||||
}
|
||||
14
MoonlightServers.DaemonShared/Http/SerializationContext.cs
Normal file
14
MoonlightServers.DaemonShared/Http/SerializationContext.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using MoonlightServers.DaemonShared.Http.Daemon;
|
||||
|
||||
namespace MoonlightServers.DaemonShared.Http;
|
||||
|
||||
[JsonSerializable(typeof(HealthDto))]
|
||||
[JsonSerializable(typeof(ProblemDetails))]
|
||||
|
||||
[JsonSourceGenerationOptions(JsonSerializerDefaults.Web)]
|
||||
public partial class SerializationContext : JsonSerializerContext
|
||||
{
|
||||
|
||||
}
|
||||
@@ -6,4 +6,8 @@
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Http\Panel\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user