Documentation
¶
Index ¶
- Constants
- func GameRpcConnection(remoteIp string) (LiquidRpc.GameAdapterClient, error)
- type CmdAccount
- type CmdAccountResponse
- type CmdAuth
- type CmdAuthResponse
- type CmdBind
- type CmdCommand
- type CmdCommandResponse
- type CmdRegister
- type CmdSignedBody
- type GameRequest
- type GameSystem
- func (gameSystem *GameSystem) Register(operator string, f func(string, IGameRequest) interface{})
- func (gameSystem *GameSystem) RegisterDirect(operator string, f func(string, IGameRequest) interface{})
- func (gameSystem *GameSystem) RegisterHttp(operator string, f func(IGameRequest) interface{})
- func (gameSystem *GameSystem) RunCommand(data *CmdCommand) interface{}
- func (gameSystem *GameSystem) RunDirectCommand(data *CmdCommand) interface{}
- func (gameSystem *GameSystem) RunHttpCommand(data *CmdCommand) interface{}
- func (gameSystem *GameSystem) RunRpcCommand(data *LiquidRpc.ReqCmd) interface{}
- type IGameRequest
- type IGameSystem
- type ILiquidServer
- type IMemberSystem
- type LiquidServer
- func (server *LiquidServer) ConnectCacheDbService(config *Settings.CacheDbConf)
- func (server *LiquidServer) ConnectDocDbService(config *Settings.DocDbConf)
- func (server *LiquidServer) ConnectMsgQueueService(config *Settings.AMQPConf)
- func (server *LiquidServer) ConnectRDbService(config *Settings.RDBConf)
- func (server *LiquidServer) EnsureLiquidAdminIndexes()
- func (server *LiquidServer) EnsureLiquidMemberIndexes()
- func (server *LiquidServer) EnsureLiquidUserIndexes()
- func (server *LiquidServer) GenerateKey()
- func (server *LiquidServer) GetCacheDb() *Database.CacheDB
- func (server *LiquidServer) GetDocColl(collection string) *mongo.Collection
- func (server *LiquidServer) GetDocCollWithDb(dbName, collection string) *mongo.Collection
- func (server *LiquidServer) GetDocDb() *Database.DocDB
- func (server *LiquidServer) GetGameFeature(GameName string) IGameSystem
- func (server *LiquidServer) GetGameRpcConnection() LiquidRpc.GameAdapterClient
- func (server *LiquidServer) GetKey() string
- func (server *LiquidServer) GetKeyStatic() string
- func (server *LiquidServer) GetLiquidAdminCol() *mongo.Collection
- func (server *LiquidServer) GetLiquidMemberCol() *mongo.Collection
- func (server *LiquidServer) GetLiquidUserCol() *mongo.Collection
- func (server *LiquidServer) GetLiquidUserDataCol() *mongo.Collection
- func (server *LiquidServer) GetMemberSystem(memberType string) IMemberSystem
- func (server *LiquidServer) GetMsgQueueV0() *MsgQueue.AMQPv0
- func (server *LiquidServer) GetMsgQueueV1() *MsgQueue.AMQPv1
- func (server *LiquidServer) GetRdb() *Database.RDB
- func (server *LiquidServer) GetRpcTrafficEnabled() bool
- func (server *LiquidServer) InitCodenameKey()
- func (server *LiquidServer) InitRpcTraffic(conf *Settings.AppConf)
- func (server *LiquidServer) InitializeSystemDocIndexes()
- func (server *LiquidServer) RegisterGameFeature(GameName string, GameInstance IGameSystem) bool
- func (server *LiquidServer) RegisterMember(memberType string, MemberInstance IMemberSystem) bool
- func (server *LiquidServer) SetCodeName(codename string)
- type RpcFeature
Constants ¶
View Source
const ColNameLiquidAdmin string = "LIQUIDAdmin"
View Source
const ColNameLiquidMember string = "LIQUIDMember"
View Source
const ColNameLiquidUser string = "LIQUIDUser"
View Source
const ColNameLiquidUserData string = "LIQUIDUserData"
Variables ¶
This section is empty.
Functions ¶
func GameRpcConnection ¶
func GameRpcConnection(remoteIp string) (LiquidRpc.GameAdapterClient, error)
Types ¶
type CmdAccount ¶
type CmdAccount struct {
FromType string `json:"from_type" default:""`
FromId string `json:"from_id" default:""`
FromToken string `json:"from_token" default:""`
Platform string `json:"platform" default:"main"`
ExtraData interface{} `json:"extra_data" default:""`
}
Login, Verify
type CmdAccountResponse ¶
type CmdAuth ¶
type CmdAuth struct {
AutoId *string `json:"auto_id" bson:"auto_id"`
InviteCode *string `json:"invite_code" bson:"invite_code"`
Platform *string `json:"platform" bson:"platform"`
}
Auth
type CmdAuthResponse ¶
type CmdBind ¶
type CmdBind struct {
AutoId string `json:"auto_id" bson:"auto_id"`
InviteCode string `json:"invite_code" bson:"invite_code"`
FromId string `json:"from_id" bson:"from_id"` //(str)third_party id or device id
FromToken string `json:"from_token" bson:"from_token"` // (str)third_party token
FromType string `json:"from_type" bson:"from_type"` // (str)third_party name
}
Bind
type CmdCommand ¶
type CmdCommand struct {
LiquidId *string `json:"liquid_id" bson:"liquid_id"`
LiquidToken *string `json:"liquid_token" bson:"liquid_token"`
Platform *string `json:"platform" bson:"platform"`
CmdId *string `json:"cmd_id"`
CmdSn *string `json:"cmd_sn"`
CmdName *string `json:"cmd_name"`
CmdData interface{} `json:"cmd_data"`
}
Command
type CmdCommandResponse ¶
type CmdCommandResponse struct {
CmdData interface{} `json:"cmd_data"`
CmdSn *string `json:"cmd_sn"`
}
type CmdRegister ¶
type CmdRegister struct {
FromType string `json:"from_type"`
Account string `json:"account"`
Password string `json:"password"`
ExtraData interface{} `json:"extra_data" default:""`
}
Register
type CmdSignedBody ¶
Middleware
type GameRequest ¶
type GameRequest struct {
CmdData interface{}
}
func (*GameRequest) Get ¶
func (gameRequest *GameRequest) Get(key string) interface{}
func (*GameRequest) Raw ¶
func (gameRequest *GameRequest) Raw() interface{}
func (*GameRequest) ToStruct ¶
func (gameRequest *GameRequest) ToStruct(target interface{}, tag string) error
type GameSystem ¶
type GameSystem struct {
// contains filtered or unexported fields
}
func (*GameSystem) Register ¶
func (gameSystem *GameSystem) Register(operator string, f func(string, IGameRequest) interface{})
func (*GameSystem) RegisterDirect ¶
func (gameSystem *GameSystem) RegisterDirect(operator string, f func(string, IGameRequest) interface{})
func (*GameSystem) RegisterHttp ¶
func (gameSystem *GameSystem) RegisterHttp(operator string, f func(IGameRequest) interface{})
func (*GameSystem) RunCommand ¶
func (gameSystem *GameSystem) RunCommand(data *CmdCommand) interface{}
func (*GameSystem) RunDirectCommand ¶
func (gameSystem *GameSystem) RunDirectCommand(data *CmdCommand) interface{}
func (*GameSystem) RunHttpCommand ¶
func (gameSystem *GameSystem) RunHttpCommand(data *CmdCommand) interface{}
func (*GameSystem) RunRpcCommand ¶
func (gameSystem *GameSystem) RunRpcCommand(data *LiquidRpc.ReqCmd) interface{}
type IGameRequest ¶
type IGameSystem ¶
type IGameSystem interface {
RunCommand(*CmdCommand) interface{}
RunDirectCommand(*CmdCommand) interface{}
RunHttpCommand(*CmdCommand) interface{}
RunRpcCommand(cmd *LiquidRpc.ReqCmd) interface{}
}
type ILiquidServer ¶
type ILiquidServer interface {
}
type IMemberSystem ¶
type LiquidServer ¶
type LiquidServer struct {
CodeName string
LiquidKey string
LiquidKeyUpdate time.Time
TokenExpireTime int
// contains filtered or unexported fields
}
func GetServer ¶
func GetServer() *LiquidServer
func (*LiquidServer) ConnectCacheDbService ¶
func (server *LiquidServer) ConnectCacheDbService(config *Settings.CacheDbConf)
func (*LiquidServer) ConnectDocDbService ¶
func (server *LiquidServer) ConnectDocDbService(config *Settings.DocDbConf)
func (*LiquidServer) ConnectMsgQueueService ¶
func (server *LiquidServer) ConnectMsgQueueService(config *Settings.AMQPConf)
func (*LiquidServer) ConnectRDbService ¶
func (server *LiquidServer) ConnectRDbService(config *Settings.RDBConf)
func (*LiquidServer) EnsureLiquidAdminIndexes ¶
func (server *LiquidServer) EnsureLiquidAdminIndexes()
func (*LiquidServer) EnsureLiquidMemberIndexes ¶
func (server *LiquidServer) EnsureLiquidMemberIndexes()
func (*LiquidServer) EnsureLiquidUserIndexes ¶
func (server *LiquidServer) EnsureLiquidUserIndexes()
func (*LiquidServer) GenerateKey ¶
func (server *LiquidServer) GenerateKey()
func (*LiquidServer) GetCacheDb ¶
func (server *LiquidServer) GetCacheDb() *Database.CacheDB
func (*LiquidServer) GetDocColl ¶
func (server *LiquidServer) GetDocColl(collection string) *mongo.Collection
func (*LiquidServer) GetDocCollWithDb ¶
func (server *LiquidServer) GetDocCollWithDb(dbName, collection string) *mongo.Collection
func (*LiquidServer) GetDocDb ¶
func (server *LiquidServer) GetDocDb() *Database.DocDB
func (*LiquidServer) GetGameFeature ¶
func (server *LiquidServer) GetGameFeature(GameName string) IGameSystem
func (*LiquidServer) GetGameRpcConnection ¶
func (server *LiquidServer) GetGameRpcConnection() LiquidRpc.GameAdapterClient
func (*LiquidServer) GetKey ¶
func (server *LiquidServer) GetKey() string
func (*LiquidServer) GetKeyStatic ¶
func (server *LiquidServer) GetKeyStatic() string
func (*LiquidServer) GetLiquidAdminCol ¶
func (server *LiquidServer) GetLiquidAdminCol() *mongo.Collection
func (*LiquidServer) GetLiquidMemberCol ¶
func (server *LiquidServer) GetLiquidMemberCol() *mongo.Collection
func (*LiquidServer) GetLiquidUserCol ¶
func (server *LiquidServer) GetLiquidUserCol() *mongo.Collection
func (*LiquidServer) GetLiquidUserDataCol ¶
func (server *LiquidServer) GetLiquidUserDataCol() *mongo.Collection
func (*LiquidServer) GetMemberSystem ¶
func (server *LiquidServer) GetMemberSystem(memberType string) IMemberSystem
func (*LiquidServer) GetMsgQueueV0 ¶
func (server *LiquidServer) GetMsgQueueV0() *MsgQueue.AMQPv0
func (*LiquidServer) GetMsgQueueV1 ¶
func (server *LiquidServer) GetMsgQueueV1() *MsgQueue.AMQPv1
func (*LiquidServer) GetRdb ¶
func (server *LiquidServer) GetRdb() *Database.RDB
func (*LiquidServer) GetRpcTrafficEnabled ¶
func (server *LiquidServer) GetRpcTrafficEnabled() bool
func (*LiquidServer) InitCodenameKey ¶
func (server *LiquidServer) InitCodenameKey()
func (*LiquidServer) InitRpcTraffic ¶
func (server *LiquidServer) InitRpcTraffic(conf *Settings.AppConf)
func (*LiquidServer) InitializeSystemDocIndexes ¶
func (server *LiquidServer) InitializeSystemDocIndexes()
func (*LiquidServer) RegisterGameFeature ¶
func (server *LiquidServer) RegisterGameFeature(GameName string, GameInstance IGameSystem) bool
func (*LiquidServer) RegisterMember ¶
func (server *LiquidServer) RegisterMember(memberType string, MemberInstance IMemberSystem) bool
func (*LiquidServer) SetCodeName ¶
func (server *LiquidServer) SetCodeName(codename string)
Click to show internal directories.
Click to hide internal directories.