Documentation ¶
Index ¶
- Constants
- func Init()
- type ConfigDocument
- type DBObject
- type GamServerSessionDocument
- type GamServerSessionObject
- func (object *GamServerSessionObject) ForEach(callback func(document *GamServerSessionDocument))
- func (object *GamServerSessionObject) GetById(id int64) (error, *GamServerSessionDocument)
- func (object *GamServerSessionObject) Init(dbName, collectionName string)
- func (object *GamServerSessionObject) UpsertWithId(id int64, update interface{}) error
- type IdDocument
- type ListDocument
- type ListObject
- type LuckyStarDocument
- type LuckyStarObject
- type SCNumDocument
- type ServerListDocument
- type ServerListObject
- func (object *ServerListObject) ForEach(callback func(document *ServerListDocument))
- func (object *ServerListObject) GetServerInfo(sid int64) *ServerListDocument
- func (object *ServerListObject) Init(dbName, collectionName string)
- func (object *ServerListObject) UpsertServerInfoWithId(id int64, update interface{}) error
- type ServerWeight
- type ServerWeightDocument
- type ServerWeightObject
- type StrongestCommanderDocument
- type StrongestCommanderObject
- func (object *StrongestCommanderObject) ForEach(callback func(document *StrongestCommanderDocument))
- func (object *StrongestCommanderObject) GetById(id uint32) (error, *StrongestCommanderDocument)
- func (object *StrongestCommanderObject) GetNextTBNum() (error, uint32)
- func (object *StrongestCommanderObject) Init(dbName, collectionName string)
- func (object *StrongestCommanderObject) UpsertWithId(id uint32, update interface{}) error
- type TBNumDocument
- type TransferBattleDocument
- type TransferBattleObject
- func (object *TransferBattleObject) ForEach(callback func(document *TransferBattleDocument))
- func (object *TransferBattleObject) GetById(id uint32) (error, *TransferBattleDocument)
- func (object *TransferBattleObject) GetNextTBNum() (error, uint32)
- func (object *TransferBattleObject) Init(dbName, collectionName string)
- func (object *TransferBattleObject) UpsertWithId(id uint32, update interface{}) error
- type UserServerDocument
- type UserServerObject
Constants ¶
View Source
const ( ServerListCollectionName = "server_list" ServerWeightCollectionName = "server_weight" BlackListCollectionName = "black_list" WhiteListCollectionName = "white_list" GameServerSessionCollectionName = "gs_session" UserServerCollectionName = "uid_sid" LuckyStarCollectionName = "lucky_star" TransferBattleCollectionName = "transferbattle" StrongestCommanderCollectionName = "strongest_commander" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GamServerSessionDocument ¶
type GamServerSessionDocument struct { Sid int64 "_id" ExpireTime time.Time "expire_time" IP string "ip" Port string "port" }
GameServerSession
type GamServerSessionObject ¶
type GamServerSessionObject struct { DBObject // contains filtered or unexported fields }
var (
GamServerSession *GamServerSessionObject
)
func (*GamServerSessionObject) ForEach ¶
func (object *GamServerSessionObject) ForEach(callback func(document *GamServerSessionDocument))
迭代名单
func (*GamServerSessionObject) GetById ¶
func (object *GamServerSessionObject) GetById(id int64) (error, *GamServerSessionDocument)
* @brief 通过id获取
func (*GamServerSessionObject) Init ¶
func (object *GamServerSessionObject) Init(dbName, collectionName string)
* @brief 初始化
func (*GamServerSessionObject) UpsertWithId ¶
func (object *GamServerSessionObject) UpsertWithId(id int64, update interface{}) error
更新
type ListDocument ¶
type ListObject ¶
type ListObject struct { DBObject // contains filtered or unexported fields }
var ( BlackListObject *ListObject WhiteListObject *ListObject )
func (*ListObject) Init ¶
func (object *ListObject) Init(dbName, collectionName string)
* @brief 初始化
func (*ListObject) IsInList ¶
func (object *ListObject) IsInList(value string) bool
func (*ListObject) RemoveAll ¶
func (object *ListObject) RemoveAll() error
func (*ListObject) RemoveById ¶
func (object *ListObject) RemoveById(id string) error
func (*ListObject) UpsertListWithId ¶
func (object *ListObject) UpsertListWithId(id string, update interface{}) error
更新
type LuckyStarDocument ¶
type LuckyStarObject ¶
type LuckyStarObject struct { DBObject // contains filtered or unexported fields }
var (
LuckyStarDBObject *LuckyStarObject
)
func (*LuckyStarObject) GetById ¶
func (object *LuckyStarObject) GetById(id int64) (error, *LuckyStarDocument)
func (*LuckyStarObject) Init ¶
func (object *LuckyStarObject) Init(dbName, collectionName string)
* @brief 初始化
func (*LuckyStarObject) UpsertWithId ¶
func (object *LuckyStarObject) UpsertWithId(id int64, update interface{}) error
更新
type SCNumDocument ¶
type ServerListDocument ¶
type ServerListDocument struct { ID int64 "_id" SName string "sname" KingLeague string "king_league" King string "king" ServerInitTime uint64 "protect_time" Status int32 "status" WhiteList int32 "white_list" SAddr string "saddr" KingServerName string "kingservername" KingLeagueSlogan string "kingleagueslogan" CanMoveIn bool "canmovein" RpcAddr string "rpcaddr" StarPioneerPower uint64 "star_pioneer_power" StarPioneerRank int32 "star_pioneer_rank" PowerLimit int32 "power_limit" KingSid uint32 "king_sid" }
type ServerListObject ¶
type ServerListObject struct { DBObject // contains filtered or unexported fields }
var (
ServerListDBObject *ServerListObject
)
func (*ServerListObject) ForEach ¶
func (object *ServerListObject) ForEach(callback func(document *ServerListDocument))
迭代服务器
func (*ServerListObject) GetServerInfo ¶
func (object *ServerListObject) GetServerInfo(sid int64) *ServerListDocument
func (*ServerListObject) Init ¶
func (object *ServerListObject) Init(dbName, collectionName string)
* @brief 初始化
func (*ServerListObject) UpsertServerInfoWithId ¶
func (object *ServerListObject) UpsertServerInfoWithId(id int64, update interface{}) error
更新
type ServerWeight ¶
type ServerWeightDocument ¶
type ServerWeightDocument struct { ID uint64 "_id" Array []ServerWeight "weight_array" }
type ServerWeightObject ¶
type ServerWeightObject struct { DBObject // contains filtered or unexported fields }
var (
ServerWeightObjectInstance *ServerWeightObject
)
func (*ServerWeightObject) GetById ¶
func (object *ServerWeightObject) GetById(id uint64) (error, *ServerWeightDocument)
* @brief 通过id获取
func (*ServerWeightObject) Init ¶
func (object *ServerWeightObject) Init(dbName, collectionName string)
* @brief 初始化
func (*ServerWeightObject) UpsertWithId ¶
func (object *ServerWeightObject) UpsertWithId(id uint64, update interface{}) error
* @brief 更新
type StrongestCommanderObject ¶
type StrongestCommanderObject struct { DBObject // contains filtered or unexported fields }
var (
StrongestCommanderDBObject *StrongestCommanderObject
)
func (*StrongestCommanderObject) ForEach ¶
func (object *StrongestCommanderObject) ForEach(callback func(document *StrongestCommanderDocument))
迭代服务器
func (*StrongestCommanderObject) GetById ¶
func (object *StrongestCommanderObject) GetById(id uint32) (error, *StrongestCommanderDocument)
func (*StrongestCommanderObject) GetNextTBNum ¶
func (object *StrongestCommanderObject) GetNextTBNum() (error, uint32)
得到一个新的全局的Num(直接写进数据库,然后拿出来用)
func (*StrongestCommanderObject) Init ¶
func (object *StrongestCommanderObject) Init(dbName, collectionName string)
* @brief 初始化
func (*StrongestCommanderObject) UpsertWithId ¶
func (object *StrongestCommanderObject) UpsertWithId(id uint32, update interface{}) error
更新
type TBNumDocument ¶
type TransferBattleDocument ¶
type TransferBattleObject ¶
type TransferBattleObject struct { DBObject // contains filtered or unexported fields }
var (
TransferBattleDBObject *TransferBattleObject
)
func (*TransferBattleObject) ForEach ¶
func (object *TransferBattleObject) ForEach(callback func(document *TransferBattleDocument))
迭代服务器
func (*TransferBattleObject) GetById ¶
func (object *TransferBattleObject) GetById(id uint32) (error, *TransferBattleDocument)
func (*TransferBattleObject) GetNextTBNum ¶
func (object *TransferBattleObject) GetNextTBNum() (error, uint32)
得到一个新的全局的Num(直接写进数据库,然后拿出来用)
func (*TransferBattleObject) Init ¶
func (object *TransferBattleObject) Init(dbName, collectionName string)
* @brief 初始化
func (*TransferBattleObject) UpsertWithId ¶
func (object *TransferBattleObject) UpsertWithId(id uint32, update interface{}) error
更新
type UserServerDocument ¶
type UserServerObject ¶
type UserServerObject struct { DBObject // contains filtered or unexported fields }
var (
UserServerDBObject *UserServerObject
)
func (*UserServerObject) GetById ¶
func (object *UserServerObject) GetById(id uint64) (error, *UserServerDocument)
func (*UserServerObject) Init ¶
func (object *UserServerObject) Init(dbName, collectionName string)
* @brief 初始化
func (*UserServerObject) UpsertWithId ¶
func (object *UserServerObject) UpsertWithId(id uint64, update interface{}) error
更新
Click to show internal directories.
Click to hide internal directories.