captcha

package module
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigKey = "captcha"

ConfigKey is the configuration key under which captcha settings are stored.

View Source
const Name = "captcha_component"

Variables

This section is empty.

Functions

This section is empty.

Types

type Captcha

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

func (*Captcha) GetCaptcha

func (c *Captcha) GetCaptcha() slide.Captcha

func (*Captcha) GetCaptchaData

func (c *Captcha) GetCaptchaData() (*SlideCaptchaData, error)

func (*Captcha) Init

func (c *Captcha) Init(context *core.Context) error

func (*Captcha) ValidateCode

func (c *Captcha) ValidateCode(code string) (bool, error)

func (*Captcha) ValidateThumb

func (c *Captcha) ValidateThumb(code string, x string) (*Data, bool)

type Config

type Config struct {
	CodeKey string
	CodeIv  string
}

type Data

type Data struct {
	Type        string `json:"type"`
	CaptchaCode string `json:"captchaCode"`
}

type SlideCaptcha

type SlideCaptcha struct {
}

type SlideCaptchaData

type SlideCaptchaData struct {
	Type        string `json:"type"`
	TileImage   string `json:"tileImage"`
	MasterImage string `json:"masterImage"`
	ThumbX      int    `json:"thumbX"`
	ThumbCode   string `json:"thumbCode"`
	ThumbY      int    `json:"thumbY"`
	ThumbWidth  int    `json:"thumbWidth"`
	ThumbHeight int    `json:"thumbHeight"`
	ThumbAngle  int    `json:"thumbAngle"`
}

Jump to

Keyboard shortcuts

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