Documentation ¶
Index ¶
- func DelClient(names ...string)
- func Init(configs ...Config) (err error)
- type CaptchaData
- type Config
- type GoCaptcha
- func (g *GoCaptcha) AudioCaptcha(language string, length int) (*CaptchaData, error)
- func (g *GoCaptcha) CaptchaVerify(id, code string) bool
- func (g *GoCaptcha) ChineseCaptcha(width, height, length int, source string) (*CaptchaData, error)
- func (g *GoCaptcha) DigitCaptcha(width, height, length int) (*CaptchaData, error)
- func (g *GoCaptcha) GetCaptcha(param configJsonBody) (*CaptchaData, error)
- func (g *GoCaptcha) MathCaptcha(width, height int) (*CaptchaData, error)
- func (g *GoCaptcha) StringCaptcha(width, height, length int) (*CaptchaData, error)
- type RedisStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CaptchaData ¶
type Config ¶ added in v1.2.85
type Config struct { Name string `json:"name,optional" yaml:"Name"` RedisConfig *goredis.Config `json:"redisConfig,optional" yaml:"RedisConfig"` }
默认内存,分布式用redis等
type GoCaptcha ¶
type GoCaptcha struct {
// contains filtered or unexported fields
}
func New ¶
func New(store base64Captcha.Store) *GoCaptcha
func NewDefault ¶
func NewDefault() *GoCaptcha
func (*GoCaptcha) AudioCaptcha ¶
func (g *GoCaptcha) AudioCaptcha(language string, length int) (*CaptchaData, error)
func (*GoCaptcha) ChineseCaptcha ¶
func (g *GoCaptcha) ChineseCaptcha(width, height, length int, source string) (*CaptchaData, error)
source是中文英文字列表
func (*GoCaptcha) DigitCaptcha ¶
func (g *GoCaptcha) DigitCaptcha(width, height, length int) (*CaptchaData, error)
func (*GoCaptcha) GetCaptcha ¶
func (g *GoCaptcha) GetCaptcha(param configJsonBody) (*CaptchaData, error)
返回不同类型的验证码
func (*GoCaptcha) MathCaptcha ¶
func (g *GoCaptcha) MathCaptcha(width, height int) (*CaptchaData, error)
数学计算
func (*GoCaptcha) StringCaptcha ¶
func (g *GoCaptcha) StringCaptcha(width, height, length int) (*CaptchaData, error)
type RedisStore ¶
Click to show internal directories.
Click to hide internal directories.