acm

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 8, 2024 License: GPL-3.0 Imports: 34 Imported by: 0

Documentation

Index

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
)

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"
)

Messages.

View Source
const (
	ErrAuthData = "authorisation data error"
)

Variables

This section is empty.

Functions

func GetMapOfHttpStatusCodesByRpcErrorCodes

func GetMapOfHttpStatusCodesByRpcErrorCodes() map[int]int

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 NewServer

func NewServer(s cm.ISettings) (srv *Server, err error)

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) GetListOfLoggedUsers

func (srv *Server) GetListOfLoggedUsers(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)

func (*Server) GetListenDsn

func (srv *Server) GetListenDsn() (dsn string)

func (*Server) GetSelfRoles

func (srv *Server) GetSelfRoles(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)

func (*Server) GetStopChannel

func (srv *Server) GetStopChannel() *chan bool

func (*Server) GetUserRoles

func (srv *Server) GetUserRoles(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) 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) 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) Start

func (srv *Server) Start() (err error)

func (*Server) Stop

func (srv *Server) Stop() (err error)

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 (srv *Server) UseConstructor(stn cm.ISettings) (cm.IServer, error)

func (*Server) ViewUserParameters

func (srv *Server) ViewUserParameters(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL