17 lines
419 B
Python
17 lines
419 B
Python
from dataclasses import dataclass
|
|
from dataclasses_json import dataclass_json
|
|
|
|
|
|
@dataclass_json
|
|
@dataclass
|
|
class BaseConnection:
|
|
code: str
|
|
|
|
def needs_wireguard_configuration(self):
|
|
return self.code == 'wireguard'
|
|
|
|
def is_session_connection(self):
|
|
return type(self).__name__ == 'SessionConnection'
|
|
|
|
def is_system_connection(self):
|
|
return type(self).__name__ == 'SystemConnection'
|