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 AttackRequest
- type BalanceListRequest
- type BalanceListResponse
- type CardConsume
- type ChannelAndAPPStatsSummary
- type ChannelAndAPPStatsSummaryResponse
- type ChannelAndAppStatsSummaryRequest
- type CheckUserInfoRequest
- type ChooseHeroRequest
- type ChooseHeroResponse
- type ClientConfig
- type ClientInitCompletedRequest
- type CommonResponse
- type CommonStatsItem
- type CreateHeroRequest
- type CreateOrderByAdminRequest
- type CreateOrderRequest
- type CreateOrderSnakeResponse
- type CreateOrderWechatReponse
- type DeleteAppRequest
- type DeleteUserRequest
- type Device
- type DynamicResetMonstersRequest
- type EmptyRequest
- type EncryptTest
- type EncryptTestTest
- type EnterSceneResponse
- type EntitBufferRemoveResponse
- type EntityBufferAddResponse
- type EntityDieResponse
- type ErrorMessage
- type ErrorResponse
- type HeroChangeSceneRequest
- type HeroEnterSceneRequest
- type HeroLeaveSceneRequest
- type HeroMoveRequest
- type HeroMoveStopRequest
- type HeroMoveStopResponse
- type HeroMoveTraceResponse
- type HeroSetViewRangeRequest
- type LifeChangedResponse
- type LoginInfo
- type LoginRequest
- type LoginResponse
- type ManaChangedResponse
- type MonsterAttackResponse
- type MonsterMoveStopResponse
- type MonsterMoveTraceResponse
- type None
- type ObtainBalanceReqeust
- type ObtainBalanceResponse
- type OrderByAdminListRequest
- type OrderInfo
- type OrderListRequest
- type OrderListResponse
- type PayOrderListRequest
- type PayOrderListResponse
- type PlayRecordingVoice
- type QueryInfo
- type QueryUserByAttrRequest
- type QueryUserRequest
- type QueryUserResponse
- type Rank
- type RechargeDetail
- type RechargeListResponse
- type RechargeRequest
- type RecordingVoice
- type RegisterAgentRequest
- type RegisterAppRequest
- type RegisterAppResponse
- type RegisterUserRequest
- type ReleaseSpellResponse
- type Retention
- type RetentionListRequest
- type RetentionLite
- type RetentionResponse
- type SceneInfoItem
- type SceneInfoRequest
- type SceneInfoResponse
- type SnakePayOrderInfo
- type StringMessage
- type StringResponse
- type TargetEnterViewResponse
- type TargetExitViewResponse
- type TestMessage
- type TestRequest
- type TextMessageRequest
- type TextMessageResponse
- type ThirdUserLoginRequest
- type TradeInfo
- type TradeListRequest
- type TradeListResponse
- type UnifyOrderCallbackRequest
- type UpdateAppRequest
- type UserInfo
- type UserInfoRequest
- type UserInfoResponse
- type UserListRequest
- type UserListResponse
- type UserLoginResponse
- type UserSceneId
- type UserStatsInfo
- type UserStatsInfoListRequest
- type UserStatsInfoListResponse
- type UserStatsSummary
- type UserStatsSummaryRequest
- type UserStatsSummaryResponse
- type Version
- type WechatOrderCallbackRequest
- type WechatOrderCallbackResponse
Constants ¶
View Source
const ( // 服务器将多条消息合并进入一条数据发给前端, 需要前端做特殊处理 OnMergeMessages = "OnMergeMessages" //client用的 OnEnterScene = "OnEnterScene" OnEnterView = "OnEnterView" OnExitView = "OnExitView" OnHeroMoveTrace = "OnHeroMoveTrace" OnHeroMoveStopped = "OnHeroMoveStopped" OnMonsterMoveTrace = "OnMonsterMoveTrace" OnMonsterMoveStopped = "OnMonsterMoveStopped" OnMonsterCommonAttack = "OnMonsterCommonAttack" OnReleaseSpell = "OnReleaseSpell" OnLifeChanged = "OnLifeChanged" OnManaChanged = "OnManaChanged" OnEntityDie = "OnEntityDie" OnBufferAdd = "OnBufferAdd" OnBufferRemove = "OnBufferRemove" OnTextMessage = "OnTextMessage" )
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 AttackRequest ¶
type BalanceListRequest ¶
type BalanceListRequest struct {
Uids []string `json:"uids"` //uid列表
}
type BalanceListResponse ¶
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 ChooseHeroRequest ¶
type ChooseHeroResponse ¶
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 CommonResponse ¶
type CommonResponse struct { Code int `json:"code"` //状态码 Data interface{} `json:"data"` //整数状态 }
type CommonStatsItem ¶
type CreateHeroRequest ¶
type CreateOrderByAdminRequest ¶
type CreateOrderByAdminRequest struct { AppID string `json:"appid"` //来自哪个应用的订单 ChannelID string `json:"channel_id"` //来自哪个渠道的订单 Extra string `json:"extra"` //描述信息 Operator string `json:"operator"` //管理员账号 Money int `json:"money"` //金额 Uid int64 `json:"uid"` //用户ID Device Device `json:"device"` //设备信息 }
type CreateOrderRequest ¶
type DeleteAppRequest ¶
type DeleteAppRequest struct {
AppID string `json:"appid"` //应用ID
}
type DeleteUserRequest ¶
type DeleteUserRequest struct {
UID int64 `json:"uid"`
}
type DynamicResetMonstersRequest ¶
type DynamicResetMonstersRequest struct {
Configs []model.SceneMonsterConfig `json:"configs"`
}
type EmptyRequest ¶
type EmptyRequest struct{}
type EncryptTest ¶
type EncryptTestTest ¶
type EncryptTestTest struct {
Result string `json:"result"`
}
type EnterSceneResponse ¶
type EntityBufferAddResponse ¶
type EntityBufferAddResponse struct { ID int64 `json:"id"` EntityType int `json:"entity_type"` Buf *object.BufferObject }
前端需要自行判定id相同的覆盖旧的
type EntityDieResponse ¶
type ErrorMessage ¶
type ErrorResponse ¶
type HeroChangeSceneRequest ¶
type HeroEnterSceneRequest ¶
type HeroLeaveSceneRequest ¶
type HeroMoveRequest ¶
type HeroMoveStopRequest ¶
type HeroMoveStopResponse ¶
type HeroMoveTraceResponse ¶
type HeroSetViewRangeRequest ¶
type LifeChangedResponse ¶
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:"head_url"` FangKa int `json:"fangka"` 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"` HeroList []model.Hero `json:"hero_list"` Debug int `json:"debug"` IsGuest int `json:"is_guest"` }
type ManaChangedResponse ¶
type MonsterAttackResponse ¶
type MonsterMoveStopResponse ¶
type ObtainBalanceReqeust ¶
type ObtainBalanceReqeust struct {
Token string `json:"token"`
}
type ObtainBalanceResponse ¶
type OrderByAdminListRequest ¶
type OrderByAdminListRequest struct { Offset int `json:"offset"` Count int `json:"count"` Start int64 `json:"start"` //时间起点 End int64 `json:"end"` //时间终点 Uid int64 `json:"uid"` //用户id OrderId string `json:"order_id"` AppID string `json:"appid"` //来自哪个应用的订单 ChannelID string `json:"channel_id"` //来自哪个渠道的订单 }
OrderByAdminListRequest 由管理员创建的订单列表
type OrderInfo ¶
type OrderInfo struct { OrderId string `json:"order_id"` //订单号 Uid string `json:"uid"` //接收者id AppId string `json:"appid"` //应用id ServerName string `json:"server_name"` //区服名 RoleID string `json:"role_id"` //角色id Extra string `json:"extra"` //额外信息 Imei string `json:"imei"` //imei ProductName string `json:"product_name"` //商品名 PayBy string `json:"pay_by"` //收支类型: alipay, wechat ... ProductCount int `json:"product_count"` //商品数量 Money int `json:"money"` //标价 RealMoney int `json:"real_money"` //实际售价 Status int `json:"status"` // 订单状态 1-创建 2-完成 3-游戏服务器已经确认 CreatedAt int64 `json:"created_at"` //发放时间 }
type OrderListRequest ¶
type OrderListRequest struct { Offset int `json:"offset"` Count int `json:"count"` Status uint8 `json:"status"` Start int64 `json:"start"` //时间起点 End int64 `json:"end"` //时间终点 PayBy string `json:"pay_by"` Uid string `json:"uid"` //用户id OrderID string `json:"order_id"` //订单号 AppID string `json:"appid"` //来自哪个应用的订单 ChannelID string `json:"channel_id"` //来自哪个渠道的订单 }
OrderListRequest 订单列表
type OrderListResponse ¶
type PayOrderListRequest ¶
type PayOrderListRequest struct { Offset int `json:"offset"` Count int `json:"count"` Type int `json:"type"` //查询类型: 1-购买代币 2-消费代币 Start int64 `json:"start"` //时间起点 End int64 `json:"end"` //时间终点 Uid int64 `json:"uid"` //用户id OrderID string `json:"order_id"` //订单号 AppID string `json:"appid"` //来自哪个应用的订单 ChannelID string `json:"channel_id"` //来自哪个渠道的订单 }
PayOrderListRequest 由管理员创建的订单列表
type PayOrderListResponse ¶
type PayOrderListResponse struct { Code int `json:"code"` //状态码 Data []SnakePayOrderInfo `json:"data"` //渠道列表 Total int `json:"total"` //总数量 }
type PlayRecordingVoice ¶
type QueryUserByAttrRequest ¶
type QueryUserByAttrRequest struct {
Attr string `json:"attr"` //属性
}
用属性查询用户
type QueryUserRequest ¶
type QueryUserRequest struct {
Name string `json:"name"` //用户名
}
type QueryUserResponse ¶
type RechargeDetail ¶
type RechargeListResponse ¶
type RechargeListResponse struct { Code int `json:"code"` Recharges []RechargeDetail `json:"recharges"` Total int64 `json:"total"` }
type RechargeRequest ¶
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 ReleaseSpellResponse ¶
type ReleaseSpellResponse struct {
SpellObject *object.SpellObject `json:"spell_object"`
}
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 SceneInfoItem ¶
type SceneInfoRequest ¶
type SceneInfoRequest struct { }
type SceneInfoResponse ¶
type SceneInfoResponse struct {
Scenes []SceneInfoItem `json:"scenes"`
}
type SnakePayOrderInfo ¶
type SnakePayOrderInfo struct { OrderId string `json:"order_id"` //订单号 Uid string `json:"uid"` //接收者id ServerName string `json:"server_name"` //区服名 RoleID string `json:"role_id"` //角色id AppId string `json:"appid"` //应用id ChannelId string `json:"channel_id"` //渠道id Extra string `json:"extra"` //额外信息 Imei string `json:"imei"` //imei ProductName string `json:"product_name"` //商品名 Type int `json:"type"` //收支类型: 1-购买代币 2-消费代币 Money int `json:"money"` //标价 RealMoney int `json:"real_money"` //实际售价 ProductCount int `json:"product_count"` //商品数量 Status int `json:"status"` // 订单状态 1-创建 2-完成 3-游戏服务器已经确认 CreatedAt int64 `json:"created_at"` //发放时间 }
type StringMessage ¶
type StringResponse ¶
type TargetEnterViewResponse ¶
type TargetEnterViewResponse struct { EntityType int `json:"entity_type"` Data interface{} `json:"data"` Buffers []*object.BufferObject `json:"buffers"` }
type TargetExitViewResponse ¶
type TestMessage ¶
type TestRequest ¶
type TextMessageRequest ¶
type TextMessageResponse ¶
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 TradeInfo ¶
type TradeInfo struct { OrderId string `json:"order_id"` //订单号 Uid string `json:"uid"` //snake uid PayPlatformUid string `json:"pay_platform_uid"` //支付平台uid AppId string `json:"appid"` //应用id ChannelId string `json:"channel_id"` //渠道id ProductName string `json:"product_name"` //商品名 PayBy string `json:"pay_by"` //收支类型: alipay, wechat ... ServerName string `json:"server_name"` RoleName string `json:"role_name"` RoleId string `json:"role_id"` Currency string `json:"currency"` ProductCount int `json:"product_count"` //商品数量 Money int `json:"money"` //标价 RealMoney int `json:"real_money"` //实际售价 PayAt int64 `json:"pay_at"` //支付时间 }
type TradeListRequest ¶
type TradeListRequest struct { Offset int `json:"offset"` Count int `json:"count"` Start int64 `json:"start"` //时间起点 End int64 `json:"end"` //时间终点 OrderID string `json:"order_id"` //订单号 AppID string `json:"appid"` //来自哪个应用的订单 ChannelID string `json:"channel_id"` //来自哪个渠道的订单 }
TradeListRequest 交易列表
type TradeListResponse ¶
type UnifyOrderCallbackRequest ¶
type UnifyOrderCallbackRequest struct { PayPlatform string RawRequest interface{} }
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 UserSceneId ¶
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 int `json:"remain_card"` //剩余房卡 }
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"` //总数量 }
type WechatOrderCallbackRequest ¶
type WechatOrderCallbackRequest struct { ReturnMsg string `xml:"return_msg,omitempty"` DeviceInfo string `xml:"device_info,omitempty"` ErrCode string `xml:"err_code,omitempty"` ErrCodeDes string `xml:"err_code_des,omitempty"` Attach string `xml:"attach,omitempty"` CashFeeType string `xml:"cash_fee_type,omitempty"` CouponFee int `xml:"coupon_fee,omitempty"` CouponCount int `xml:"coupon_count,omitempty"` CouponIDDollarN string `xml:"coupon_id_$n,omitempty"` CouponFeeDollarN string `xml:"coupon_fee_$n,omitempty"` ReturnCode string `xml:"return_code"` Appid string `xml:"appid"` MchID string `xml:"mch_id"` Nonce string `xml:"nonce_str"` Sign string `xml:"sign"` ResultCode string `xml:"result_code"` Openid string `xml:"openid"` IsSubscribe string `xml:"is_subscribe"` TradeType string `xml:"trade_type"` BankType string `xml:"bank_type"` TotalFee int `xml:"total_fee"` FeeType string `xml:"fee_type"` CashFee int `xml:"cash_fee"` TransactionID string `xml:"transaction_id"` OutTradeNo string `xml:"out_trade_no"` TimeEnd string `xml:"time_end"` Raw string }
Click to show internal directories.
Click to hide internal directories.