generator

package
v0.0.0-...-32bdac0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

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

Variables

View Source
var (
	ZeroOptionsErr = errors.New("unable to produce the password with no options for characters")
	LengthErr      = errors.New("unable to produce the password with number of options bigger than the length")
)

Errors

Functions

func Generate

func Generate(opts Options) (string, error)

Types

type Options

type Options struct {
	Length       int  `json:"length"`
	LowerLetters bool `json:"lowerLetters"`
	UpperLetters bool `json:"upperLetters"`
	Digits       bool `json:"digits"`
	Symbols      bool `json:"symbols"`
}

Jump to

Keyboard shortcuts

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