mirror of
https://github.com/techgarage-ir/MTWireGuard.git
synced 2025-08-30 06:39:27 +02:00
51 lines
2.4 KiB
C#
51 lines
2.4 KiB
C#
using MikrotikAPI.Models;
|
|
using MTWireGuard.Application.Models;
|
|
using MTWireGuard.Application.Models.Mikrotik;
|
|
|
|
namespace MTWireGuard.Application.Repositories
|
|
{
|
|
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);
|
|
Task<string> GetUserTunnelConfig(int id);
|
|
Task<string> GetQRCodeBase64(int id);
|
|
Task<MTInfoViewModel> GetInfo();
|
|
Task<IdentityViewModel> GetName();
|
|
Task<CreationResult> SetName(IdentityUpdateModel identity);
|
|
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);
|
|
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);
|
|
}
|
|
}
|