keygen

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

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

Go to latest
Published: Nov 15, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseConfig

type BaseConfig struct {
	RandSource rand.Source
}

func DefaultBaseConfig

func DefaultBaseConfig() BaseConfig

type ConvConfig

type ConvConfig struct {
	BaseConfig
	Len       uint64
	UseUpper  bool
	UseLower  bool
	UseNumber bool
	UseSymbol bool
}

ConvConfig is configuration for generating random string with convinience.

type CustomConfig

type CustomConfig struct {
	BaseConfig
	Len      uint64
	Chartset []byte
}

Config is configuration for generating random string.

type Generator

type Generator interface {
	GenerateStream() (s <-chan []byte, cancel func())
}

Generate generates stream of random strings

func NewConvGenerator

func NewConvGenerator(conf *ConvConfig) Generator

func NewCustomGenerator

func NewCustomGenerator(conf *CustomConfig) Generator

func NewRegexGenerator

func NewRegexGenerator(conf *RegexConfig) (Generator, error)

type RegexConfig

type RegexConfig struct {
	BaseConfig
	Regex     string
	MaxRepeat uint16
}

Config is configuration for regex matching random string.

Jump to

Keyboard shortcuts

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