Implemented v2.0 image import

This commit is contained in:
2024-12-08 13:25:44 +01:00
parent ebab0daf26
commit 121c2482f8
3 changed files with 152 additions and 3 deletions

View File

@@ -0,0 +1,48 @@
namespace MoonlightServers.ApiServer.Models.Stars;
public class LegacyImageImportModel
{
public string Name { get; set; } = "";
public string Author { get; set; } = "";
public string? UpdateUrl { get; set; }
public string? DonateUrl { get; set; }
public string StartupCommand { get; set; } = "";
public string OnlineDetection { get; set; } = "";
public string StopCommand { get; set; } = "";
public string InstallShell { get; set; } = "";
public string InstallDockerImage { get; set; } = "";
public string InstallScript { get; set; } = "";
public string ParseConfiguration { get; set; } = "[]";
public int AllocationsNeeded { get; set; } = 1;
public List<ImageVariable> Variables { get; set; } = new();
public int DefaultDockerImage { get; set; } = 0;
public bool AllowDockerImageChange { get; set; } = false;
public List<ImageDockerImage> DockerImages { get; set; } = new();
public class ImageVariable
{
public string Key { get; set; } = "";
public string DefaultValue { get; set; } = "";
public string DisplayName { get; set; } = "";
public string Description { get; set; } = "";
public bool AllowView { get; set; } = false;
public bool AllowEdit { get; set; } = false;
public string? Filter { get; set; }
}
public class ImageDockerImage // Weird name xd
{
public string DisplayName { get; set; } = "";
public string Name { get; set; } = "";
public bool AutoPull { get; set; }
}
}