Documentation
¶
Index ¶
- Constants
- func Init(cfg ...Config)
- func Register(key string, theme Theme)
- type CaptchaData
- type CaptchaDataItem
- type Config
- type DigitsCaptcha
- type Login
- func (l *Login) GetAsset(name string) ([]byte, error)
- func (l *Login) GetAssetList() []string
- func (l *Login) GetCSS() template.CSS
- func (l *Login) GetCallbacks() types.Callbacks
- func (l *Login) GetContent() template.HTML
- func (l *Login) GetJS() template.JS
- func (l *Login) GetName() string
- func (l *Login) GetTemplate() (*template.Template, string)
- func (l *Login) IsAPage() bool
- type TencentCaptcha
- type TencentCaptchaRes
- type TencentWaterProofWallData
- type Theme
Constants ¶
View Source
const ( CaptchaDriverKeyTencent = "tencent" CaptchaDriverKeyDefault = "digits" CaptchaDisableDuration = time.Minute * 2 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CaptchaData ¶
type CaptchaData map[string]CaptchaDataItem
func (*CaptchaData) Clean ¶
func (c *CaptchaData) Clean()
type CaptchaDataItem ¶
type Config ¶
type Config struct { TencentWaterProofWallData TencentWaterProofWallData `json:"tencent_water_proof_wall_data"` CaptchaDigits int `json:"captcha_digits"` Theme string `json:"theme"` }
type DigitsCaptcha ¶
type DigitsCaptcha struct{}
func (*DigitsCaptcha) Validate ¶
func (c *DigitsCaptcha) Validate(token string) bool
type Login ¶
type Login struct { TencentWaterProofWallData TencentWaterProofWallData `json:"tencent_water_proof_wall_data"` CaptchaDigits int `json:"captcha_digits"` CaptchaID string `json:"captcha_id"` CaptchaImgSrc string `json:"captcha_img_src"` Theme string `json:"theme"` }
func (*Login) GetAssetList ¶
func (*Login) GetCallbacks ¶
func (*Login) GetContent ¶
type TencentCaptcha ¶
func (*TencentCaptcha) Validate ¶
func (c *TencentCaptcha) Validate(token string) bool
type TencentCaptchaRes ¶
Click to show internal directories.
Click to hide internal directories.