Documentation ¶
Index ¶
Constants ¶
View Source
const ( RpcErrorCode_FunctionIsNotImplemented = 1024 * 1 RpcErrorCode_Authorisation = 1024 * 2 RpcErrorCode_Permission = 1024 * 4 RpcErrorCode_Database = 1024 * 8 RpcErrorCode_RPCCall = 1024 * 16 RpcErrorCode_UidList = 1024 * 32 RpcErrorCode_Captcha = 1024 * 64 RpcErrorCode_Password = 1024 * 128 )
Codes.
View Source
const ( RpcErrorMsg_FunctionIsNotImplemented = "function is not implemented" RpcErrorMsg_Authorisation = "authorisation error" RpcErrorMsg_Permission = "permission error" RpcErrorMsg_Database = "database error" RpcErrorMsg_RPCCall = "RPC call error" RpcErrorMsgF_UidList = "UidList error: %s" // Template. RpcErrorMsg_Captcha = "captcha error" RpcErrorMsg_Password = "password error" )
Messages.
View Source
const ( DbErrorsChannelSize = 8 MustBeStoppedChannelSize = 2 HttpErrorsChannelSize = 8 DbReconnectCoolDownPeriodSec = 15 ServiceNextPingAttemptDelaySec = 5 ServicePingAttemptsCount = 12 )
View Source
const ( MsgOK = "OK" MsgUsingDefaultConfigurationFile = "Using the default configuration file" MsgServerIsStarting = "Server is starting ..." MsgHttpServer = "HTTP Server: " MsgHttpsServer = "HTTPS Server: " MsgRpcHttpServer = "RPC HTTP Server: " MsgImagesHttpServer = "Images HTTP Server: " MsgServerIsStopping = "Stopping the server ..." MsgServerIsStopped = "Server was stopped" MsgQuitSignalIsReceived = "Quit signal from OS has been received: " MsgHttpErrorListenerHasStopped = "HTTP error listener has stopped" MsgDbNetworkErrorListenerHasStopped = "DB network error listener has stopped" MsgEnterDatabasePassword = "Enter the database password:" MsgEnterSmtpPassword = "Enter the SMTP password:" MsgConnectingToDatabase = "Connecting to database ..." MsgReconnectingDatabase = "Reconnecting database ..." MsgReconnectionHasFailed = "Reconnection has failed: " MsgConnectionToDatabaseWasRestored = "Connection to database was restored" MsgSchedulerHasStopped = "Scheduler has stopped" MsgJunkCleanerHasStopped = "Junk cleaner has stopped" MsgIncidentManagerHasStopped = "Incident manager has stopped" MsgIncidentsTableIsEnabled = "Incidents table is enabled" MsgIncidentsTableIsDisabled = "Incidents table is disabled" MsgFirewallIsEnabled = "Firewall is enabled" MsgFirewallIsDisabled = "Firewall is disabled" MsgPingAttempt = "." )
Ordinary messages.
View Source
const ( MsgDatabaseNetworkError = "Database network error: " MsgServerError = "Server error: " MsgSystemSettingError = "Error in system setting" MsgSmtpSettingError = "Error in SMTP module setting" MsgMessageSettingError = "Error in message setting" MsgCaptchaServiceSettingError = "Error in captcha service setting" MsgCaptchaImageServerSettingError = "Error in captcha image server setting" MsgJwtSettingError = "Error in JWT setting" )
Error messages (simple).
View Source
const ( MsgFTableIsNotFound = "Table is not found: %s." MsgFInitialisingDatabaseTable = "Initialising database table: %s." MsgFPingingModule = "Pinging the %s module ..." MsgFModuleIsBroken = "%s module is broken" MsgFServiceClientSettingsError = "%s service client settings error: %s" )
Templates for messages and errors.
View Source
const (
ErrFDatabaseNetwork = "database network error: %v" // Template.
)
Variables ¶
This section is empty.
Functions ¶
func GetMapOfHttpStatusCodesByRpcErrorCodes ¶
Unique HTTP status codes used in the map: - 403 (Forbidden); - 404 (Not found); - 500 (Internal server error).
func IsNetworkError ¶
IsNetworkError checks if an error is a network error.
func MakeSymbolsNumbersAndCapitalLatinLetters ¶
func MakeSymbolsNumbersAndCapitalLatinLetters() (symbols []rune)
Types ¶
type ScheduledFnSimple ¶
type ScheduledFnSimple = func() error
Click to show internal directories.
Click to hide internal directories.