Started implementing server share backend. Redesigned server authorization for api calls. Refactored controller names for servers. Moved some responses to correct namespace
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
namespace MoonlightServers.Shared.Http.Responses.Client.Servers.Allocations;
|
||||
|
||||
public class AllocationDetailResponse
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string IpAddress { get; set; }
|
||||
public int Port { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using MoonlightServers.Shared.Http.Responses.Client.Servers.Allocations;
|
||||
|
||||
namespace MoonlightServers.Shared.Http.Responses.Client.Servers;
|
||||
|
||||
public class ServerDetailResponse
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
|
||||
public int Cpu { get; set; }
|
||||
public int Memory { get; set; }
|
||||
public int Disk { get; set; }
|
||||
|
||||
public string NodeName { get; set; }
|
||||
public string StarName { get; set; }
|
||||
|
||||
public AllocationDetailResponse[] Allocations { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
namespace MoonlightServers.Shared.Http.Responses.Client.Servers;
|
||||
|
||||
public class ServerLogsResponse
|
||||
{
|
||||
public string[] Messages { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
namespace MoonlightServers.Shared.Http.Responses.Client.Servers;
|
||||
|
||||
public class ServerStatsResponse
|
||||
{
|
||||
public double CpuUsage { get; set; }
|
||||
public ulong MemoryUsage { get; set; }
|
||||
public ulong NetworkRead { get; set; }
|
||||
public ulong NetworkWrite { get; set; }
|
||||
public ulong IoRead { get; set; }
|
||||
public ulong IoWrite { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
using MoonlightServers.Shared.Enums;
|
||||
|
||||
namespace MoonlightServers.Shared.Http.Responses.Client.Servers;
|
||||
|
||||
public class ServerStatusResponse
|
||||
{
|
||||
public ServerState State { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace MoonlightServers.Shared.Http.Responses.Client.Servers;
|
||||
|
||||
public class ServerWebSocketResponse
|
||||
{
|
||||
public string Target { get; set; }
|
||||
public string AccessToken { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace MoonlightServers.Shared.Http.Responses.Client.Servers.Shares;
|
||||
|
||||
public class ServerShareResponse
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string Email { get; set; }
|
||||
public string Permissions { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user