Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CountDigits ¶
CountDigits returns the number of digits in a string
func CountLowercase ¶
CountLowercase returns the number of lowercase letters in a string
func CountSymbols ¶
CountSymbols returns the number of special symbols in a string
func CountUppercase ¶
CountUppercase returns the number of uppercase letters in a string
Types ¶
type MinComplexity ¶
type MinComplexity int64
MinComplexity is a plugin that calculates the possible combinations of passwords, and validates against a minimum threshold.
func (MinComplexity) Name ¶
func (rule MinComplexity) Name() string
Name returns the name of this plugin, and is required for this object to implement the "Plugin" interface
type MinDigits ¶
type MinDigits int
MinDigits is a Plugin that validates the minimum length of passwords
func (MinDigits) Name ¶
Name returns the name of this plugin, and is required for this object to implement the "Plugin" interface
func (MinDigits) PasswordRuleDescription ¶
PasswordRuleDescription returns a localized, human-friendly description of the password rule.
type MinLength ¶
type MinLength int
MinLength is a Plugin that validates the minimum length of passwords
func (MinLength) Name ¶
Name returns the name of this plugin, and is required for this object to implement the "Plugin" interface
func (MinLength) PasswordRuleDescription ¶
PasswordRuleDescription returns a localized, human-friendly description of the password rule.
type MinLowercase ¶
type MinLowercase int
MinLowercase is a Plugin that validates the minimum length of passwords
func (MinLowercase) Name ¶
func (rule MinLowercase) Name() string
Name returns the name of this plugin, and is required for this object to implement the "Plugin" interface
func (MinLowercase) PasswordRuleDescription ¶
func (rule MinLowercase) PasswordRuleDescription(language string) string
PasswordRuleDescription returns a localized, human-friendly description of the password rule.
func (MinLowercase) ValidatePassword ¶
func (rule MinLowercase) ValidatePassword(password string, language string) (OK bool, message string)
ValidatePassword verifies that a password matches a rule, or returns a localized, human-friendly error message explaining the problem.
type MinSymbols ¶
type MinSymbols int
MinSymbols is a Plugin that validates the minimum length of passwords
func (MinSymbols) Name ¶
func (rule MinSymbols) Name() string
Name returns the name of this plugin, and is required for this object to implement the "Plugin" interface
func (MinSymbols) PasswordRuleDescription ¶
func (rule MinSymbols) PasswordRuleDescription(language string) string
PasswordRuleDescription returns a localized, human-friendly description of the password rule.
func (MinSymbols) ValidatePassword ¶
func (rule MinSymbols) ValidatePassword(password string, language string) (OK bool, message string)
ValidatePassword verifies that a password matches a rule, or returns a localized, human-friendly error message explaining the problem.
type MinUppercase ¶
type MinUppercase int
MinUppercase is a Plugin that validates the minimum length of passwords
func (MinUppercase) Name ¶
func (rule MinUppercase) Name() string
Name returns the name of this plugin, and is required for this object to implement the "Plugin" interface
func (MinUppercase) PasswordRuleDescription ¶
func (rule MinUppercase) PasswordRuleDescription(language string) string
PasswordRuleDescription returns a localized, human-friendly description of the password rule.
func (MinUppercase) ValidatePassword ¶
func (rule MinUppercase) ValidatePassword(password string, language string) (OK bool, message string)
ValidatePassword verifies that a password matches a rule, or returns a localized, human-friendly error message explaining the problem.