Documentation
¶
Index ¶
- Constants
- Variables
- type AnsCheck
- type AnsCool
- type AnsHash
- type AnsPosition
- type AnsProType
- type AnsQue
- type AnsQueDetail
- type AnsQueDetailList
- type AnsQuesList
- type AnsType
- type AnsTypeList
- type AnswerHistory
- type AnswerTime
- type BaseQues
- type CaptchaCheckReq
- type CaptchaReq
- type CoolPower
- type CoolRank
- type CoolShare
- type CoolVideo
- type DataBusResult
- type ExtraBigData
- type ExtraQst
- type ExtraScoreReply
- type Formal
- type IdentifyInfo
- type ImgPosition
- type MyQues
- type NameplateInfo
- type Pendant
- type ProTypes
- type ProcessRes
- type QueReq
- type Question
- type QuestionRPC
- type RankInfo
- type ReqPendant
- type Rs
- type SubType
- type TypeInfo
- type ValidateRes
Constants ¶
View Source
const ( LangZhCN = "zh-CN" LangZhTW = "zh-TW" LangZhHK = "zh-HK" )
answer constants
View Source
const ( UserInfoRank = 5000 PenDantDays = 7 //答题优秀设置挂件的天数 ExtraAnsA = "符合规范" ExtraAnsB = "不符合规范" )
answer constants
View Source
const ( FullScore = 100 Score85 = 85 Score60 = 60 Score0 = 0 )
Score info.
View Source
const ( Q int8 = iota BaseExtraNoPassQ // 1 extra no pass BaseExtraPassQ // 2 extra pass )
question type.
View Source
const ( UnKownQ int8 = iota ViolationQ NormalQ )
extra question ans.
View Source
const ( CaptchaNopass int8 = iota CaptchaPass )
answer captcha pass
View Source
const ( MobileUserAgentFlag = "Mobile" ProPassed = "/v3/result/%d" MinType = 3 MaxType = 10 BlockMsg = "12小时内无法再次答题!" DefPageSize = 10 DefPageNo = 1 NoParam = -1 OfficialType = 6 ShowOfficialRank = 31300 // ans info. AnsSize = 4 // 题目答案数 HashSalt = "bilirqeust" // platfrom PlatH5 = "h5" PlatPC = "pc" DefBirthday1 = "1930-01-01" DefBirthday2 = "1980-01-01" // rank FlagAll = "all" FlagMonth = "m" )
const .
View Source
const ( AnswerLogID = 15 AnswerUpdate = "answer_update" BasePass = "basePass" ExtraStartTime = "extraStartTime" ExtraCheck = "extraCheck" ProQues = "proQues" ProCheck = "proCheck" Captcha = "captchaPass" Level = "level" )
const .
View Source
const ( IdentifyOk = 0 IdentifyNoInfo = 1 PhoneOk = 0 Phone17x = 1 PhoneEmpty = 2 )
const .
View Source
const ( PendantNotGet = 0 PendantGet = 1 )
const .
View Source
const ( WaitCheck = int8(0) PassCheck = int8(1) NoPassCheck = int8(2) )
state
View Source
const ( MaxQuestion = 120 MinQuestion = 6 MaxAns = 100 MinAns = 2 MaxTips = 100 MinTips = 2 MaxLoadQueSize = 100000 )
size
View Source
const ( TextMediaType = int8(1) ImageMediaType = int8(2) TopRankSize = 10 MyQuestionSize = 12 AttrUnknown = -1 )
media type
View Source
const (
RankTop int = 122
)
Rank info.
Variables ¶
View Source
var ( // Geetest captcha_type . Geetest = "gt" BiliCaptcha = "bili" )
var
Functions ¶
This section is empty.
Types ¶
type AnsCool ¶
type AnsCool struct { Hid int64 `json:"hid,omitempty"` URL string `json:"url,omitempty"` Name string `json:"uname"` Face string `json:"face"` Powers []*CoolPower `json:"power_result"` Score int8 `json:"score"` Rank *CoolRank `json:"rank"` CanShowRankBtn bool `json:"can_show_rank_btn"` IsSameUser bool `json:"is_same_user"` ViewMore string `json:"view_more"` VideoInfo *CoolVideo `json:"video_info"` IsFirstPass int8 `json:"is_first_pass"` Level int8 `json:"level"` MainTids []int `json:"main_tids"` SubTids []int `json:"sub_tids"` }
AnsCool .
type AnsPosition ¶
type AnsPosition struct { AnsHash string Height float64 // height PositionY float64 // background-position-y }
AnsPosition .
type AnsProType ¶
type AnsProType struct { List []*AnsTypeList `json:"list"` CurrentTime int64 `json:"current_time"` EndTime int64 `json:"end_time"` Repro string `json:"repro"` }
AnsProType .
type AnsQue ¶
type AnsQue struct { ID int64 Img string Height float64 PositionY float64 // background-position-y Ans []*AnsPosition }
AnsQue .
type AnsQueDetail ¶
type AnsQueDetail struct { ID int64 `json:"qs_id"` AnsImg string `json:"ans_img"` QsHeight float64 `json:"qs_h"` QsPositionY float64 `json:"qs_y"` Ans1Hash string `json:"ans1_hash"` Ans2Hash string `json:"ans2_hash"` Ans3Hash string `json:"ans3_hash"` Ans4Hash string `json:"ans4_hash"` Ans0Height float64 `json:"ans0_h"` Ans0PositionY float64 `json:"ans0_y"` Ans1Height float64 `json:"ans1_h"` Ans1PositionY float64 `json:"ans1_y"` Ans2Height float64 `json:"ans2_h"` Ans2PositionY float64 `json:"ans2_y"` Ans3Height float64 `json:"ans3_h"` Ans3PositionY float64 `json:"ans3_y"` }
AnsQueDetail .
type AnsQueDetailList ¶
type AnsQueDetailList struct { CurrentTime int64 `json:"current_time"` EndTime int64 `json:"end_time"` QuesList []*AnsQueDetail `json:"items"` }
AnsQueDetailList .
type AnsQuesList ¶
AnsQuesList .
type AnsTypeList ¶
AnsTypeList .
type AnswerHistory ¶
type AnswerHistory struct { ID int64 `json:"id"` Hid int64 `json:"hid"` Mid int64 `json:"mid"` StartTime time.Time `json:"start_time"` StepOneErrTimes int8 `json:"step_one_err_times"` StepOneCompleteTime int64 `json:"step_one_complete_time"` StepExtraStartTime time.Time `json:"step_extra_start_time"` StepExtraCompleteTime int64 `json:"step_extra_complete_time"` StepExtraScore int64 `json:"step_extra_score"` StepTwoStartTime time.Time `json:"step_two_start_time"` CompleteTime time.Time `json:"complete_time"` CompleteResult string `json:"complete_result"` Score int8 `json:"score"` IsFirstPass int8 `json:"is_first_pass"` IsPassCaptcha int8 `json:"is_pass_captcha"` PassedLevel int8 `json:"passed_level"` RankID int `json:"rank_id"` Ctime time.Time `json:"ctime"` Mtime time.Time `json:"mtime"` }
AnswerHistory info.
type AnswerTime ¶
type AnswerTime struct { Stime time.Time `json:"stime"` // answer start time Etimes int8 `json:"etimes"` // base answer error times }
AnswerTime info.
type CaptchaCheckReq ¶
type CaptchaCheckReq struct { Mid int64 IP string Challenge string ClientType string Validate string Seccode string Success int Cookie string Comargs map[string]string }
CaptchaCheckReq Captcha check request.
type CaptchaReq ¶
CaptchaReq Captcha request.
type CoolVideo ¶
type CoolVideo struct { URL string `json:"url"` Name string `json:"name"` Img string `json:"img"` WatchNum string `json:"watch_num"` UpNum string `json:"up_num"` }
CoolVideo .
type DataBusResult ¶
type DataBusResult struct { Mid int64 `json:"mid"` // 用户 ID Buvid string `json:"buvid"` // 设备标识符 前端传入 IP string `json:"ip"` // 用户 IP 地址 Ua string `json:"ua"` // 客户端 User Agent Refer string `json:"refer"` // 页面跳转来源地址 Refer Score int8 `json:"score"` // 答题总分数 Hid int64 `json:"hid"` // hid Rs []*Rs }
DataBusResult databus.
type ExtraBigData ¶
ExtraBigData ret.
type ExtraQst ¶
type ExtraQst struct { ID int64 `json:"id"` Question string `json:"question"` Ans int8 `json:"ans"` Status int8 `json:"status"` OriginID int64 `json:"origin_id"` AvID int64 `json:"av_id"` Source int8 `json:"source"` Ctime time.Time `json:"ctime"` Mtime time.Time `json:"mtime"` }
ExtraQst etc.
type Formal ¶
type Formal struct { Mid int64 `json:"mid"` // 用户 ID Hid int64 `json:"history_id"` // 答题历史 ID Cookie string `json:"cookie"` // cookie IP string `json:"ip"` // cookie PassTime time.Time `json:"pass_time"` // 通过时间 }
Formal user formal info.
type IdentifyInfo ¶
IdentifyInfo .
type ImgPosition ¶
type ImgPosition struct { Ans0H float64 `json:"ans_0_h"` Ans0Y float64 `json:"ans_0_y"` Ans1H float64 `json:"ans_1_h"` Ans1Y float64 `json:"ans_1_y"` Ans2H float64 `json:"ans_2_h"` Ans2Y float64 `json:"ans_2_y"` Ans3H float64 `json:"ans_3_h"` Ans3Y float64 `json:"ans_3_y"` Ans4H float64 `json:"ans_4_h"` Ans4Y float64 `json:"ans_4_y"` QsH float64 `json:"qs_h"` QsY float64 `json:"qs_y"` }
ImgPosition .
type NameplateInfo ¶
type NameplateInfo struct { Nid int `json:"nid"` Name string `json:"name"` Image string `json:"image"` ImageSmall string `json:"image_small"` Level string `json:"level"` Condition string `json:"condition"` }
NameplateInfo .
type ProcessRes ¶
type ProcessRes struct { Success int8 `json:"success"` CaptchaID string `json:"gt"` Challenge string `json:"challenge"` NewCaptcha int `json:"new_captcha"` CaptchaType string `json:"type,omitempty"` Token string `json:"token,omitempty"` URL string `json:"url,omitempty"` }
ProcessRes geetest Captcha resp info.
type Question ¶
type Question struct { ID int64 `json:"id"` Mid int64 `json:"mid"` IP string `json:"ip"` TypeID int8 `json:"type"` MediaType int8 `json:"media_type"` Check int8 `json:"check"` Source int8 `json:"source"` Question string `json:"question"` Ans1 string `json:"ans1"` Ans2 string `json:"ans2"` Ans3 string `json:"ans3"` Ans4 string `json:"ans4"` Ans []string `json:"-"` Tips string `json:"tips"` AvID int32 `json:"av_id"` Ctime time.Time `json:"ctime"` Mtime time.Time `json:"mtime"` }
Question question info rpc.
type QuestionRPC ¶
type QuestionRPC struct { ID int64 `json:"id"` Mid int64 `json:"mid"` IP uint32 `json:"ip"` TypeID int8 `json:"type"` MediaType int8 `json:"media_type"` Check int8 `json:"check"` Source int8 `json:"source"` Question string `json:"question"` Ans1 string `json:"ans1"` Ans2 string `json:"ans2"` Ans3 string `json:"ans3"` Ans4 string `json:"ans4"` Tips string `json:"tips"` AvID int32 `json:"av_id"` Ctime time.Time `json:"ctime"` }
QuestionRPC stion question info.
type RankInfo ¶
type RankInfo struct { Mid int64 `json:"mid"` Face string `json:"face"` Uname string `json:"uname"` Num int64 `json:"num"` Nameplate *NameplateInfo `json:"nameplate"` }
RankInfo rank
type ReqPendant ¶
ReqPendant .
type Rs ¶
type Rs struct { ID int64 `json:"id"` // 题目自增 ID Question string `json:"question"` // 问题内容 Ans int8 `json:"ans"` // 用户答案 TrueAns int8 `json:"trueAns"` // 真实答案 答案0:未知 1:违规 2:不违规 AvID int64 `json:"av_id"` // 相关视频id Status int8 `json:"status"` // 问题状态 1:未申核 2:已审核 Source int8 `json:"source"` // 问题来源 0:未知1:评论 2:弹幕 Ctime time.Time `json:"ctime"` // 创建时间 Mtime time.Time `json:"mtime"` // 修改时间 }
Rs def.
Click to show internal directories.
Click to hide internal directories.