Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Genders = []string{"male", "female", "human"}
Genders represents a user's gender
Functions ¶
This section is empty.
Types ¶
type UserWhitelistItem ¶
type UserWhitelistItem struct { MailPrefixPattern string `yaml:"prefix-pattern"` MailPrefixDisplay string `yaml:"prefix-display"` MailSuffixPattern string `yaml:"suffix-pattern"` MailSuffixDisplay string `yaml:"suffix-display"` PasswordPattern string `yaml:"password-pattern"` // contains filtered or unexported fields }
UserWhitelistItem is used to specify a set of requirements which a user has to fulfil in order to register
func (*UserWhitelistItem) MailDomainRegex ¶
func (u *UserWhitelistItem) MailDomainRegex() *regexp.Regexp
MailDomainRegex returns the regex to validate the everything after the @-sign of a user's email address
func (*UserWhitelistItem) MailLocalPartRegex ¶
func (u *UserWhitelistItem) MailLocalPartRegex() *regexp.Regexp
MailLocalPartRegex returns the regex to validate the everything before the @-sign of a user's email address
func (*UserWhitelistItem) PasswordRegex ¶
func (u *UserWhitelistItem) PasswordRegex() *regexp.Regexp
PasswordRegex returns the regex to validate a user's chosen password
func (*UserWhitelistItem) Validate ¶
func (u *UserWhitelistItem) Validate() error
Validate checks whether the current item contains valid regexes
Click to show internal directories.
Click to hide internal directories.