Refactored project to module structure
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
namespace Moonlight.Shared.Admin.Sys.ContainerHelper;
|
||||
|
||||
public record ContainerHelperStatusDto(bool IsEnabled, bool IsReachable);
|
||||
@@ -0,0 +1,18 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Moonlight.Shared.Admin.Sys.ContainerHelper;
|
||||
|
||||
public struct RebuildEventDto
|
||||
{
|
||||
[JsonPropertyName("type")] public RebuildEventType Type { get; set; }
|
||||
|
||||
[JsonPropertyName("data")] public string Data { get; set; }
|
||||
}
|
||||
|
||||
public enum RebuildEventType
|
||||
{
|
||||
Log = 0,
|
||||
Failed = 1,
|
||||
Succeeded = 2,
|
||||
Step = 3
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
namespace Moonlight.Shared.Admin.Sys.ContainerHelper;
|
||||
|
||||
public class RequestRebuildDto
|
||||
{
|
||||
public RequestRebuildDto()
|
||||
{
|
||||
}
|
||||
|
||||
public RequestRebuildDto(bool noBuildCache)
|
||||
{
|
||||
NoBuildCache = noBuildCache;
|
||||
}
|
||||
|
||||
public bool NoBuildCache { get; set; }
|
||||
}
|
||||
10
Moonlight.Shared/Admin/Sys/ContainerHelper/SetVersionDto.cs
Normal file
10
Moonlight.Shared/Admin/Sys/ContainerHelper/SetVersionDto.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Moonlight.Shared.Admin.Sys.ContainerHelper;
|
||||
|
||||
public class SetVersionDto
|
||||
{
|
||||
[Required]
|
||||
[RegularExpression(@"^(?!\/|.*\/\/|.*\.\.|.*\/$)[A-Za-z0-9._/-]+$", ErrorMessage = "Invalid version format")]
|
||||
public string Version { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user