You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
228 lines
6.5 KiB
228 lines
6.5 KiB
4 months ago
|
package game
|
||
|
|
||
|
import (
|
||
|
"github.com/gogf/gf/v2/frame/g"
|
||
|
)
|
||
|
|
||
|
type GetGameUpdateUrlReq struct {
|
||
|
g.Meta `path:"/updateUrl/get" tags:"外部接口" method:"get" summary:"强更地址"`
|
||
|
Channel string `p:"channel"`
|
||
|
}
|
||
|
|
||
|
type GetGameUpdateUrlRes struct {
|
||
|
g.Meta `mime:"application/json"`
|
||
|
Url string `json:"url"`
|
||
|
}
|
||
|
|
||
|
/*v:"required#版本不能为空"*/
|
||
|
|
||
|
type GetGameLoginUrlReq struct {
|
||
|
g.Meta `path:"/loginUrl/get" tags:"外部接口" method:"get" summary:"登录地址"`
|
||
|
Account string `p:"account" `
|
||
|
Channel string `p:"channel" `
|
||
|
Version string `p:"version" ` // 旧版本使用
|
||
|
VersionName string `p:"versionName" ` // 新版新增
|
||
|
VersionCode string `p:"versionCode" `
|
||
|
}
|
||
|
|
||
|
type LoginUrlData struct {
|
||
|
Id int `json:"server_id" description:"服务器编号"`
|
||
|
Host string `json:"host" description:""`
|
||
|
Port int `json:"port" description:""`
|
||
|
State int `json:"state" description:"服务器状态,1-正常,2-维护,3-白名单ip优先+渠道,4-黑名单渠道优先+ip白名单"`
|
||
|
|
||
|
Area int `json:"area" description:"服务器区服"`
|
||
|
Name string `json:"name" description:"服务器名称"`
|
||
|
Difficulty int `json:"difficulty" description:"难度标识"`
|
||
|
Recommend int `json:"recommend" description:"推荐标识,1-推荐" `
|
||
|
|
||
|
Last int `json:"last" description:"上次登录标识,1-登录"`
|
||
|
Scale int `json:"scale" description:"玩家规模等级"`
|
||
|
AccountName string `json:"accountName" description:"玩家名称"`
|
||
|
}
|
||
|
|
||
|
type GetGameLoginUrlRes struct {
|
||
|
g.Meta `mime:"application/json"`
|
||
|
UrlStr []LoginUrlData `json:"serverList"`
|
||
|
}
|
||
|
|
||
|
type GetGameCCDReq struct {
|
||
|
g.Meta `path:"/ccd/get" tags:"外部接口" method:"post" summary:"登录地址"`
|
||
|
ChannelType string `p:"channelType"`
|
||
|
Platform string `p:"platform"`
|
||
|
VersionName string `p:"versionName"`
|
||
|
HotfixVersion string `p:"hotfixVersion"`
|
||
|
VersionCode string `p:"versionCode"`
|
||
|
Version string `p:"version"`
|
||
|
}
|
||
|
|
||
|
type GetGameCCDRes struct {
|
||
|
g.Meta `mime:"application/json"`
|
||
|
Url string `json:"url"`
|
||
|
Version string `json:"version"`
|
||
|
AuditMode int32 `json:"auditMode"`
|
||
|
EnableHotfix int32 `json:"enableHotfix"`
|
||
|
EnableAccountLogin int32 `json:"enableAccountLogin"`
|
||
|
}
|
||
|
|
||
|
type GetGameCCD1Req struct {
|
||
|
g.Meta `path:"/ccd1/get" tags:"外部接口" method:"post" summary:"登录地址"`
|
||
|
ChannelType string `p:"channelType"`
|
||
|
Platform string `p:"platform"`
|
||
|
VersionName string `p:"versionName"`
|
||
|
HotfixVersion string `p:"hotfixVersion"`
|
||
|
VersionCode string `p:"versionCode"`
|
||
|
Version string `p:"version"`
|
||
|
}
|
||
|
|
||
|
type GetGameCCD1Res struct {
|
||
|
g.Meta `mime:"application/json"`
|
||
|
Version string `json:"version"`
|
||
|
}
|
||
|
|
||
|
type GetOutIdReq struct {
|
||
|
g.Meta `path:"/outId/get" tags:"外部接口" method:"get" summary:"获取uid"`
|
||
|
Uid int64 `p:"uid"`
|
||
|
}
|
||
|
|
||
|
type GetOutIdRes struct {
|
||
|
g.Meta `mime:"application/json"`
|
||
|
Id int64 `json:"publicId"`
|
||
|
}
|
||
|
|
||
|
type LoginOutReq struct {
|
||
|
g.Meta `path:"/loginOut" tags:"外部接口" method:"post" summary:"添加登录登出记录"`
|
||
|
Uid int64 `p:"uid"`
|
||
|
State int `p:"state"`
|
||
|
Day int `p:"day"`
|
||
|
GameTime int `p:"gameTime"`
|
||
|
Scale int `p:"scale"`
|
||
|
VillagerNum int `p:"villagerNum"`
|
||
|
Prosperity int `p:"prosperity"`
|
||
|
Copper int `p:"copper"`
|
||
|
GoldIngot int `p:"goldIngot"`
|
||
|
BaseFood int `p:"baseFood"`
|
||
|
Server int `p:"serverId"`
|
||
|
Name string `p:"valleyName"`
|
||
|
}
|
||
|
|
||
|
type LoginOutRes struct {
|
||
|
g.Meta `mime:"application/json"`
|
||
|
}
|
||
|
|
||
|
type RegisterReq struct {
|
||
|
g.Meta `path:"/register" tags:"外部接口" method:"post" summary:"添加注册记录"`
|
||
|
Account string `p:"account"`
|
||
|
Uid int64 `p:"uid"`
|
||
|
CreateType int `p:"createType"`
|
||
|
Platform int `p:"platform"`
|
||
|
Channel string `p:"channel"`
|
||
|
Server int `p:"server"`
|
||
|
OAID string `p:"OAID"`
|
||
|
}
|
||
|
|
||
|
type RegisterRes struct {
|
||
|
g.Meta `mime:"application/json"`
|
||
|
}
|
||
|
|
||
|
type UnitChangeNameReq struct {
|
||
|
g.Meta `path:"/unitChangeName" tags:"外部接口" method:"post" summary:"修改村庄名称"`
|
||
|
Uid int64 `p:"uid"`
|
||
|
Server int `p:"server"`
|
||
|
Name string `p:"name"`
|
||
|
}
|
||
|
|
||
|
type UnitChangeNameRes struct {
|
||
|
g.Meta `mime:"application/json"`
|
||
|
}
|
||
|
|
||
|
type ItemRecordReq struct {
|
||
|
g.Meta `path:"/itemRecord" tags:"外部接口" method:"post" summary:"添加物品流向记录"`
|
||
|
Uid int64 `p:"uid"`
|
||
|
ItemId int32 `p:"itemId"`
|
||
|
Num int32 `p:"num"`
|
||
|
Way string `p:"way"`
|
||
|
State int32 `p:"state"`
|
||
|
Server int `p:"server"`
|
||
|
}
|
||
|
|
||
|
type ItemRecordRes struct {
|
||
|
g.Meta `mime:"application/json"`
|
||
|
}
|
||
|
|
||
|
type ShopRecordReq struct {
|
||
|
g.Meta `path:"/shopRecord" tags:"外部接口" method:"post" summary:"添加商城流向记录"`
|
||
|
Uid int64 `p:"uid"`
|
||
|
ItemId int `p:"itemId"`
|
||
|
Price int `p:"price"`
|
||
|
Num int32 `p:"num"`
|
||
|
}
|
||
|
|
||
|
type ShopRecordRes struct {
|
||
|
g.Meta `mime:"application/json"`
|
||
|
}
|
||
|
|
||
|
type ReConfigServerReq struct {
|
||
|
g.Meta `path:"/reloadServer" tags:"外部接口" method:"get" summary:"重置服务器列表"`
|
||
|
}
|
||
|
|
||
|
type ReConfigServerRes struct {
|
||
|
g.Meta `mime:"application/json"`
|
||
|
}
|
||
|
|
||
|
type GetPostsReq struct {
|
||
|
g.Meta `path:"/getPosts" tags:"外部接口" method:"get" summary:"重置服务器列表"`
|
||
|
}
|
||
|
|
||
|
type GetPostsRes struct {
|
||
|
g.Meta `mime:"application/json"`
|
||
|
List []map[string]interface{} `json:"list"`
|
||
|
}
|
||
|
|
||
|
type AddOutCCDReq struct {
|
||
|
g.Meta `path:"/outCcd/addCCD" tags:"外部接口" method:"post" summary:"添加热更地址"`
|
||
|
Platform string `p:"platform"`
|
||
|
ChannelType string `p:"channelType"`
|
||
|
VersionName string `p:"versionName"`
|
||
|
VersionCode string `p:"versionCode"`
|
||
|
Ip string `p:"ip"`
|
||
|
HotfixVersion string `p:"hotfixVersion"`
|
||
|
State uint `p:"state"`
|
||
|
Url string `p:"url"`
|
||
|
}
|
||
|
|
||
|
type AddOutCCDRes struct {
|
||
|
}
|
||
|
|
||
|
type GetAuditModeReq struct {
|
||
|
g.Meta `path:"/out/auditMode" tags:"外部接口" method:"get" summary:"审核模式"`
|
||
|
Channel string `p:"channel"`
|
||
|
}
|
||
|
|
||
|
type GetAuditModeRes struct {
|
||
|
g.Meta `mime:"application/json"`
|
||
|
AuditMode int64 `json:"auditMode"`
|
||
|
}
|
||
|
|
||
|
type SetOpenIdReq struct {
|
||
|
g.Meta `path:"/setOpenId" tags:"外部接口" method:"get" summary:"先行服白名单"`
|
||
|
Filename string `p:"filename"`
|
||
|
OpenId string `p:"openId"`
|
||
|
InitUnit int `p:"initUnit"`
|
||
|
}
|
||
|
|
||
|
type SetOpenIdRes struct {
|
||
|
g.Meta `mime:"application/json"`
|
||
|
}
|
||
|
|
||
|
type GetOpenIdReq struct {
|
||
|
g.Meta `path:"/getOpenId" tags:"外部接口" method:"get" summary:"先行服白名单"`
|
||
|
Filename string `p:"filename"`
|
||
|
OpenId string `p:"openId"`
|
||
|
}
|
||
|
|
||
|
type GetOpenIdRes struct {
|
||
|
g.Meta `mime:"application/json"`
|
||
|
State int `json:"state"`
|
||
|
}
|