Documentation
¶
Index ¶
- Constants
- Variables
- func CreateCommand() subcommands.Command
- func DeleteCommand() subcommands.Command
- func GenerateChars(lc LengthChecker) (string, error)
- func GenerateCommand() subcommands.Command
- func GenerateSymbols(lc LengthChecker) (string, error)
- func GenerateWords(lc LengthChecker, wordList []string, sep string) (string, error)
- func GetCommand() subcommands.Command
- func ListCommand() subcommands.Command
- func RandomChoice[T ~[]E, E any](set T) (out E, err error)
- func RandomNOf[T ~[]E, E any](sets []T, n int) (T, int, error)
- func SetCommand() subcommands.Command
- func UnlockCommand() subcommands.Command
- type GenerateMode
- type LengthChecker
Constants ¶
View Source
const ( LowerLetterSet string = "abcdefghijklmnopqrstuvwxyz" UpperLetterSet string = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" NumberSet string = "0123456789" SymbolSet string = "!@#$%^&*_+=-?:" AllTypeableSet string = "`1234567890-=qwertyuiop[]\\asdfghjkl;'zxcvbnm,./~!@#$%^&*()_+QWERTYUIOP{}|ASDFGHJKL:\"ZXCVBNM<>?" )
Variables ¶
View Source
var Words string
Functions ¶
func CreateCommand ¶
func CreateCommand() subcommands.Command
func DeleteCommand ¶
func DeleteCommand() subcommands.Command
func GenerateChars ¶
func GenerateChars(lc LengthChecker) (string, error)
func GenerateCommand ¶
func GenerateCommand() subcommands.Command
func GenerateSymbols ¶
func GenerateSymbols(lc LengthChecker) (string, error)
func GenerateWords ¶
func GenerateWords(lc LengthChecker, wordList []string, sep string) (string, error)
func GetCommand ¶
func GetCommand() subcommands.Command
func ListCommand ¶
func ListCommand() subcommands.Command
func RandomChoice ¶
func SetCommand ¶
func SetCommand() subcommands.Command
func UnlockCommand ¶
func UnlockCommand() subcommands.Command
Types ¶
type GenerateMode ¶
type GenerateMode int
const ( ModeWords GenerateMode = iota ModeCharacters ModeAllSymbols )
func ParseMode ¶
func ParseMode(m string) (GenerateMode, error)
type LengthChecker ¶
func NewLengthChecker ¶
func NewLengthChecker(bits, length int) (LengthChecker, error)
Click to show internal directories.
Click to hide internal directories.