captcha

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

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 context.Context, config config2.IConfig) 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
}

func (*Config) Key

func (c *Config) Key() 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