captcha

package
v0.0.0-...-08977d0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultFont *truetype.Font

Functions

func NewPngImg

func NewPngImg(option Option) (*bytes.Buffer, error)

func RandText

func RandText(strlen int) string

func Verify

func Verify(id, code string) bool

Types

type Option

type Option struct {
	Width     int
	Height    int
	Text      string
	DPI       float64
	FontSize  float64
	TextColor color.RGBA
}

type VerifyData

type VerifyData struct {
	ID        string
	PngBase64 string
}

func NewImg

func NewImg() (*VerifyData, error)

Jump to

Keyboard shortcuts

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