forked from mmdzov/luIP-marzban
-
Notifications
You must be signed in to change notification settings - Fork 0
/
interface.js
57 lines (44 loc) · 1.26 KB
/
interface.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
class DBInterface {
read(email) {
throw new Error("This method must be implemented in the class");
}
readAll() {
throw new Error("This method must be implemented in the class");
}
deleteUser(email) {
throw new Error("This method must be implemented in the class");
}
deleteIp(email, ip) {
throw new Error("This method must be implemented in the class");
}
addUser(data) {
throw new Error("This method must be implemented in the class");
}
addIp(email, ip) {
throw new Error("This method must be implemented in the class");
}
deleteInactiveUsers() {
throw new Error("This method must be implemented in the class");
}
deleteLastIp(email) {
throw new Error("This method must be implemented in the class");
}
}
class LuIPInterface {
ban() {
throw new Error("This method must be implemented in the class");
}
unban() {
throw new Error("This method must be implemented in the class");
}
setUser() {
throw new Error("This method must be implemented in the class");
}
unsetUser() {
throw new Error("This method must be implemented in the class");
}
clear() {
throw new Error("This method must be implemented in the class");
}
}
module.exports = { DBInterface, LuIPInterface };