Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PwdBro ¶
type PwdBro struct {
// contains filtered or unexported fields
}
PwdBro is a struct to hold pwdbro instance
func NewDefaultPwdBro ¶
func NewDefaultPwdBro() *PwdBro
NewDefaultPwdBro return an instance of PwdBro with default checking mechanisms
func NewEmptyPwdBro ¶
func NewEmptyPwdBro() *PwdBro
NewEmptyPwdBro return an instance of PwdBro without no checking mechanism you could add your desired checker by using AddChecker() method
func (*PwdBro) AddChecker ¶
func (pwdb *PwdBro) AddChecker(c PwdChecker) error
AddChecker add a PwdChecker to the list of method of pwdbro
type PwdChecker ¶
type PwdChecker interface {
// The method name used, it should return a string denoting the method identifier
MethodName() string
// The method that is called when checking password, it accept a password string
// and should return a boolean denoting whether the password is safe/not, a string
// denoting additional message, and an error denoting if there is any error when
// running the method
CheckPassword(string) (bool, string, error)
}
PwdChecker is an interface to check password strength