techgarage-ir.MTWireGuard/Application/Repositories/IMikrotikRepository.cs

52 lines
2.4 KiB
C#
Raw Normal View History

using MikrotikAPI.Models;
using MTWireGuard.Application.Models;
2023-06-02 15:26:29 +03:30
using MTWireGuard.Application.Models.Mikrotik;
2023-03-03 23:24:18 +03:30
2023-06-02 15:26:29 +03:30
namespace MTWireGuard.Application.Repositories
2023-03-03 23:24:18 +03:30
{
public interface IMikrotikRepository : IDisposable
{
Task<List<LogViewModel>> GetLogsAsync();
Task<List<WGServerViewModel>> GetServersAsync();
Task<WGServerViewModel> GetServer(string Name);
Task<List<ServerTrafficViewModel>> GetServersTraffic();
Task<List<WGPeerViewModel>> GetUsersAsync();
Task<WGPeerViewModel> GetUser(int id);
Task<string> GetUserHandshake(string id);
2023-03-03 23:24:18 +03:30
Task<string> GetUserTunnelConfig(int id);
Task<string> GetQRCodeBase64(int id);
Task<MTInfoViewModel> GetInfo();
Task<IdentityViewModel> GetName();
Task<CreationResult> SetName(IdentityUpdateModel identity);
2023-03-03 23:24:18 +03:30
Task<bool> TryConnectAsync();
Task<List<ActiveUserViewModel>> GetActiveSessions();
Task<List<JobViewModel>> GetJobs();
Task<string> GetCurrentSessionID();
Task<string> KillJob(string JobID);
Task<List<ScriptViewModel>> GetScripts();
Task<CreationResult> CreateScript(Models.Mikrotik.ScriptCreateModel script);
Task<string> RunScript(string name);
Task<List<SchedulerViewModel>> GetSchedulers();
Task<CreationResult> CreateScheduler(Models.Mikrotik.SchedulerCreateModel scheduler);
2023-03-03 23:24:18 +03:30
Task<CreationResult> CreateServer(ServerCreateModel server);
Task<CreationResult> CreateUser(UserCreateModel peer);
Task<CreationResult> SyncUser(UserSyncModel user);
Task<CreationResult> UpdateUser(UserUpdateModel user);
Task<CreationResult> UpdateServer(ServerUpdateModel server);
Task<CreationResult> EnableServer(int id);
Task<CreationResult> DisableServer(int id);
Task<CreationResult> EnableUser(int id);
Task<CreationResult> DisableUser(int id);
Task<CreationResult> DeleteServer(int id);
Task<CreationResult> DeleteUser(int id);
Task<MikrotikAPI.Models.DNS> GetDNS();
Task<CreationResult> SetDNS(DNSUpdateModel dns);
Task<List<IPPoolViewModel>> GetIPPools();
Task<CreationResult> CreateIPPool(PoolCreateModel ipPool);
Task<CreationResult> UpdateIPPool(PoolUpdateModel ipPool);
Task<CreationResult> DeleteIPPool(int id);
Task<List<IPAddressViewModel>> GetIPAddresses();
Task<List<IPAddressViewModel>> GetServerIP(string Name);
2023-03-03 23:24:18 +03:30
}
}