redis implemntations and api setup completed

This commit is contained in:
2025-01-25 20:59:47 +03:00
parent 32022ca521
commit 3d5a43220e
138 changed files with 2888 additions and 1117 deletions

View File

@@ -1,4 +1,4 @@
from AllConfigs import HostConfig
from ApiLayers.AllConfigs import HostConfig
class EmailConfig:

View File

@@ -1,4 +1,4 @@
from AllConfigs import HostConfig
from ApiLayers.AllConfigs import HostConfig
class MongoConfig:

View File

@@ -1,4 +1,4 @@
from AllConfigs import HostConfig
from ApiLayers.AllConfigs import HostConfig
class WagRedis:
@@ -16,14 +16,18 @@ class WagRedis:
db=WagRedis.REDIS_DB,
)
class RedisCategoryKeys:
REBUILD: str = "REBUILD"
ENDPOINT2CLASS: str = "ENDPOINT2CLASS"
LANGUAGE_MODELS: str = "LANGUAGE_MODELS"
VALIDATION_USER: str = "VALIDATION_USER"
CLUSTER_INDEX: str = "CLUSTER_INDEX"
CLUSTER_FUNCTION_CODES: str = "CLUSTER_FUNCTION_CODES"
METHOD_FUNCTION_CODES: str = "METHOD_FUNCTION_CODES"
MENU_FIRST_LAYER: str = "MENU_FIRST_LAYER"
PAGE_MAPPER: str = "PAGE_MAPPER"
MENU_MAPPER: str = "MENU_MAPPER"
AUTH: str = "AUTH"
OCC: str = "Occupant"
EMP: str = "Employee"
OCCUPANT: str = "OCCUPANT"
EMPLOYEE: str = "EMPLOYEE"

View File

@@ -1,4 +1,4 @@
from AllConfigs import HostConfig
from ApiLayers.AllConfigs import HostConfig
class WagDatabase:

View File

@@ -1,21 +1,6 @@
import datetime
class ApiStatic:
PLACEHOLDER = "https://s.tmimgcdn.com/scr/800x500/276800/building-home-nature-logo-vector-template-3_276851-original.jpg"
FORGOT_LINK = "https://www.evyos.com.tr/password/create?tokenUrl="
BLACKLIST_LINK = "https://www.evyos.com.tr/support/unknown-login-notice/"
APP_DIR = "/home/berkay/git-evyos/api-managment-backend/"
@classmethod
def forgot_link(cls, forgot_key):
return cls.FORGOT_LINK + forgot_key
@classmethod
def blacklist_login(cls, record_id):
return cls.BLACKLIST_LINK + record_id
class Auth:
ACCESS_EMAIL_EXT = "evyos.com.tr"
ACCESS_TOKEN_TAG = "evyos-session-key"
@@ -40,32 +25,3 @@ class Auth:
TOKEN_EXPIRE_DAY_5 = datetime.timedelta(days=5)
TOKEN_EXPIRE_DAY_15 = datetime.timedelta(days=15)
TOKEN_EXPIRE_DAY_30 = datetime.timedelta(days=30)
class Routers:
NO_TOKEN_REQUIRES = [
"/",
"/metrics",
"/openapi.json",
"/docs",
"/redoc",
"/auth/login",
"/favicon.ico",
"/docs/oauth2-redirect",
"/authentication/select",
"/authentication/login",
"/authentication/logout",
"/authentication/refresher",
"/authentication/refresh",
"/authentication/disconnect",
"/authentication/create_password",
"/authentication/reset_password",
"/authentication/forgot",
"/authentication/valid",
]
NO_EVENT_REQUIRES = [
"/access/endpoints/available",
"/access/endpoint/available",
"/validations/endpoint",
"/authentication/avatar",
]