password

package
v0.0.0-...-bf7cbd6 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2022 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddValidation

func AddValidation(v Validation)

func Validate

func Validate(p Password) error

Types

type Password

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

func New

func New(s string) Password

func (Password) Hash

func (p Password) Hash() string

type Validation

type Validation func(p Password) error

func ValidateLength

func ValidateLength(min, max uint) Validation

type ValidationError

type ValidationError struct {
	Errors []error
}

func (ValidationError) Error

func (ve ValidationError) Error() string

type Validator

type Validator struct {
	Validations []Validation
}

func NewValidator

func NewValidator(validations ...Validation) Validator

func (Validator) Validate

func (v Validator) Validate(p Password) error

Jump to

Keyboard shortcuts

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