-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
namespaces: Move hardcoded strigs and values for cosistency
Signed-off-by: ZorEl212 <[email protected]>
- Loading branch information
Showing
3 changed files
with
70 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env python3 | ||
# -*- coding: utf-8 -*- | ||
|
||
# Strings | ||
# Strings used in the application | ||
|
||
# Namespaces - Common | ||
AUTH_FAILED_TIMEOUT = 'Authentication timeout' | ||
AUTH_REQUIRED = 'Authentication required' | ||
AUTH_INVALID_TOKEN = 'Invalid token' | ||
AUTH_MISSING_ID = 'Missing userId or serverId' | ||
AUTH_INVALID_DETAILS = 'Invalid server details' | ||
AUTH_MAX_RETRIES_EXCEEDED = 'Too many attempts, disconnecting...' | ||
DISCONNECTED = 'Disconnected' | ||
CONNECTED = 'Connected' | ||
AUTHENTICATED = 'Authenticated' | ||
|
||
|
||
# Exceptions | ||
EXC_INVALID_TOKEN = 'Token verification error' | ||
EXC_AUTH_ERROR = 'AuthenticationError' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env python3 | ||
# -*- coding: utf-8 -*- | ||
|
||
# Values | ||
|
||
# Namespaces - Common | ||
MAX_RETRIES = 3 | ||
AUTH_TIMEOUT = 30 | ||
|
||
AUTH_ERROR_TIMEOUT = 1005 | ||
AUTH_ERROR_INVALID_TOKEN = 1001 | ||
AUTH_ERROR_MISSING_ID = 1002 | ||
AUTH_ERROR_INVALID_DETAILS = 1003 | ||
AUTH_ERROR_MAX_RETRIES = 1004 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters