Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockTimePerIncident ¶
type BlockTimePerIncident struct { IllegalAccessAttempt cmb.Count `json:"illegalAccessAttempt"` // 1. FakeToken cmb.Count `json:"fakeToken"` // 2. VerificationCodeMismatch cmb.Count `json:"verificationCodeMismatch"` // 3. DoubleLogInAttempt cmb.Count `json:"doubleLogInAttempt"` // 4. PreSessionHacking cmb.Count `json:"preSessionHacking"` // 5. CaptchaAnswerMismatch cmb.Count `json:"captchaAnswerMismatch"` // 6. PasswordMismatch cmb.Count `json:"passwordMismatch"` // 7. PasswordChangeHacking cmb.Count `json:"passwordChangeHacking"` // 8. EmailChangeHacking cmb.Count `json:"emailChangeHacking"` // 9. FakeIPA cmb.Count `json:"fakeIPA"` // 10. }
BlockTimePerIncident is block time in seconds for each type of incident.
type CaptchaImageSettings ¶
type CaptchaImageSettings struct { // Images Server. Schema string `json:"schema"` Host string `json:"host"` Port uint16 `json:"port"` Path string `json:"path"` }
CaptchaImageSettings are settings of captcha images.
func (CaptchaImageSettings) Check ¶
func (s CaptchaImageSettings) Check() (err error)
type HttpsSettings ¶
type HttpsSettings = cs.HttpsSettings
HttpsSettings are settings of an HTTPS server for incoming requests.
type JWTSettings ¶
type JWTSettings struct { PrivateKeyFilePath cm.Path `json:"privateKeyFilePath"` PublicKeyFilePath cm.Path `json:"publicKeyFilePath"` SigningMethod string `json:"signingMethod"` }
JWTSettings are settings for JSON web tokens.
func (JWTSettings) Check ¶
func (s JWTSettings) Check() (err error)
type MessageSettings ¶
type MessageSettings struct { SubjectTemplateForRegVCode cmb.Text `json:"subjectTemplateForRegVCode"` SubjectTemplateForReg cmb.Text `json:"subjectTemplateForReg"` BodyTemplateForRegVCode cmb.Text `json:"bodyTemplateForRegVCode"` BodyTemplateForReg cmb.Text `json:"bodyTemplateForReg"` BodyTemplateForLogIn cmb.Text `json:"bodyTemplateForLogIn"` BodyTemplateForPwdChange cmb.Text `json:"bodyTemplateForPwdChange"` BodyTemplateForEmailChange cmb.Text `json:"bodyTemplateForEmailChange"` }
MessageSettings are settings of e-mail messages.
func (MessageSettings) Check ¶
func (s MessageSettings) Check() (err error)
type Settings ¶
type Settings struct { // Path to the file with these settings. FilePath cm.Path `json:"-"` // Program versioning information. VersionInfo *ver.Versioneer `json:"-"` HttpsSettings `json:"https"` DbSettings `json:"db"` SystemSettings `json:"system"` JWTSettings `json:"jwt"` UserRoleSettings `json:"role"` MessageSettings `json:"message"` // Settings of host storing captcha images. CaptchaImageSettings `json:"captcha"` // External services. GwmSettings cs.ServiceClientSettings `json:"gwm"` SmtpSettings cs.ServiceClientSettings `json:"smtp"` RcsSettings cs.ServiceClientSettings `json:"rcs"` }
Settings is Server's settings.
func NewSettingsFromFile ¶
func NewSettingsFromFile(filePath string, versionInfo *ver.Versioneer) (stn *Settings, err error)
func (*Settings) UseConstructor ¶
type SystemSettings ¶
type SystemSettings struct { SiteName cmb.Text `json:"siteName"` SiteDomain cmb.Text `json:"siteDomain"` VerificationCodeLength cmb.Count `json:"verificationCodeLength"` UserNameMaxLenInBytes cmb.Count `json:"userNameMaxLenInBytes"` UserPasswordMaxLenInBytes cmb.Count `json:"userPasswordMaxLenInBytes"` PreRegUserExpirationTime cmb.Count `json:"preRegUserExpirationTime"` IsAdminApprovalRequired cmb.Flag `json:"isAdminApprovalRequired"` LogInRequestIdLength cmb.Count `json:"logInRequestIdLength"` LogInTryTimeout cmb.Count `json:"logInTryTimeout"` PreSessionExpirationTime cmb.Count `json:"preSessionExpirationTime"` SessionMaxDuration cmb.Count `json:"sessionMaxDuration"` PasswordChangeExpirationTime cmb.Count `json:"passwordChangeExpirationTime"` EmailChangeExpirationTime cmb.Count `json:"emailChangeExpirationTime"` ActionTryTimeout cmb.Count `json:"actionTryTimeout"` PageSize cmb.Count `json:"pageSize"` // This setting must be synchronised with settings of the Gateway module. IsTableOfIncidentsUsed cmb.Flag `json:"isTableOfIncidentsUsed"` // This setting is used only when a table of incidents is enabled. BlockTimePerIncident BlockTimePerIncident `json:"blockTimePerIncident"` IsDebugMode bool `json:"isDebugMode"` }
SystemSettings are system settings.
func (SystemSettings) Check ¶
func (s SystemSettings) Check() (err error)
type UserRoleSettings ¶
type UserRoleSettings struct { // List of IDs of users having a moderator role. ModeratorIds []cmb.Id `json:"moderatorIds"` // List of IDs of users having an administrator role. AdministratorIds []cmb.Id `json:"administratorIds"` }
UserRoleSettings are settings for special user roles.
func (UserRoleSettings) Check ¶
func (s UserRoleSettings) Check() (err error)
Click to show internal directories.
Click to hide internal directories.