mirror of
https://github.com/ryzij/ServerMonitor.git
synced 2026-09-18 19:23:22 +00:00
Добавил сервис и контроллер для управления серверами
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
using MonitorPanel.Core.Models;
|
||||
|
||||
namespace MonitorPanel.Core.Abstractions;
|
||||
|
||||
public interface IServerService
|
||||
{
|
||||
Task<Guid> AddServerAsync(Server server, CancellationToken cancellationToken = default);
|
||||
Task<Guid> DeleteServerAsync(Guid id, CancellationToken cancellationToken = default);
|
||||
Task<IEnumerable<Server>> GetAllServersAsync(CancellationToken cancellationToken = default);
|
||||
Task<Server?> GetServerByIdAsync(Guid id, CancellationToken cancellationToken = default);
|
||||
Task<Guid> UpdateServerAsync(Guid id, string name, bool isHttps, string address, string? path, int port, CancellationToken cancellationToken = default);
|
||||
}
|
||||
@@ -3,9 +3,9 @@ namespace MonitorPanel.Core.Abstractions;
|
||||
|
||||
public interface IServersRepository
|
||||
{
|
||||
Task<IEnumerable<Server>> GetAllServersAsync();
|
||||
Task<Server?> GetServerByIdAsync(Guid id);
|
||||
Task<Guid> AddServerAsync(Server server);
|
||||
Task<Guid> UpdateServerAsync(Guid id, string name, bool isHttps, string address, string? path, int port);
|
||||
Task<Guid> DeleteServerAsync(Guid id);
|
||||
Task<IEnumerable<Server>> GetAllServersAsync(CancellationToken cancellationToken = default);
|
||||
Task<Server?> GetServerByIdAsync(Guid id, CancellationToken cancellationToken = default);
|
||||
Task<Guid> AddServerAsync(Server server, CancellationToken cancellationToken = default);
|
||||
Task<Guid> UpdateServerAsync(Guid id, string name, bool isHttps, string address, string? path, int port, CancellationToken cancellationToken = default);
|
||||
Task<Guid> DeleteServerAsync(Guid id, CancellationToken cancellationToken = default);
|
||||
}
|
||||
Reference in New Issue
Block a user