gen

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateCron added in v0.5.0

func GenerateCron(opts CronOptions) (string, error)

GenerateCron builds a cron expression from the given options.

func GenerateParagraphs

func GenerateParagraphs(n int) string

func GeneratePassword

func GeneratePassword(opts PasswordOpts) (string, error)

func GenerateSentences

func GenerateSentences(n int) string

func GenerateUUID

func GenerateUUID(version int, namespace, name string) (string, error)

func GenerateWords

func GenerateWords(n int) string

Types

type CertOptions added in v0.5.0

type CertOptions struct {
	CN      string
	DNS     []string
	IPs     []string
	Days    int
	KeyType string // "ec" or "rsa"
}

CertOptions configures certificate generation.

type CertResult added in v0.5.0

type CertResult struct {
	CertPEM []byte
	KeyPEM  []byte
}

CertResult holds the generated PEM-encoded certificate and key.

func GenerateCert added in v0.5.0

func GenerateCert(opts CertOptions) (*CertResult, error)

GenerateCert creates a self-signed TLS certificate and private key.

type CronOptions added in v0.5.0

type CronOptions struct {
	Every    string
	Daily    bool
	Weekly   bool
	Monthly  bool
	Yearly   bool
	Weekdays bool
	At       string
	Day      string
	Month    string
}

CronOptions configures cron expression generation.

type PasswordOpts

type PasswordOpts struct {
	Length  int
	Upper   bool
	Lower   bool
	Digits  bool
	Symbols bool
	Exclude string
}

PasswordOpts configures password generation.

Jump to

Keyboard shortcuts

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