-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathproviders.py
62 lines (46 loc) · 1.03 KB
/
providers.py
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
58
59
60
61
62
import abc
from entities import Session, GeneratedWindow
class GeneratedWindowProvider:
"""
"""
@abc.abstractmethod
def get(self, name, session_id) -> GeneratedWindow:
"""
:param name:
:param session_id:
:return GeneratedWindow:
"""
pass
@abc.abstractmethod
def save(self, window: GeneratedWindow) -> None:
"""
:param window:
:return: None
"""
pass
class SessionProvider:
"""
Represents the session manager for lottus session
"""
@abc.abstractmethod
def get(self, identifier, phone) -> Session:
"""
:param identifier:
:param phone:
:return: Session
"""
pass
@abc.abstractmethod
def save(self, session: Session) -> None:
"""
:param session:
:return:
"""
pass
@abc.abstractmethod
def finish(self, session: Session) -> None:
"""
:param session:
:return:
"""
pass