captcha

package
v0.1.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const Name = "captcha_component"

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

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

func (*Component) Destroy added in v0.1.2

func (c *Component) Destroy() error

func (*Component) GetCaptcha

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

func (*Component) GetCaptchaData added in v0.1.1

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

func (*Component) Init

func (c *Component) Init(config config2.IConfig) error

func (*Component) ValidateCode added in v0.1.2

func (c *Component) ValidateCode(code string) bool

func (*Component) ValidateThumb added in v0.1.2

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

type Config added in v0.1.2

type Config struct {
	CodeKey string
	CodeIv  string
}

func (*Config) Key added in v0.1.2

func (c *Config) Key() string

type Data added in v0.1.2

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

type SlideCaptcha added in v0.1.1

type SlideCaptcha struct {
}

type SlideCaptchaData added in v0.1.1

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