Documentation ¶
Index ¶
- Constants
- func CheckServerStatus(conf Config)
- func CleanStatus(filterObject string) error
- func CreateFilterObject(filterMethod, filterObject string) string
- func FirstRegister(ctx *node.Context) (sdk.GeetestLibResultData, error)
- func GetBypassCache() (status string)
- func GetFilterObject(ctx *node.Context) (string, error)
- func SecondValidate(ctx *node.Context) (map[string]string, error)
- func ValidStatusCode(filterObject string, statusCode int64) (bool, int64)
- func ValidSuccess(filterObject string) bool
- type Config
Constants ¶
View Source
const ( GEETEST_ID = "123456" GEETEST_KEY = "123456" REDIS_SERVER = "127.0.0.1:6379" // 对bypass状态进行缓存的redis服务地址 BYPASS_URL = "http://bypass.geetest.com/v1/bypass_status.php" // 向geetest发送获取bypass状态请求的url CYCLE_TIME = 10 // 轮询发送获取bypass状态请求的时间间隔(单位为秒) GEETEST_BYPASS_STATUS_KEY = "gt_server_bypass_status" // bypass状态存入redis时使用的key值 )
Variables ¶
This section is empty.
Functions ¶
func CreateFilterObject ¶ added in v1.0.24
func FirstRegister ¶
func FirstRegister(ctx *node.Context) (sdk.GeetestLibResultData, error)
验证初始化接口,GET请求
func SecondValidate ¶
二次验证接口,POST请求
func ValidStatusCode ¶
验证状态码
Types ¶
Click to show internal directories.
Click to hide internal directories.