Documentation
¶
Index ¶
Constants ¶
View Source
const (
// Version 版本号
Version = "v1.2.1"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BaiduClient ¶
type BaiduClient struct {
*requester.HTTPClient
// contains filtered or unexported fields
}
BaiduClient 记录登录百度所使用的信息
func (*BaiduClient) BaiduLogin ¶
func (bc *BaiduClient) BaiduLogin(username, password, verifycode, vcodestr string) (lj *LoginJSON)
BaiduLogin 发送 百度登录请求
func (*BaiduClient) SendCodeToUser ¶
func (bc *BaiduClient) SendCodeToUser(verifyType, token string) (msg string)
SendCodeToUser 发送验证码到 手机/邮箱
func (*BaiduClient) VerifyCode ¶
func (bc *BaiduClient) VerifyCode(verifyType, token, vcode, u string) (lj *LoginJSON)
VerifyCode 输入 手机/邮箱 收到的验证码, 验证登录
type LoginJSON ¶
type LoginJSON struct {
ErrInfo struct {
No string `json:"no"`
Msg string `json:"msg"`
} `json:"errInfo"`
Data struct {
CodeString string `json:"codeString"`
GotoURL string `json:"gotoUrl"`
Token string `json:"token"`
U string `json:"u"`
AuthSID string `json:"authsid"`
Phone string `json:"phone"`
Email string `json:"email"`
BDUSS string `json:"bduss"`
PToken string `json:"ptoken"`
SToken string `json:"stoken"`
CookieString string `json:"cookieString"`
} `json:"data"`
}
LoginJSON 从百度服务器解析的数据结构
Source Files
¶
Click to show internal directories.
Click to hide internal directories.