password

package
v0.0.0-...-0490640 Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrEmpty

type ErrEmpty struct{}

ErrEmpty is returned if the validated password is empty or all whitespace.

func (*ErrEmpty) Error

func (*ErrEmpty) Error() string

type ErrTooFewChars

type ErrTooFewChars struct {
	// contains filtered or unexported fields
}

ErrTooFewChars is returned if the password has less than the required number of distinct characters.

func (*ErrTooFewChars) Error

func (e *ErrTooFewChars) Error() string

type ErrTooShort

type ErrTooShort struct {
	// contains filtered or unexported fields
}

ErrTooShort is returned if the password is shorter than the required number of chars.

func (*ErrTooShort) Error

func (e *ErrTooShort) Error() string

type Validator

type Validator struct {
	// contains filtered or unexported fields
}

Validator is a wrapper type for our password validation

func NewValidator

func NewValidator() (*Validator, error)

NewValidator instantiates a password.Validator struct

func (*Validator) Validate

func (v *Validator) Validate(pass string) error

Validate returns a descriptive error if the passed password fails to meet our password policy.

Jump to

Keyboard shortcuts

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