Documentation ¶
Index ¶
- Variables
- type RealAuthMgr
- func (m *RealAuthMgr) Check(ai string, name, idNum string) (string, error)
- func (m *RealAuthMgr) CheckTest(ai string, name, idNum, code string) (string, error)
- func (m *RealAuthMgr) IdDecode(idcard string) (string, string, string, bool)
- func (m *RealAuthMgr) Query(uid int) (string, error)
- func (m *RealAuthMgr) QueryCheck(ai, code string) (string, error)
- func (m *RealAuthMgr) ReportLoginout(item ReportItem) (*ReportResponse, error)
- func (m *RealAuthMgr) ReportLoginoutCheck(item ReportItem, code string) (*ReportResponse, error)
- type ReportData
- type ReportItem
- type ReportResponse
- type ReportResponseData
- type ReportResultData
- type RequestBody
- type RequestInfo
- type Response
- type ResponseData
- type ResultData
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNeedQuery = fmt.Errorf("need query result") ErrAuthFailed = fmt.Errorf("auth failed") )
Functions ¶
This section is empty.
Types ¶
type RealAuthMgr ¶
type RealAuthMgr struct { AppId string BizId string Secret string // contains filtered or unexported fields }
func NewRealAuthMgr ¶
func NewRealAuthMgr(appId, bizId, secret string, args ...bool) *RealAuthMgr
func (*RealAuthMgr) Check ¶
func (m *RealAuthMgr) Check(ai string, name, idNum string) (string, error)
func (*RealAuthMgr) CheckTest ¶
func (m *RealAuthMgr) CheckTest(ai string, name, idNum, code string) (string, error)
func (*RealAuthMgr) QueryCheck ¶
func (m *RealAuthMgr) QueryCheck(ai, code string) (string, error)
func (*RealAuthMgr) ReportLoginout ¶
func (m *RealAuthMgr) ReportLoginout(item ReportItem) (*ReportResponse, error)
func (*RealAuthMgr) ReportLoginoutCheck ¶
func (m *RealAuthMgr) ReportLoginoutCheck(item ReportItem, code string) (*ReportResponse, error)
type ReportData ¶
type ReportData struct {
Collections []ReportItem `json:"collections"`
}
ReportData 上报的数据
type ReportItem ¶
type ReportItem struct { No int `json:"no"` // 批量模式中的索引 Si string `json:"si"` // 游戏内部会话标识 Bt int `json:"bt"` // 用户行为类型 0: 下线 1: 上线 Ot int64 `json:"ot"` // 行为发生时间戳,秒 Ct int `json:"ct"` // 上报类型 0: 已认证通过类型 2:游客用户 Di string `json:"di"` // 设备标识 由游戏运营单位生成,游客用户下必填 Pi string `json:"pi"` // 已通过实名认证用户的唯一标识,已认证通过用户必填 }
ReportItem 上下线上报的项目
type ReportResponse ¶
type ReportResponse struct { ErrCode int `json:"errcode"` ErrMsg string `json:"errmsg"` Data ReportResponseData `json:"data"` }
ReportResponse 上报上下线返回的数据
type ReportResponseData ¶
type ReportResponseData struct {
Result []ReportResponseData `json:"result"`
}
type ReportResultData ¶
type RequestBody ¶
type RequestBody struct {
Data string `json:"data"`
}
type RequestInfo ¶
type Response ¶
type Response struct { ErrCode int `json:"errcode"` ErrMsg string `json:"errmsg"` Data ResponseData `json:"data"` }
type ResponseData ¶
type ResponseData struct {
Result ResultData `json:"result"`
}
ResponseData check 和 query 返回数据
type ResultData ¶
Click to show internal directories.
Click to hide internal directories.