ecs/proto/old/internal_gate.go
2025-06-04 18:17:39 +08:00

153 lines
3.5 KiB
Go

package old
import (
"ecs/proto"
json "github.com/json-iterator/go"
)
type GeteSetting struct {
Version string `json:"version,omitempty"`
Title string `json:"title,omitempty"`
Content string `json:"content,omitempty"`
LoginClosed bool `json:"loginClosed,omitempty"`
Offline bool `json:"offline,omitempty"`
TimedClose bool `json:"timedClose,omitempty"`
CloseTime int64 `json:"closeTime,omitempty"`
ClosedList []uint32 `json:"closedList,omitempty"`
WhiteList []uint64 `json:"whiteList,omitempty"`
}
type MsgGateSettingGetReq struct {
}
type MsgGateSettingGetAck struct {
*GeteSetting
}
type MsgGateSettingSaveReq struct {
*GeteSetting
}
type MsgGateSettingSaveAck struct {
}
//type MsgGateLoginReq struct {
// *UserOrigin
// *UserAuth
//}
type MsgGateThirdLoginReq struct {
*proto.UserOrigin
*proto.UserThird
}
//type MsgGateLoginAck struct {
// Token string `json:"token"`
// Recent uint32 `json:"recent"`
//}
type MsgTokenVerifyReq struct {
Token string `json:"token"`
ServerId uint32 `json:"serverId"`
}
type MsgTokenVerifyAck struct {
UserId uint64 `json:"userId"`
Platform uint32 `json:"platform"`
Channel uint32 `json:"channel"`
Username string `json:"username"`
CreateTime int64 `json:"createTime"`
ThirdInfo proto.Object `json:"thirdInfo,omitempty"`
}
type MsgUserQueryReq struct {
PageNo uint32 `json:"pageNo"`
PageSize uint32 `json:"pageSize"`
Channel uint32 `json:"channel,omitempty"`
UserId uint64 `json:"userId,omitempty"`
}
type User struct {
Id string `json:"id"`
UserId uint64 `json:"userId"`
Channel uint32 `json:"channel"`
Username string `json:"username"`
CreateTime int64 `json:"createTime"`
RecentServer string `json:"recentServer"`
BanLogin bool `json:"banLogin"`
BanLoginTime int64 `json:"banLoginTime"`
ThirdInfo json.RawMessage `json:"thirdInfo,omitempty"`
}
type MsgUserQueryAck struct {
Total uint32 `json:"total"`
List []*User `json:"list"`
}
type MsgUserOperateReq struct {
UserId string `json:"userId"`
OperateType uint32 `json:"operateType"` //1.ban,2.unban,3.kick,4.reset-password
OperateArg string `json:"operation"` //banning time
}
type MsgUserOperateAck struct {
}
type Cdkey struct {
Channel uint32 `json:"channel"`
Key string `json:"key"`
Expiration int64 `json:"expiration"`
ItemId []uint32 `json:"itemId"`
ItemNum []uint32 `json:"itemNum"`
}
type MsgCdkeyGetReq struct {
Key string `json:"key"`
}
type MsgCdkeyGetAck struct {
Cdkey *Cdkey `json:"cdkey"`
}
type MsgCdkeyListReq struct {
PageNo uint32 `json:"pageNo"`
PageSize uint32 `json:"pageSize"`
Channel uint32 `json:"channel,omitempty"`
}
type MsgCdkeyListAck struct {
Total uint32 `json:"total"`
List []*Cdkey `json:"list"`
}
type MsgCdkeyAddReq struct {
Channel uint32 `json:"channel"`
Key string `json:"key"`
ValidDays int64 `json:"validDays"`
ItemId []uint32 `json:"itemId"`
ItemNum []uint32 `json:"itemNum"`
}
type MsgCdkeyAddAck struct {
Cdkey *Cdkey `json:"cdKey"`
}
type MsgCdkeyGenerateReq struct {
Channel uint32 `json:"channel"`
Count uint32 `json:"count"`
ValidDays int64 `json:"validDays"`
ItemId []uint32 `json:"itemId"`
ItemNum []uint32 `json:"itemNum"`
}
type MsgCdkeyGenerateAck struct {
List []*Cdkey `json:"list"`
}
type MsgCdkeyDeleteReq struct {
Keys []string `json:"keys"`
}
type MsgCdkeyDeleteAck struct {
}