image

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

type Generator struct {
	// contains filtered or unexported fields
}

Generator handles image generation

func New

func New(imageType config.ImageType) *Generator

New creates a new image generator

func (*Generator) GenerateCaptcha added in v0.1.5

func (g *Generator) GenerateCaptcha(width, height int, text string) (*interfaces.CaptchaResult, error)

GenerateCaptcha generates a captcha image with the provided text If text is empty, it will generate random digits

func (*Generator) VerifyCaptcha added in v0.1.5

func (g *Generator) VerifyCaptcha(id string, digits string) bool

VerifyCaptcha verifies the captcha digits

Jump to

Keyboard shortcuts

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