Documentation ¶
Index ¶
- Constants
- func GetMapOfHttpStatusCodesByRpcErrorCodes() map[int]int
- type Server
- func (srv *Server) ApproveAndRegisterUser(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) BanUser(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) ChangeEmail(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) ChangePassword(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) GetListOfAllUsers(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) GetListOfAllUsersOnPage(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) GetListOfLoggedUsers(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) GetListOfLoggedUsersOnPage(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) GetListOfRegistrationsReadyForApproval(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) GetListenDsn() (dsn string)
- func (srv *Server) GetMustStopAB() *atomic.Bool
- func (srv *Server) GetSelfRoles(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) GetStopChannel() *chan bool
- func (srv *Server) GetSubRoutinesWG() *sync.WaitGroup
- func (srv *Server) GetUserName(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) GetUserRoles(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) GetUserSession(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) IsUserLoggedIn(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) LogUserIn(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) LogUserOut(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) LogUserOutA(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) Ping(_ *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) RegisterUser(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) RejectRegistrationRequest(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) ReportStart()
- func (srv *Server) SetUserRoleAuthor(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) SetUserRoleReader(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) SetUserRoleWriter(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) ShowDiagnosticData(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) Start() (err error)
- func (srv *Server) Stop() (err error)
- func (srv *Server) Test(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) UnbanUser(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) UseConstructor(stn base.ISettings) (base.IServer, error)
- func (srv *Server) ViewUserParameters(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
Constants ¶
View Source
const ( RpcErrorCode_AuthChallengeResponseIsNotSet = 1 RpcErrorCode_BPP_GenerateRandomSalt = 2 RpcErrorCode_BPP_PackSymbols = 3 RpcErrorCode_CaptchaAnswerIsNotSet = 4 RpcErrorCode_CaptchaAnswerIsWrong = 5 RpcErrorCode_EmailAddressIsNotValid = 6 RpcErrorCode_EmailAddressIsUsed = 7 RpcErrorCode_EmailChangeIsNotFound = 8 RpcErrorCode_JWTCreation = 9 RpcErrorCode_NameIsNotSet = 10 RpcErrorCode_NameIsTooLong = 11 RpcErrorCode_NameIsUsed = 12 RpcErrorCode_NewPasswordIsNotSet = 13 RpcErrorCode_NewEmailIsNotSet = 14 RpcErrorCode_PasswordChangeIsNotFound = 15 RpcErrorCode_PasswordIsNotValid = 16 RpcErrorCode_PasswordIsNotSet = 17 RpcErrorCode_PasswordIsTooLong = 18 RpcErrorCode_PasswordIsWrong = 19 RpcErrorCode_RequestIdGenerator = 20 RpcErrorCode_RequestIdIsNotSet = 21 RpcErrorCode_SmtpModule = 22 RpcErrorCode_StepIsUnknown = 23 RpcErrorCode_UserAlreadyStartedToChangePassword = 24 RpcErrorCode_UserAlreadyStartedToChangeEmail = 25 RpcErrorCode_UserCanNotLogIn = 26 RpcErrorCode_UserHasAlreadyStartedToLogIn = 27 RpcErrorCode_UserHasNotStartedToLogIn = 28 RpcErrorCode_UserIdIsNotSet = 29 RpcErrorCode_UserIsAlreadyLoggedIn = 30 RpcErrorCode_UserIsNotFound = 31 RpcErrorCode_UserPreSessionIsNotFound = 32 RpcErrorCode_VerificationCodeGenerator = 33 RpcErrorCode_VerificationCodeIsNotSet = 34 RpcErrorCode_VerificationCodeIsWrong = 35 RpcErrorCode_PageIsNotSet = 36 RpcErrorCode_DatabaseInconsistency = 37 RpcErrorCode_SessionIsNotFound = 38 RpcErrorCode_UserNameIsNotFound = 39 RpcErrorCode_EmailAddressIsNotSet = 40 RpcErrorCode_CaptchaIdIsNotSet = 41 )
Codes.
View Source
const ( RpcErrorMsg_AuthChallengeResponseIsNotSet = "authorisation challenge response is not set" RpcErrorMsg_BPP_GenerateRandomSalt = "BPP: GenerateRandomSalt error" RpcErrorMsgF_BPP_PackSymbols = "BPP: PackSymbols error: %s" // Template. RpcErrorMsg_CaptchaAnswerIsNotSet = "captcha answer is not set" RpcErrorMsg_CaptchaAnswerIsWrong = "captcha answer is wrong" RpcErrorMsg_EmailAddressIsNotValid = "e-mail address is not valid" RpcErrorMsg_EmailAddressIsUsed = "e-mail address is used" RpcErrorMsg_EmailChangeIsNotFound = "request for e-mail address change is not found" RpcErrorMsgF_JWTCreation = "JWT creation error: %s" // Template. RpcErrorMsg_NameIsNotSet = "name is not set" RpcErrorMsg_NameIsTooLong = "name is too long" RpcErrorMsg_NameIsUsed = "name is already used" RpcErrorMsg_NewPasswordIsNotSet = "new password is not set" RpcErrorMsg_NewEmailIsNotSet = "new e-mail address is not set" RpcErrorMsg_PasswordChangeIsNotFound = "request for password change is not found" RpcErrorMsg_PasswordIsNotValid = "password is not valid" RpcErrorMsg_PasswordIsNotSet = "password is not set" RpcErrorMsg_PasswordIsTooLong = "password is too long" RpcErrorMsg_PasswordIsWrong = "password is wrong" RpcErrorMsg_RequestIdGenerator = "error generating request ID" RpcErrorMsg_RequestIdIsNotSet = "request ID is not set" RpcErrorMsg_SmtpModule = "SMTP module error" RpcErrorMsg_StepIsUnknown = "unknown step" RpcErrorMsg_UserAlreadyStartedToChangePassword = "user has already started to change password" RpcErrorMsg_UserAlreadyStartedToChangeEmail = "user has already started to change e-mail address" RpcErrorMsg_UserCanNotLogIn = "user can not log in" RpcErrorMsg_UserHasAlreadyStartedToLogIn = "user has already started to log in" RpcErrorMsg_UserHasNotStartedToLogIn = "user has not started to log in" RpcErrorMsg_UserIdIsNotSet = "user ID is not set" RpcErrorMsg_UserIsAlreadyLoggedIn = "user is already logged in" RpcErrorMsg_UserIsNotFound = "user is not found" RpcErrorMsg_UserPreSessionIsNotFound = "user's preliminary session is not found" RpcErrorMsg_VerificationCodeGenerator = "verification code generator error" RpcErrorMsg_VerificationCodeIsNotSet = "verification code is not set" RpcErrorMsg_VerificationCodeIsWrong = "verification code is wrong" RpcErrorMsg_PageIsNotSet = "page is not set" RpcErrorMsg_DatabaseInconsistency = "database inconsistency" RpcErrorMsg_SessionIsNotFound = "session is not found" RpcErrorMsg_UserNameIsNotFound = "user name is not found" RpcErrorMsg_EmailAddressIsNotSet = "email address is not set" RpcErrorMsg_CaptchaIdIsNotSet = "captcha ID is not set" )
Messages.
View Source
const (
ErrAuthData = "authorisation data error"
)
Variables ¶
This section is empty.
Functions ¶
func GetMapOfHttpStatusCodesByRpcErrorCodes ¶
Unique HTTP status codes used in the map: - 400 (Bad request); - 403 (Forbidden); - 404 (Not found); - 409 (Conflict); - 500 (Internal server error).
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) ApproveAndRegisterUser ¶
func (srv *Server) ApproveAndRegisterUser(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) BanUser ¶
func (srv *Server) BanUser(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) ChangeEmail ¶
func (srv *Server) ChangeEmail(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) ChangePassword ¶
func (srv *Server) ChangePassword(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) GetListOfAllUsers ¶
func (srv *Server) GetListOfAllUsers(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) GetListOfAllUsersOnPage ¶
func (srv *Server) GetListOfAllUsersOnPage(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) GetListOfLoggedUsers ¶
func (srv *Server) GetListOfLoggedUsers(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) GetListOfLoggedUsersOnPage ¶
func (srv *Server) GetListOfLoggedUsersOnPage(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) GetListOfRegistrationsReadyForApproval ¶
func (srv *Server) GetListOfRegistrationsReadyForApproval(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) GetListenDsn ¶
func (*Server) GetMustStopAB ¶
func (*Server) GetSelfRoles ¶
func (srv *Server) GetSelfRoles(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) GetStopChannel ¶
func (*Server) GetSubRoutinesWG ¶
func (*Server) GetUserName ¶
func (srv *Server) GetUserName(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) GetUserRoles ¶
func (srv *Server) GetUserRoles(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) GetUserSession ¶
func (srv *Server) GetUserSession(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) IsUserLoggedIn ¶
func (srv *Server) IsUserLoggedIn(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) LogUserIn ¶
func (srv *Server) LogUserIn(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) LogUserOut ¶
func (srv *Server) LogUserOut(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) LogUserOutA ¶
func (srv *Server) LogUserOutA(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) Ping ¶
func (srv *Server) Ping(_ *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) RegisterUser ¶
func (srv *Server) RegisterUser(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) RejectRegistrationRequest ¶
func (srv *Server) RejectRegistrationRequest(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) ReportStart ¶
func (srv *Server) ReportStart()
func (*Server) SetUserRoleAuthor ¶
func (srv *Server) SetUserRoleAuthor(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) SetUserRoleReader ¶
func (srv *Server) SetUserRoleReader(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) SetUserRoleWriter ¶
func (srv *Server) SetUserRoleWriter(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) ShowDiagnosticData ¶
func (srv *Server) ShowDiagnosticData(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) Test ¶
func (srv *Server) Test(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) UnbanUser ¶
func (srv *Server) UnbanUser(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) UseConstructor ¶
func (*Server) ViewUserParameters ¶
func (srv *Server) ViewUserParameters(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
Click to show internal directories.
Click to hide internal directories.