inter

package
v0.0.0-...-4a0e227 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CaptchaType

type CaptchaType = string

type CaptchaType GGCaptcha.CaptchaType

const (
	StringCaptcha     CaptchaType = "DriverString"
	MathCaptcha       CaptchaType = "DriverMath"
	MathStringCaptcha CaptchaType = "DriverMathString"
	PuzzleCaptcha     CaptchaType = "DriverPuzzle"
)

type Driver

type Driver interface {
	GenerateDriverString() (content, answer string, err error)
	GenerateDriverMathString() (content, answer string, err error)
	GenerateDriverMath() (content, answer string)
	GenerateDriverPuzzle() (bgImage string, puzzleImage string, targetX int, err error)
}

type GGCaptchator

type GGCaptchator interface {
	GenerateGGCaptcha() (id, content string, err error)

	GenerateDriverMath() (id, content string, err error)

	GenerateDriverMathString() (id, content string, err error)

	GenerateDriverPuzzle() (id, bgImage, puzzleImage string, err error)

	VerifyGGCaptcha(id, answer string, clear bool) bool

	RefreshCaptcha(ctype CaptchaType) (id, content string, err error)
}

type Store

type Store interface {
	Set(id string, value string, t time.Duration) error
	Exist(id string) bool
	Get(id string, clear bool) (string, error)
	Verify(id, answer string, clear bool) bool
}

Jump to

Keyboard shortcuts

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