Documentation
¶
Index ¶
- Constants
- Variables
- type ActivationUser
- type AgentDetail
- type AgentListResponse
- type AgentLoginRequest
- type AgentLoginResponse
- type AppInfo
- type AppInfoRequest
- type AppInfoResponse
- type AppListRequest
- type AppListResponse
- type AppStatsRequest
- type Call
- type CardConsume
- type ChannelAndAPPStatsSummary
- type ChannelAndAPPStatsSummaryResponse
- type ChannelAndAppStatsSummaryRequest
- type CheckUserInfoRequest
- type ChooseOneScoreRequest
- type ClientConfig
- type ClientInitCompletedRequest
- type CoinChangeInformation
- type CommonResponse
- type CommonStatsItem
- type CreateDeskRequest
- type CreateDeskResponse
- type DailyMatchProgressInfo
- type DailyStats
- type DeleteAppRequest
- type DeleteDeskByIDRequest
- type DeleteUserRequest
- type Desk
- type DeskBasicInfo
- type DeskByIDRequest
- type DeskByIDResponse
- type DeskListRequest
- type DeskListResponse
- type DeskOptions
- type DeskPlayerData
- type DestoryDeskRequest
- type DestroyDeskResponse
- type Device
- type DissolveResponse
- type DissolveResult
- type DissolveStatusItem
- type DissolveStatusRequest
- type DissolveStatusResponse
- type EmptyRequest
- type EncryptTest
- type EncryptTestTest
- type EnterDeskInfo
- type EnterPublicDeskRequest
- type EnterPublicDeskResponse
- type ErrorMessage
- type ErrorResponse
- type ExitPublicDeskRequest
- type ExitRequest
- type ExitResponse
- type GameEndScoreChange
- type HandDicesInfo
- type JoinDeskRequest
- type JoinDeskResponse
- type LoginInfo
- type LoginRequest
- type LoginResponse
- type LoginToGameServerRequest
- type LoginToGameServerResponse
- type MatchStats
- type MingAction
- type None
- type OnCallRequest
- type OnGuoRequest
- type OnOpenRequest
- type OpChooseRequest
- type OpChoosed
- type OpenDiceType
- type OpenInfo
- type PlayRecordingVoice
- type PlayerEnterDesk
- type PlayerOfflineStatus
- type PlayerReady
- type QueryInfo
- type QueryUserByAttrRequest
- type QueryUserRequest
- type QueryUserResponse
- type Rank
- type ReConnect
- type ReEnterDeskRequest
- type ReEnterDeskResponse
- type ReJoinDeskRequest
- type ReJoinDeskResponse
- type RechargeDetail
- type RechargeListResponse
- type RecordingVoice
- type RegisterAgentRequest
- type RegisterAppRequest
- type RegisterAppResponse
- type RegisterUserRequest
- type Retention
- type RetentionListRequest
- type RetentionLite
- type RetentionResponse
- type Roll
- type RollInfo
- type RoundOverStats
- type RoundReady
- type ScoreInfo
- type ShowCheck
- type ShowOpen
- type ShowWait
- type StringMessage
- type StringResponse
- type SyncDesk
- type TableInfo
- type ThirdUserLoginRequest
- type UnCompleteDeskResponse
- type UpdateAppRequest
- type UserInfo
- type UserInfoRequest
- type UserInfoResponse
- type UserListRequest
- type UserListResponse
- type UserLoginResponse
- type UserStatsInfo
- type UserStatsInfoListRequest
- type UserStatsInfoListResponse
- type UserStatsSummary
- type UserStatsSummaryRequest
- type UserStatsSummaryResponse
- type Version
Constants ¶
View Source
const ( LoginStatusSucc = 1 LoginStatusFail = 2 )
登录状态
View Source
const ( ActionNewAccountSignIn = "accountLogin" ActionGuestSignIn = "anonymousLogin" ActionOldAccountSignIn = "oldAccountLogin" ActionWebChatSignIn = "webChatSignIn" ActionPhoneNumberRegister = "phoneRegister" ActionNormalRegister = "normalRegister" ActionGetVerification = "getVerification" ActionAccountRegister = "accountRegister" )
View Source
const ( LoginTypeAuto = "auto" LoginTypeManual = "manual" )
View Source
const ( VerificationTypeRegister = "register" VerificationTypeFindPW = "findPW" )
View Source
const ( MatchTypeClassic = 1 //经典 MatchTypeDaily = 3 //每日匹配 )
匹配类型
View Source
const ( CoinTypeSliver = 0 //银币 CoinTypeGold = 1 //金币 )
View Source
const ( RoomTypeClassic = 0 RoomTypeDailyMatch = 1 RoomTypeMonthlyMatch = 2 RoomTypeFinalMatch = 3 )
View Source
const ( DailyMatchLevelJunior = 0 DailyMatchLevelSenior = 1 DailyMatchLevelMaster = 2 )
View Source
const ( ClassicLevelJunior = 0 ClassicLevelMiddle = 1 ClassicLevelSenior = 2 ClassicLevelElite = 3 ClassicLevelMaster = 4 )
View Source
const ( ExitTypeExitDeskUI = -1 ExitTypeDissolve = 6 ExitTypeSelfRequest = 0 ExitTypeClassicCoinNotEnough = 1 ExitTypeDailyMatchEnd = 2 ExitTypeNotReadyForStart = 3 ExitTypeChangeDesk = 4 ExitTypeRepeatLogin = 5 )
View Source
const ( DeskStatusZb = 1 DeskStatusDq = 2 DeskStatusPlaying = 3 DeskStatusEnded = 4 )
View Source
const ( SexTypeUnknown = 0 SexTypeMale = 1 SexTypeFemale = 2 )
View Source
const ( UserTypeGuest = 0 UserTypeLaoBaShi = 1 )
View Source
const ( OptypeIllegal = 0 OptypeCall = 1 OptypeOpen = 2 OptypePass = 3 )
OpType
View Source
const ( ChannelOptionAll = "allChannel" ChannelOptionHalf = "halfChannel" )
创建房间频道选项
View Source
const ( RouteOpTypeHint = "onOpTypeHint" RouteTypeDo = "onOpTypeDo" )
View Source
const (
RegTypeThird = 5 //三方平台添加账号
)
Variables ¶
View Source
var EmptyMessage = &None{}
View Source
var SuccessMessage = &StringMessage{Message: "success"}
View Source
var SuccessResponse = StringResponse{0, "success"}
Functions ¶
This section is empty.
Types ¶
type AgentDetail ¶
type AgentListResponse ¶
type AgentListResponse struct { Code int `json:"code"` Agents []AgentDetail `json:"agents"` Total int64 `json:"total"` }
type AgentLoginRequest ¶
type AgentLoginResponse ¶
type AgentLoginResponse struct { Code int `json:"code"` Token string `json:"token"` Detail AgentDetail `json:"detail"` }
type AppInfo ¶
type AppInfo struct { Name string `json:"name"` //应用名 AppID string `json:"appid"` //应用id AppKey string `json:"appkey"` //应用key RedirectURI string `json:"redirect_uri"` //注册时填的redirect_uri Extra string `json:"extra"` //额外信息 ThirdProperties map[string]map[string]string `json:"third_properties"` //此app在第三方平台(eg: wechat)上的相关配置 }
type AppInfoRequest ¶
type AppInfoRequest struct {
AppID string `json:"appid"` //应用ID
}
type AppInfoResponse ¶
type AppListRequest ¶
type AppListResponse ¶
type AppStatsRequest ¶
type ChannelAndAPPStatsSummary ¶
type ChannelAndAPPStatsSummary struct { Start int64 `json:"start"` AppId string `json:"app_id"` ChannelId string `json:"channel_id"` AppName string `json:"app_name"` ChannelName string `json:"channel_name"` AccountInc int64 `json:"account_inc"` //新增用户 DeviceInc int64 `json:"device_inc"` //新增设备 TotalRecharge int64 `json:"total_recharge"` //总充值 TotalRechargeAccount int64 `json:"total_recharge_account"` //总充值人数 PaidAccountInc int64 `json:"paid_account_inc"` //新增付费用户 PaidTotalRechargeInc int64 `json:"paid_total_recharge_inc"` //新增付费总额 RegPaidAccountInc int64 `json:"reg_paid_account_inc"` //新增注册并付费用户 RegPaidTotalRechargeInc int64 `json:"reg_paid_total_recharge_inc"` //新增注册并付费总额 //PaidAccountIncRate float32 `json:"paid_account_inc_rate"` //新增用户付费率 RegPaidAccountIncRate string `json:"reg_paid_account_inc_rate"` //新增注册用户付费率 }
type ChannelAndAPPStatsSummaryResponse ¶
type ChannelAndAPPStatsSummaryResponse struct { Code int `json:"code"` //状态码 Data []*ChannelAndAPPStatsSummary `json:"data"` // Total int `json:"total"` //总数量 }
type CheckUserInfoRequest ¶
type ChooseOneScoreRequest ¶
type ChooseOneScoreRequest struct {
Pos int `json:"pos"`
}
type ClientConfig ¶
type ClientConfig struct { Version string `json:"version"` Android string `json:"android"` IOS string `json:"ios"` Heartbeat int `json:"heartbeat"` ForceUpdate bool `json:"forceUpdate"` Title string `json:"title"` // 分享标题 Desc string `json:"desc"` // 分享描述 Daili1 string `json:"daili1"` Daili2 string `json:"daili2"` Kefu1 string `json:"kefu1"` AppId string `json:"appId"` AppKey string `json:"appKey"` }
type ClientInitCompletedRequest ¶
type ClientInitCompletedRequest struct {
IsReEnter bool `json:"isReenter"`
}
type CoinChangeInformation ¶
type CoinChangeInformation struct {
Coin int64 `json:"coin"`
}
type CommonResponse ¶
type CommonResponse struct { Code int `json:"code"` //状态码 Data interface{} `json:"data"` //整数状态 }
type CommonStatsItem ¶
type CreateDeskRequest ¶
type CreateDeskRequest struct { Version string `json:"version"` //客户端版本 ClubId int64 `json:"clubId"` // 俱乐部ID DeskOpts *DeskOptions `json:"options"` // 游戏额外选项 }
type CreateDeskResponse ¶
type DailyMatchProgressInfo ¶
type DailyMatchProgressInfo struct { HasProgress bool `json:"hasProgress"` IsHaveFanPai bool `json:"isHaveFanPai"` Heart int `json:"heart"` //最大只能是3 BaoPaiMax int `json:"baoPaiMax"` BaoPaiNum int `json:"baoPaiNum"` Coin int64 `json:"coin"` Score int `json:"score"` RoomType int `json:"roomType"` BaoPaiID int `json:"baoPaiId"` }
type DailyStats ¶
type DeleteAppRequest ¶
type DeleteAppRequest struct {
AppID string `json:"appid"` //应用ID
}
type DeleteDeskByIDRequest ¶
type DeleteDeskByIDRequest struct {
ID string `json:"id"` //房间ID
}
type DeleteUserRequest ¶
type DeleteUserRequest struct {
UID int64 `json:"uid"`
}
type Desk ¶
type Desk struct { Id int64 `json:"id"` DeskNo string `json:"desk_no"` Mode int `json:"mode"` Player0 int64 `json:"player0"` Player1 int64 `json:"player1"` Player2 int64 `json:"player2"` Player3 int64 `json:"player3"` Player4 int64 `json:"player4"` PlayerName0 string `json:"player_name0"` PlayerName1 string `json:"player_name1"` PlayerName2 string `json:"player_name2"` PlayerName3 string `json:"player_name3"` PlayerName4 string `json:"player_name4"` ScoreChange0 int `json:"score_change0"` ScoreChange1 int `json:"score_change1"` ScoreChange2 int `json:"score_change2"` ScoreChange3 int `json:"score_change3"` ScoreChange4 int `json:"score_change4"` CreatedAt int64 `json:"created_at"` CreatedAtStr string `json:"created_at_str"` Extras string `json:"extras"` }
type DeskBasicInfo ¶
type DeskByIDRequest ¶
type DeskByIDRequest struct {
ID int64 `json:"id"` //房间ID
}
type DeskByIDResponse ¶
type DeskListRequest ¶
type DeskListResponse ¶
type DeskOptions ¶
type DeskOptions struct {
Mode int `json:"mode"`
}
type DeskPlayerData ¶
type DestoryDeskRequest ¶
type DestoryDeskRequest struct {
DeskNo string `json:"deskId"`
}
type DestroyDeskResponse ¶
type DestroyDeskResponse struct { RoundStats *RoundOverStats `json:"roundStats"` MatchStats []MatchStats `json:"stats"` Title string `json:"title"` IsNormalFinished bool `json:"isNormalFinished"` }
type DissolveResponse ¶
type DissolveResponse struct { DissolveUid int64 `json:"dissolveUid"` DissolveStatus []DissolveStatusItem `json:"dissolveStatus"` RestTime int32 `json:"restTime"` }
type DissolveResult ¶
type DissolveResult struct {
DeskPos int `json:"deskPos"`
}
type DissolveStatusItem ¶
type DissolveStatusRequest ¶
type DissolveStatusRequest struct {
Result bool `json:"result"`
}
type DissolveStatusResponse ¶
type DissolveStatusResponse struct { DissolveStatus []DissolveStatusItem `json:"dissolveStatus"` RestTime int32 `json:"restTime"` }
type EmptyRequest ¶
type EmptyRequest struct{}
type EncryptTest ¶
type EncryptTestTest ¶
type EncryptTestTest struct {
Result string `json:"result"`
}
type EnterDeskInfo ¶
type EnterDeskInfo struct { DeskPos int `json:"deskPos"` Uid int64 `json:"acId"` Nickname string `json:"nickname"` IsReady bool `json:"isReady"` Sex int `json:"sex"` IsExit bool `json:"isExit"` HeadUrl string `json:"headURL"` Score int `json:"score"` IP string `json:"ip"` Offline bool `json:"offline"` }
type EnterPublicDeskRequest ¶
type EnterPublicDeskResponse ¶
type ErrorMessage ¶
type ErrorResponse ¶
type ExitPublicDeskRequest ¶
type ExitPublicDeskRequest struct {
DeskNo string `json:"deskId"`
}
type ExitRequest ¶
type ExitRequest struct {
IsDestroy bool `json:"isDestroy"`
}
type ExitResponse ¶
type GameEndScoreChange ¶
type HandDicesInfo ¶
type JoinDeskRequest ¶
type JoinDeskResponse ¶
type LoginInfo ¶
type LoginInfo struct { // 三方登录字段 Platform string `json:"platform"` //三方平台 ThirdAccount string `json:"third_account"` //三方平台唯一ID ThirdName string `json:"account"` //三方平台账号名 Token string `json:"token"` //用户Token ExpireTime int64 `json:"expire_time"` //Token过期时间 AccountID int64 `json:"acId"` //用户的uuid,即user表的pk GameServerIP string `json:"ip"` //游戏服的ip&port GameServerPort int `json:"port"` }
type LoginRequest ¶
type LoginResponse ¶
type LoginResponse struct { Code int `json:"code"` Name string `json:"name"` Uid int64 `json:"uid"` HeadUrl string `json:"headUrl"` Coin int64 `json:"coin"` Sex int `json:"sex"` //[0]未知 [1]男 [2]女 IP string `json:"ip"` Port int `json:"port"` PlayerIP string `json:"playerIp"` Config ClientConfig `json:"config"` Messages []string `json:"messages"` Debug int `json:"debug"` }
type MatchStats ¶
type MingAction ¶
type OnCallRequest ¶
type OnCallRequest struct {
CalledDice string `json:"data"`
}
type OnGuoRequest ¶
type OnGuoRequest struct {
CalledDice string `json:"data"`
}
type OnOpenRequest ¶
type OpChooseRequest ¶
type OpenInfo ¶
type OpenInfo struct { Uid int64 `json:"acId"` OpenDiceType OpenDiceType `json:"OpenDiceType"` WinLose bool `json:"winlose"` }
type PlayRecordingVoice ¶
type PlayerEnterDesk ¶
type PlayerEnterDesk struct {
Data []EnterDeskInfo `json:"data"`
}
type PlayerOfflineStatus ¶
type PlayerReady ¶
type PlayerReady struct {
Account int64 `json:"account"`
}
type QueryUserByAttrRequest ¶
type QueryUserByAttrRequest struct {
Attr string `json:"attr"` //属性
}
用属性查询用户
type QueryUserRequest ¶
type QueryUserRequest struct {
Name string `json:"name"` //用户名
}
type QueryUserResponse ¶
type ReEnterDeskRequest ¶
type ReEnterDeskRequest struct {
DeskNo string `json:"deskId"`
}
type ReEnterDeskResponse ¶
type ReJoinDeskRequest ¶
type ReJoinDeskRequest struct {
DeskNo string `json:"deskId"`
}
type ReJoinDeskResponse ¶
type RechargeDetail ¶
type RechargeListResponse ¶
type RechargeListResponse struct { Code int `json:"code"` Recharges []RechargeDetail `json:"recharges"` Total int64 `json:"total"` }
type RecordingVoice ¶
type RecordingVoice struct {
FileId string `json:"fileId"`
}
type RegisterAgentRequest ¶
type RegisterAppRequest ¶
type RegisterAppResponse ¶
type RegisterUserRequest ¶
type RegisterUserRequest struct { Type int `json:"type"` //注册方式: 1-手机 2-贪玩蛇 Name string `json:"name"` //用户名, 可空,当非游客注册时用户名与手机号必须至少出现一项 Password string `json:"password"` //MD5后的用户密码, 长度>=6 VerifyID string `json:"verify_id"` //验证码ID VerifyCode string `json:"verify_code"` //验证码 Phone string `json:"phone"` //手机号,可空 AppID string `json:"appid"` //来自于哪一个应用的注册 ChannelID string `json:"channel_id"` //来自于哪一个渠道的注册 Device Device `json:"device"` //设备信息 Token string `json:"token"` //Token, 游客注册并绑定时, 验证游客身份 }
type Retention ¶
type Retention struct { Date int `json:"date"` Register int64 `json:"register"` Retention_1 RetentionLite `json:"retention_1"` //次日 Retention_2 RetentionLite `json:"retention_2"` //2日 Retention_3 RetentionLite `json:"retention_3"` //3日 Retention_7 RetentionLite `json:"retention_7"` //7日 Retention_14 RetentionLite `json:"retention_14"` //14日 Retention_30 RetentionLite `json:"retention_30"` //30日 }
type RetentionListRequest ¶
type RetentionLite ¶
type RetentionResponse ¶
type RetentionResponse struct { Code int `json:"code"` Data interface{} `json:"data"` }
type RoundOverStats ¶
type RoundOverStats struct { Title string `json:"title"` HandDices []*HandDicesInfo `json:"tiles"` ScoreChange []GameEndScoreChange `json:"scoreChange"` }
type RoundReady ¶
type RoundReady struct {
Multiple int `json:"multiple"`
}
type StringMessage ¶
type StringResponse ¶
type SyncDesk ¶
type SyncDesk struct { Status constant.DeskStatus `json:"status"` //1,2,3,4,5 Players []DeskPlayerData `json:"players"` ScoreInfo []ScoreInfo `json:"scoreInfo"` MarkerUid int64 `json:"markerAcId"` LastCallUid int64 `json:"lastCallAcId"` }
type ThirdUserLoginRequest ¶
type ThirdUserLoginRequest struct { Platform string `json:"platform"` //三方平台/渠道 AppID string `json:"appId"` //用户来自于哪一个应用 ChannelID string `json:"channelId"` //用户来自于哪一个渠道 Device Device `json:"device"` //设备信息 Name string `json:"name"` //微信平台名 OpenID string `json:"openid"` //微信平台openid AccessToken string `json:"access_token"` //微信AccessToken }
type UnCompleteDeskResponse ¶
type UpdateAppRequest ¶
type UpdateAppRequest struct { Type int `json:"type"` //更新类型, 1为重新生成appkey/appsecret, 2为更新其他内容 AppID string `json:"appid"` //应用ID Name string `json:"name"` //应用名 RedirectURI string `json:"redirect_uri"` //回调地址 Extra string `json:"extra"` //应用描述 ThirdProperties map[string]map[string]string `json:"third_properties"` //第三方属性 }
type UserInfoRequest ¶
type UserInfoRequest struct {
UID int64 `json:"uid"`
}
type UserInfoResponse ¶
type UserListRequest ¶
type UserListResponse ¶
type UserLoginResponse ¶
type UserStatsInfo ¶
type UserStatsInfo struct { ID int64 `json:"id"` Uid int64 `json:"uid"` Name string `json:"name"` RegisterAt int64 `json:"register_at"` RegisterIP string `json:"register_ip"` LastestLoginAt int64 `json:"lastest_login_at"` LastestLoginIP string `json:"lastest_login_ip"` TotalMatch int64 `json:"total_match"` //总对局数 RemainCard int64 `json:"remain_card"` //剩余房卡 StatsAt []int64 //统计时间 Stats map[int64]*DailyStats //时间对应的数据 }
type UserStatsInfoListRequest ¶
type UserStatsInfoListRequest struct { RoleTypes []uint8 `json:"role_types"` Account string `json:"account"` }
用户统计信息列表
type UserStatsSummary ¶
type UserStatsSummary struct { Name string `json:"name"` //名字 Uid int64 `json:"uid"` //uid Role byte `json:"role"` //角色 AppID string `json:"app_id"` //appid ChannelID string `json:"channel_id"` //channel id OS string `json:"os"` IP string `json:"ip"` //最后登录ip Device string `json:"deivce"` //最后登录设备 LoginAt int64 `json:"login_at"` //最后登录时间 RegisterAt int64 `json:"register_at"` //注册时间 LoginNum int64 `json:"login_num"` //登录次数 RechargeNum int64 `json:"recharge_num"` //充值次数 RechargeTotal int64 `json:"total_recharge"` //充值总金额 }
type UserStatsSummaryRequest ¶
type UserStatsSummaryResponse ¶
type UserStatsSummaryResponse struct { Code int `json:"code"` //状态码 Data []*UserStatsSummary `json:"data"` Total int `json:"total"` //总数量 }
Click to show internal directories.
Click to hide internal directories.