Documentation
¶
Index ¶
- Constants
- Variables
- type AD_GetRewardReq
- type AD_GetRewardRes
- type AccountDBWPropReq
- type Accountrdatareq
- type Accountwdatareq
- type ActPlayersGameEndMsg
- type ActivityReqMsg
- type ActivityReqMsgs
- type ActivityResponseMsg
- type ActivitySubsidyReq
- type ActivityUpDownRoomReq
- type ApplyRobotReq
- type BulleNoticeRes
- type BulletinNotice
- type C2S_TaskReward
- type C2S_UserIntervalAdReq
- type ClientUserRes
- type ConfDogRequest
- type ConfDogResponse
- type EnterScenceReq
- type EnterScenceRes
- type GameAwardInfo
- type GameFlagNotice
- type GameRegistReq
- type GameRegistRes
- type GameUserSafeCtrl
- type HandUpNotice
- type HandUpReq
- type HandUpRes
- type KickOutRes
- type LeaveSceneReq
- type LeaveSceneRes
- type LetPlayerOffline
- type LoginAgainRes
- type LoginLobbyNotice
- type LoginRes
- type MQWriteReq
- type MqFromConSumer
- type PropInfo
- type RechargeInfo
- type RequestData
- type ResponseData
- type RewardData
- type RobotMessage
- type RouteMsg
- type S2C_GameGuide
- type S2C_TaskInfo
- type S2C_TaskReward
- type ShareInfo
- type ShareInfoExt
- type ShareReq
- type SitDownReq
- type SitDownRes
- type TableJoinPlayer
- type TablePlayer
- type TablePlayerLeaveNotice
- type TablePlayerLeaveReq
- type TablePlayerLeaveRes
- type UserPropChange
- type Useronlinestatus
- type VipRechargeTimesDef
- type WriteLogReq
Constants ¶
View Source
const ( LoginErr_begin = iota LoginErr_tokenerr LoginErr_nouser LoginErr_inotherroom LoginErr_gamecoin_notenough LoginErr_gamecoin_toomuch LoginErr_accountforbidden LoginErr_wrongpasswd LoginErr_nophysical //没有体力 )
游戏登录
View Source
const ( SitErr_Begin = iota SitErr_NoFitLocation SitErr_HaveSit SitErr_ForbidWatch SitErr_NoLogin SitErr_coin_toomuch SitErr_coin_notenough SitErr_nophysical )
入座
View Source
const ( Handuperr_begin = iota Handuperr_no_sitdown Handuperr_already_hand Handuperr_coin_notenough Handuperr_coin_toomuch Handuperr_room_closed )
Handuperr
View Source
const ( TableLeave_ToRoom = iota TableLeave_ChangeTable )
Tableplayerleave
View Source
const ( Kickout_begin = iota Kickout_toolong_handup //入座举手超时 Kickout_toolong_think //对战考虑超时 Kickout_room_closed //房间已关闭 )
Variables ¶
View Source
var Processor = json.NewProcessor()
使用默认的 JSON 消息处理器(默认还提供了 protobuf 消息处理器)
View Source
var Processortype = reflect.TypeOf(Processor)
Functions ¶
This section is empty.
Types ¶
type AccountDBWPropReq ¶
type AccountDBWPropReq struct { UserID int64 //用户ID UserIP string // LobbyBigVer string LobbySmallVer string RegAppID string RegChannelID int32 RegTime time.Time AcType int8 //账号类型 AppID string //长渠道 TradeNo string //货币来源订单号,一般充值有 SubChannelID int32 //短渠道 SourceID int32 //货币来源 GiftID int32 //礼包ID ActID int32 // PropList []UserPropChange //道具列表 }
type Accountrdatareq ¶
type Accountrdatareq struct { Account string Passwd string Token string //登录token LoginRoute string //登录来源,Login,Lobby,DZMJ Serverid string // Loginip string // MacID string // AppID string // Userid int64 // Gameid int32 // ServerLevel int32 // ChannelID int32 // DevType int8 // SDKAcType int8 //第三方账号类型 Proplist []int32 //道具列表 }
type Accountwdatareq ¶
type Accountwdatareq struct { UserID int64 // GameTax uint64 Diamond int64 GameCoin int64 //增量 PlayCoin int64 //游戏玩分 GameCoinwin int64 // GameCoinlose int64 // GameID int32 // ServerID string RoomLevel int32 PrizeTicket int32 //增量 HelpTimes int32 //增量 GameExp int32 VipExp int32 RechargeMoney int32 GamePlaytime int32 // GameOnlinetime int32 // GameWintimes int32 // GameLosetimes int32 // GameWinStktimes int32 //连胜 GameLoseStktimes int32 //连输 GameWinmStktimes int32 //最大连胜 GameLosemStktimes int32 //最大连输 SourceID int32 //货币来源 GiftID int32 //礼包ID ActID int32 //活动ID OpenID string UnionID string ThirdAppID string ThirdAppKey string TradeNo string //订单号 PropList []UserPropChange //道具列表增量 IsQuitGame bool //是否退出游戏 RedPacketTimes int32 //拆红包次数 BuybPlayTimes int32 //首充B之后玩的局数,非增量 GamePlaytimes int32 //每日玩游戏局数 GameExtStr string //游戏每日扩展属性 IsRobot bool //是否机器人 //任务属性 TaskID int32 //每日任务ID TaskProgress int32 //任务进度 TaskTime time.Time }
type ActPlayersGameEndMsg ¶
游戏服在PlayersGameEnd时发送的 msg
type ActivityReqMsg ¶
type ActivityReqMsg struct { Route string //触发资源名 “如:玩家入座PlayerSitDownSuccess”,这个字段数据玩家登陆时会发送给游戏服 ClientMsg string //客户端数据 }
活动消息请求,向活动服发送数据
type ActivityReqMsgs ¶
type ActivityReqMsgs struct { RouteMsgs []RouteMsg //[优先级]触发资源 UserID int64 //玩家id AcType int8 //0:官方游客 1:sdk账号 2:微信账号 AcIsVisit bool //是否游客 GameID int32 //游戏id RoomLevel int32 //房间等级,这个等级可能为 0 RegisteTime int32 //注册时间v RegProvince string //注册省份 RegCity string // 注册城市 RegIP string // 注册IP LgnIP string // 登录IP IsFirstUser bool //是否新手 IsRobot bool //是否机器人 VipExp int32 //vip等级 RegChannelInfo string //注册长渠道 ChannelID int32 //渠道id LgnChannelInfo string //登录长渠道 LgnChannelID int32 //登录渠道 TypeID int32 //类型id 判断是否快速登录 GameCoin int64 //当前积分 LotteryNum int32 //当前奖券 PlatPlayTime int32 //平台游戏时长 GamePlayTime int32 //当前游戏时长 PlatGameWinTimes int32 //平台玩家赢局数 PlatGameLoseTimes int32 //平台玩家输局数 GameWinTimes int32 //玩家赢局数 GameLoseTimes int32 //玩家输局数 GameBWinTimes int32 //刺激场玩家赢局数 GameBLoseTimes int32 //刺激场玩家输局数 RedPacketTimes int32 //玩家拆红包数量 NickName string //玩家昵称 HeadURL string //用户头像地址 }
type ActivityResponseMsg ¶
type ActivityResponseMsg struct { Errcode int32 //错误码 Route string //触发资源名 UserID int32 MapResponseMsg map[string]interface{} //[活动id][结构体] }
活动服返回数据
type ApplyRobotReq ¶
type BulleNoticeRes ¶
type BulleNoticeRes struct { VipExp int32 NextVipExp int32 VipLevel int32 VipRechargeTimes []VipRechargeTimesDef }
type BulletinNotice ¶
type BulletinNotice struct { Event string `json:"event"` //事件名 GameID int32 `json:"gameid"` RoomID string `json:"roomid"` LevelGame int32 `json:"levelgame"` AreaID int32 `json:"areaid"` //用户站点 ChannelID int32 `json:"channelid"` //短渠道 DistinctID int64 `json:"distinct_id"` //用户ID SavedField interface{} `json:"save_field"` //根据事件自定义数据类型 UserLCID string `json:"userlcid"` //用户长渠道号 Properties interface{} `json:"properties"` //根据事件自定义数据类型 }
mq消息
type C2S_UserIntervalAdReq ¶
type C2S_UserIntervalAdReq struct { Res int8 `json:"res"` Type int8 `json:"type"` //看完广告通知类型 1:游戏间隔N局看广告请求 2:天降红包领取 3:下局包赔 }
通用广告看完请求
type ClientUserRes ¶
type ClientUserRes struct { UserID int64 ErrCode int32 Account string //用户账号 Token string AcIndex int32 //用户账号所属机器码的序号 AcType int16 //账号类型 AppID string //对外产品ID SID int32 //对内产品ID IsValid int8 //账号是否冻结 NickName string //用户昵称 GameCoin int64 //积分 PTicket int32 //金豆 AllPTicket int32 // Diamond int64 //钻石 RegChan int32 //注册短渠道 RegTime time.Time //注册时间 RegSID int32 Gender int8 //性别 HeadID int32 //系统头像id THUrl string //第三方头像地址 PhNum string //绑定手机号 WxAddr string //绑定微信地址 WxAppID string AliAddr string //绑定支付宝地址 VipExp int32 //vip经验 VipLevel int32 // GameExp int32 //平台经验 GameID int32 ServerID string ServerLevel int32 OpenID string UnionID string PropList []PropInfo //道具列表 NewPlayer int8 //是否新手玩家 ExtInfo interface{} //扩展信息 IfGameServer bool //true 游戏服,false非游戏服 MJBHongBao int32 //广告版麻将金币 }
type Logingamereq struct { Userid int Loginlongchannel string Loginshortchannel int Logindeviceid string Logindevicetype int //1:PC 2:安卓 3:IOS Loginsiteid int //登陆站点 Loginfrom string //登陆来源 Logintoken string //登陆token }
type ConfDogRequest ¶
ConfDogRequest 配置门户请求
type ConfDogResponse ¶
ConfDogResponse 配置门户返回
type EnterScenceReq ¶
type EnterScenceReq struct { Account string //账号 Passwd string //密码 Token string //token UserID int64 //用户ID ProdName string //产品名 AppID string //产品ID MacID string //机器码 OsType int8 //1:pc 2:Android 3:IOS LoginIP string //登录IP OpenID string //第三方OpenID UnionID string //第三方UnionID LoginMethod int8 //第三方登录方式 1,2,3…… ChannelID int32 //短渠道号 LongChannel string //长渠道号 BigVer string //大版本号 SmallVer string //小版本号 Gender int8 Platform string Imei string //通讯设备码原值 Idfa string //ios广告标识位 Oaid string //oaid原值 AndroidID string //安卓设置ID原值 NatrualMac string //机器码原值 UserSource string //用户来源,例如同1个渠道不同的位置 Province string City string SDKAcType int8 //1:游客 2:正式账号 }
EnterScenceReq 进入业务服,各业务可自由筛选字段但结构名不能变
type GameAwardInfo ¶
GameAwardInfo 业务发奖附加信息
type GameFlagNotice ¶
type GameFlagNotice struct {
IsClosed bool
}
type GameRegistReq ¶
type GameRegistRes ¶
type GameRegistRes struct {
HashCode []uint32
}
type GameUserSafeCtrl ¶
type GameUserSafeCtrl struct { UserID int64 `gorm:"primary_key:true" json:"user_id"` OpenLobby int8 `json:"open_lobby"` //开启大厅 UpdateTime time.Time `json:"update_time"` }
GameUserSafeCtrl 用户风控属性
func (GameUserSafeCtrl) TableName ¶
func (a GameUserSafeCtrl) TableName() string
type HandUpNotice ¶
type KickOutRes ¶
type LeaveSceneRes ¶
type LeaveSceneRes struct {
Route string //用户ID
}
type LetPlayerOffline ¶
type LetPlayerOffline struct {
Route string //
}
LetPlayerOffline 让用户下线,退出app
type LoginAgainRes ¶
type LoginAgainRes struct { UserID int64 ErrCode int32 Account string //用户账号 Token string AcIndex int32 //用户账号所属机器码的序号 AcType int16 //账号类型 AppID string //对外产品ID SID int32 //对内产品ID IsValid int8 //账号是否冻结 NickName string //用户昵称 GameCoin int64 //积分 PTicket int32 //金豆 AllPTicket int32 // Diamond int64 //钻石 RegChan int32 //注册短渠道 RegTime time.Time //注册时间 RegSID int32 Gender int8 //性别 HeadID int32 //系统头像id THUrl string //第三方头像地址 OpenID string UnionID string WxAddr string WxAppID string AliAddr string PhNum string //绑定手机号 VipExp int32 //vip经验 GameExp int32 //平台经验 GameID int32 ServerID string ServerLevel int32 PropList []PropInfo //道具列表 Tableplayers []TablePlayer MJBHongBao int32 //广告版金币 ExtInfo interface{} }
type LoginLobbyNotice ¶
LoginLobbyNotice 用户登录大厅通知
type LoginRes ¶
type LoginRes struct { Userid int64 Errcode int32 Account string //用户账号 Token string AcIndex int32 //用户账号所属机器码的序号 AcType int16 //账号类型 AppID string //长渠道号 BranchID string //产品线ID SiteID int32 //对内产品ID IsValid int8 //账号是否冻结 NickName string //用户昵称 GameCoin int64 //积分 BankCoin int64 // GoldBean int32 //金豆 AllGoldBean int32 // Diamond int64 MJBHongBao int32 //麻将币红包 propid 1001,广告版麻将使用 RegChan int32 //注册短渠道 RegTime time.Time //注册时间 RegProvince string //注册省份 RegCity string //注册城市 RegIP string //注册IP RegSiteID int32 //注册站点 Gender int8 //性别 HeadID int32 //系统头像id ThirdHeadUrl string //第三方头像地址 ThirdAppID string //第三方AppID AcIsVisit bool //账号是否游客状态 OpenID string //第三方OPENID UnionID string //第三方unionid Phonebinded string //绑定手机号 WxAddr string //绑定微信地址 WxAppID string //绑定的微信APPID AliAddr string //绑定支付宝地址 IsBuyB bool //是否已经首充过B,首充B之后,有几次强胡机会 //平台属性 VipExp int32 //vip经验 VipLevel int32 //vip等级 AllGameExp int32 // PlatPlayTime int32 // PlatOnlineTime int32 // PlatPlayCoin int64 // PlatPrizeTicket int32 //平台总获得奖券 PlatRechargeTimes int32 PlatRechargeMoney int32 //分为单位 PlatTax uint64 // PlatGameWinTimes int32 //平台赢局 PlatGameLoseTimes int32 //平台输局 GameBWinTimes int32 //刺激场赢局 GameBLoseTimes int32 //刺激场输局 PlatRedPacketTimes int32 //平台拆红包 PlatQHPlayTimes int32 //首充之后强胡的次数 //每日平台属性 PlatDayPlayTime int32 // 每日玩的时间 PlatDayOnlineTime int32 // PlatDayPlayCoin int64 // PlatDayPrizeTicket int32 //平台总获得奖券 PlatDayRechargeTimes int32 PlatDayRechargeMoney int32 //分为单位 PlatDayTax uint64 // PlatHelpTimes int32 //领取救济金次数 PlatDayPlayTimes int32 //每日玩的次数 PlatDayTaskID int32 //每日任务ID,可变动 PlatDayTaskProgress int32 //每日任务进度 PlatDayTaskTime time.Time PlatDayUpdateTime int64 //游戏属性 GameExp int32 // GameWinTimes int32 // GameLoseTimes int32 // GameWinStkTimes int32 //连赢次数 GameLoseStkTimes int32 //连输次数 GameWinmStkTimes int32 //最大连赢 GameLosemStkTimes int32 //最大连输 GamePlayTime int32 // GameOnlineTime int32 // GameCoinPlay int64 // GameCoinWin int64 // GameCoinLose int64 // OtherGameID int32 // OtherRoomID string // OtherRoomLevel int32 GameStatus int8 Proplist []PropInfo //道具列表 RedPacketTimes int32 //拆红包数量 GameExtStr string //游戏扩展属性 //风控属性 SafeCtrl GameUserSafeCtrl }
type MQWriteReq ¶
type MqFromConSumer ¶
type MqFromConSumer struct { Event string Idevent int Gameid int Levelgame int Roomid int Areaid int Channelid int Distinc_id int Userlcid string Saved_field interface{} Properties interface{} }
MqFromConSumer MQ消费数据
type RechargeInfo ¶
type RechargeInfo struct { ErrMessage string `json:"errmessage"` GiftID int32 `json:"giftid"` //礼包ID Money int32 `json:"money"` OrderID string `json:"orderid"` //订单号 ExtField string `json:"ext"` //自定义字段 }
RechargeInfo 充值相关信息
type RequestData ¶
type ResponseData ¶
type RobotMessage ¶
type S2C_GameGuide ¶
主动推送引导
type S2C_TaskInfo ¶
type S2C_TaskInfo struct { TaskTotalNum int32 //活动总局数 TaskProgress int32 //活动进度 TaskReward int32 //活动奖励 RewardDesc string //奖励描述 IfTaskOver bool //活动完成 }
主动推送任务
type S2C_TaskReward ¶
type S2C_TaskReward struct { TaskID int32 //任务ID NextTaskID int32 //下一个任务ID RewardID int32 //奖励ID TaskReward int32 //任务奖励数量 }
领取任务奖励返回
type ShareInfoExt ¶
type ShareInfoExt struct {}
{"starttime":1588919443,"lifetime":45454,"headurl":"http://tggg.jpg","nickname":"ggg"}
type ShareReq ¶
type ShareReq struct {}
{"starttime":1588919443,"lifetime":45454,"headurl":"http://tggg.jpg","nickname":"ggg"}
type SitDownReq ¶
type SitDownRes ¶
type SitDownRes struct { Errcode int32 //错误码 Tableid int32 //桌子号 Chairid int32 //椅子号 Players []TablePlayer ExtInfo interface{} }
type TableJoinPlayer ¶
type TableJoinPlayer struct { Player TablePlayer ExtInfo interface{} }
type TablePlayer ¶
type TablePlayer struct { Userid int64 // Siteid int32 Nickname string // Gamecoin int64 Bankcoin int64 Goldbean int32 Diamond int64 //钻石 MJBHongBao int32 //广告版麻币 Sysheadid int32 Thirdheadurl string // Gender int8 Vipexp int32 // Gameexp int32 Gamewintimes int32 // Gamelosetimes int32 // Gamewinstktimes int32 GameLosestktimes int32 Gamewinmstktimes int32 //最大连胜 Gamelosemstktimes int32 Tableid int32 Chairid int32 // Gamestatus int32 // PExtInfo interface{} //玩家信息扩展 }
type TablePlayerLeaveNotice ¶
type TablePlayerLeaveReq ¶
type TablePlayerLeaveReq struct {
Leavetype int32 //离开类型
}
type TablePlayerLeaveRes ¶
type UserPropChange ¶
type Useronlinestatus ¶
type VipRechargeTimesDef ¶
type WriteLogReq ¶
type WriteLogReq struct {
LogTxt string
}
Click to show internal directories.
Click to hide internal directories.