validators

package
v0.0.0-...-6121247 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 License: Unlicense Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultAlphabet = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"

Variables

This section is empty.

Functions

This section is empty.

Types

type PasswordRules

type PasswordRules struct {
	Alphabet string
	MinLen   int
	MaxLen   int
}

func (*PasswordRules) RandomPassword

func (rules *PasswordRules) RandomPassword() string

type Validator

type Validator struct {
	Rules *PasswordRules
	// contains filtered or unexported fields
}

func NewSimpleValidtor

func NewSimpleValidtor(rules *PasswordRules, password *string) (*Validator, error)

func (Validator) Check

func (v Validator) Check(guess string) bool

Jump to

Keyboard shortcuts

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