GameDB

package
v1.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 25, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WarCityCollectionName = "war_city"

	DBGolbal = "DBGolbal"

	LeagueCupCollectionName = "LeagueCup"
)

Variables

This section is empty.

Functions

func Initialize

func Initialize()

初始化

Types

type ActivityDocument

type ActivityDocument struct {
	ID       uint32 "_id"
	Activity []byte "activity"
}

type ActivityObject

type ActivityObject struct {
	DBObject
	// contains filtered or unexported fields
}

活动

var (
	Activity *ActivityObject
)

func (*ActivityObject) ForEach

func (object *ActivityObject) ForEach(callback func(document *ActivityDocument))

全局活动表迭代

func (*ActivityObject) Init

func (object *ActivityObject) Init(dbName, activityCollectionName string)

初始化

func (*ActivityObject) UpsertActivityWithId

func (object *ActivityObject) UpsertActivityWithId(id uint32, update interface{}) error

更新

type AirdropDocument

type AirdropDocument struct {
	ID          uint32 "_id"
	AirdropInfo []byte "AirdropInfo"
}

type AirdropObject

type AirdropObject struct {
	DBObject
	AirdropCollectionName string // 上次中奖的玩家列表信息
}

活动

var (
	Airdrop *AirdropObject
)

func (*AirdropObject) GetAirdrop

func (this *AirdropObject) GetAirdrop() (error, *AirdropDocument)

func (*AirdropObject) Init

func (object *AirdropObject) Init(dbName, AirdropCollectionName string)

初始化

func (*AirdropObject) UpsertAirdrop

func (object *AirdropObject) UpsertAirdrop(update interface{}) error

更新

type BattleInfoDocument

type BattleInfoDocument struct {
	Content string "content" //序列化后的ST_BattleInfo_PB
}

type BattleInfoObject

type BattleInfoObject struct {
	DBObject
	// contains filtered or unexported fields
}
var (
	BattleInfo *BattleInfoObject
)

战斗数据暂时不删除,等下个版本和邮件优化一起做,2019-6-4-1.8.5

func (*BattleInfoObject) GetBattleInfoById

func (object *BattleInfoObject) GetBattleInfoById(BIUID int64) (error, *BattleInfoDocument)

获取

func (*BattleInfoObject) Init

func (this *BattleInfoObject) Init(dbName, battleInfoCollectionName string)

初始化

func (*BattleInfoObject) RemoveBattleInfoById

func (this *BattleInfoObject) RemoveBattleInfoById(id int64) error

删除

func (*BattleInfoObject) UpdateBattleInfo

func (this *BattleInfoObject) UpdateBattleInfo(id, update interface{}) error

更新

type BoonCenterObject

type BoonCenterObject struct {
	DBObject
	BoonCenterCollectionName string
}
var (
	BoonCenterInstance *BoonCenterObject
)

func (*BoonCenterObject) ForEach

func (o *BoonCenterObject) ForEach(callback func(doc *BoonConfigDocument))

func (*BoonCenterObject) GetBoonConfigData

func (o *BoonCenterObject) GetBoonConfigData(id uint32) (error, *BoonConfigDocument)

func (*BoonCenterObject) Init

func (o *BoonCenterObject) Init(dbName, boonCenterCollectionName string)

func (*BoonCenterObject) UpsertBoonConfigData

func (o *BoonCenterObject) UpsertBoonConfigData(id, update interface{}) error

type BoonConfigDocument

type BoonConfigDocument struct {
	ID       uint32 "_id"
	Data     []byte "data"
	TimeNode string "time_node"
}

type CardPoolDocument

type CardPoolDocument struct {
	ID           uint32 "_id"
	CardPoolInfo []byte "cardPool_info"
}

type CardPoolObject

type CardPoolObject struct {
	DBObject
	// contains filtered or unexported fields
}

卡池

var (
	CardPool *CardPoolObject
)

func (*CardPoolObject) GetCardPool

func (this *CardPoolObject) GetCardPool() (error, *CardPoolDocument)

func (*CardPoolObject) Init

func (object *CardPoolObject) Init(dbName, cardPoolCollectionName string)

初始化

func (*CardPoolObject) UpsertCardPool

func (object *CardPoolObject) UpsertCardPool(update interface{}) error

更新

type ChapterDocument

type ChapterDocument struct {
	Uid  uint64 "_id"
	Data []byte "data"
}

type ChapterObject

type ChapterObject struct {
	DBObject
	ChapterCollectionName string
}
var (
	ChapterInstance *ChapterObject
)

func (*ChapterObject) GetChapterByUser

func (o *ChapterObject) GetChapterByUser(uid uint64) (error, *ChapterDocument)

func (*ChapterObject) Init

func (o *ChapterObject) Init(dbName, chapterCollectionName string)

func (*ChapterObject) UpsertChapterByUser

func (o *ChapterObject) UpsertChapterByUser(uid uint64, doc interface{}) error

type CharacteristicDocument

type CharacteristicDocument struct {
	UserId             uint64 "_id"
	CharBasic          []byte "basic"
	CharExp            []byte "exp"
	Resource           []byte "resource"
	Building           []byte "building"
	LocalAction        []byte "local_action"
	GlobalAction       []byte "global_action"
	Unit               []byte "unit"
	UnitCount          []byte "unitcount"
	TeamConf           []byte "team_conf"
	Research           []byte "research"
	Mail               []byte "mail"
	Colony             []byte "colony"
	ItemPack           []byte "item_pack"
	Hospital           []byte "hospital"
	LeagueAsset        []byte "league"
	ChatAsset          []byte "chat"
	HeroAsset          []byte "hero"
	BuffAsset          []byte "buff"
	Attribute          []byte "attribute"
	PrisonAsset        []byte "prison"
	LeagueExtra        []byte "league_extra"
	Tips               []byte "tips"
	Vip                []byte "vip"
	Statistics         []byte "statistics"
	Radar              []byte "radar"
	GiftPack           []byte "gift_pack"
	PopUp              []byte "popup"
	UserName           string "user_name"
	Achievement        []byte "achievement"
	Defense            []byte "defense"
	Market             []byte "market"
	MainCityEvent      []byte "main_city_event"
	Telent             []byte "telent"
	Skill              []byte "skill"
	DispatchTask       []byte "dispatch_task"
	Statue             []byte "statue"
	SignIn             []byte "sign_in"
	StrollHeroEvent    []byte "as_stroll_hero_event"
	Settings           []byte "as_settings"
	BeginnerTutorial   []byte "beginner_tutorial"
	Activity           []byte "activity"
	Bookmark           []byte "bookmark"
	MiracleWar         []byte "miraclewar"
	Account            []byte "account"
	LeagueVersion      []byte "leagueversion"
	LeagueBox          []byte "leaguebox"
	BlackMarket        []byte "blackmarket"
	Supply             []byte "supply"
	Challenge          []byte "challenge"
	MapList            []byte "maplist"
	ActivityTask       []byte "activitytask"
	MainCitySkin       []byte "maincityskin"
	UserBoons          []byte "userboons"
	CommanderEquip     []byte "commanderequip"
	FactoryPackage     []byte "factorypackage"
	TakeCard           []byte "takecard"
	Chapters           []byte "chapters"
	CommanderFashion   []byte "commanderfashion"
	SevenDayTask       []byte "sevendaytask"
	KillWildMonster    []byte "killwildmonster"
	NoviceTask         []byte "novicetask"
	LeagueTask         []byte "leaguetask"
	StrongestCommander []byte "strongestcommander"
	ExpeditionShop     []byte "expeditionshop"
	WorldSituation     []byte "worldsituation"
	LoginGift          []byte "logingift"
	PrepareForWar      []byte "prepareforwar"
	LuckyStar          []byte "luckystar"
	OfferGift          []byte "offergift"
	UserServer         []byte "userserver"
	TransferBattle     []byte "transferbattle"
}

type CharacteristicObject

type CharacteristicObject struct {
	DBObject
	// contains filtered or unexported fields
}
var (
	Characteristic *CharacteristicObject
)

func (*CharacteristicObject) Create

func (object *CharacteristicObject) Create(userId uint64) error

* @brief 创建

func (*CharacteristicObject) Delete

func (object *CharacteristicObject) Delete(userId uint64) error

func (*CharacteristicObject) FindUserIdListByName

func (object *CharacteristicObject) FindUserIdListByName(userName string) (error, []uint64)

* @brief 通过用户名模糊搜索

func (*CharacteristicObject) FindUsersByName

func (object *CharacteristicObject) FindUsersByName(userName string, selector bson.M, limit int) (error, []CharacteristicDocument)

func (*CharacteristicObject) ForEach

func (object *CharacteristicObject) ForEach(callback func(document *CharacteristicDocument))

迭代

func (*CharacteristicObject) Get

func (object *CharacteristicObject) Get(userId uint64) (error, *CharacteristicDocument)

* @brief 获取

func (*CharacteristicObject) GetCharCount

func (object *CharacteristicObject) GetCharCount() (error, int32)

* @brief 获取注册玩家数量

func (*CharacteristicObject) Init

func (object *CharacteristicObject) Init(dbName, collectionName string)

* @brief 初始化

func (*CharacteristicObject) Update

func (object *CharacteristicObject) Update(userId uint64, document *CharacteristicDocument) error

* @brief 更新所有

func (*CharacteristicObject) Upsert

func (object *CharacteristicObject) Upsert(userId uint64, document *CharacteristicDocument) error

type CharacteristicSimpleDocument

type CharacteristicSimpleDocument struct {
	UserId   uint64 "_id"
	BaseInfo []byte "baseinfo"
}

type CharacteristicSimpleObject

type CharacteristicSimpleObject struct {
	DBObject
	// contains filtered or unexported fields
}
var (
	CharacteristicSimple *CharacteristicSimpleObject
)

func (*CharacteristicSimpleObject) Create

func (object *CharacteristicSimpleObject) Create(userId uint64) error

* @brief 创建

func (*CharacteristicSimpleObject) Delete

func (object *CharacteristicSimpleObject) Delete(userId uint64) error

func (*CharacteristicSimpleObject) Get

* @brief 获取

func (*CharacteristicSimpleObject) GetCharCount

func (object *CharacteristicSimpleObject) GetCharCount() (error, int32)

* @brief 获取注册玩家数量

func (*CharacteristicSimpleObject) Init

func (object *CharacteristicSimpleObject) Init(dbName, collectionName string)

* @brief 初始化

func (*CharacteristicSimpleObject) Update

func (object *CharacteristicSimpleObject) Update(userId uint64, document *CharacteristicSimpleDocument) error

* @brief 更新所有

func (*CharacteristicSimpleObject) Upsert

func (object *CharacteristicSimpleObject) Upsert(userId uint64, document *CharacteristicSimpleDocument) error

type CompensationDocument

type CompensationDocument struct {
	ID   uint32 "_id"
	Data []byte "data"
}

type CompensationObject

type CompensationObject struct {
	DBObject
	// contains filtered or unexported fields
}
var (
	Compensation *CompensationObject
)

func (*CompensationObject) Delete

func (object *CompensationObject) Delete(id uint32)

func (*CompensationObject) Get

func (*CompensationObject) Init

func (object *CompensationObject) Init(dbName, collectionName string)

初始化

func (*CompensationObject) UpserCompensationByID

func (object *CompensationObject) UpserCompensationByID(id uint32, update interface{}) error

更新

type ConfigDocument

type ConfigDocument struct {
	Id       uint64 "_id"
	ServerId uint32 "server_id"
}

配置

type DBObject

type DBObject struct {
	Config ConfigDocument //配置
	// contains filtered or unexported fields
}

数据库父类

func (*DBObject) Get

func (object *DBObject) Get(collectionName string, query, res interface{}) error

获取

type DB_Golbal

type DB_Golbal struct {
	DBObject
	CollectionName string
}
var (
	Golbal *DB_Golbal

	WorldChannelId = int32(1)
)

func (*DB_Golbal) GetData

func (this *DB_Golbal) GetData() (error, string)

func (*DB_Golbal) GetDataById

func (this *DB_Golbal) GetDataById(id int32) (error, string)

func (*DB_Golbal) GetDataById2

func (this *DB_Golbal) GetDataById2(id int64) (error, *map[string]interface{})

func (*DB_Golbal) Init

func (object *DB_Golbal) Init(dbName, d string)

初始化

func (*DB_Golbal) SetDataById

func (this *DB_Golbal) SetDataById(id int32, d string) error

func (*DB_Golbal) Upsert

func (object *DB_Golbal) Upsert(d string) error

更新

func (*DB_Golbal) Upsert2

func (object *DB_Golbal) Upsert2(d map[string]interface{}) error

type DropActivityRankDocument

type DropActivityRankDocument struct {
	ID   uint32 "_id"
	Rank []byte "rank"
}

type DropActivityRankObject

type DropActivityRankObject struct {
	DBObject
	// contains filtered or unexported fields
}

活动

var (
	DropActivity *DropActivityRankObject
)

func (*DropActivityRankObject) ForEach

func (object *DropActivityRankObject) ForEach(callback func(document *DropActivityRankDocument))

全局活动表迭代

func (*DropActivityRankObject) Init

func (object *DropActivityRankObject) Init(dbName, collectionName string)

初始化

func (*DropActivityRankObject) UpserRankByActivityId

func (object *DropActivityRankObject) UpserRankByActivityId(id uint32, update interface{}) error

更新

type ExpeditionShopDocument

type ExpeditionShopDocument struct {
	ID   uint32 "_id"
	Data []byte "data"
}

type ExpeditionShopObject

type ExpeditionShopObject struct {
	DBObject
	// contains filtered or unexported fields
}
var (
	ExpeditionShop *ExpeditionShopObject
)

func (*ExpeditionShopObject) Get

func (*ExpeditionShopObject) Init

func (object *ExpeditionShopObject) Init(dbName, collectionName string)

初始化

func (*ExpeditionShopObject) UpserExpeditionShopByID

func (object *ExpeditionShopObject) UpserExpeditionShopByID(id uint32, update interface{}) error

更新

type GlobalActionDocument

type GlobalActionDocument struct {
	Id   uint64 "_id"
	Data []byte "data"
}

全局活动文档

func (*GlobalActionDocument) ToPB

转换为PB结构

type GlobalActionDocumentList

type GlobalActionDocumentList []GlobalActionDocument

全局活动文档

type GlobalActionIdDocument

type GlobalActionIdDocument struct {
	Id     uint64 "_id"
	NextId uint32 "next_id"
}

全局活动id文档

type GlobalActionObject

type GlobalActionObject struct {
	DBObject
	// contains filtered or unexported fields
}

全局活动对象

var (
	GlobalAction *GlobalActionObject
)

func (*GlobalActionObject) ForEach

func (object *GlobalActionObject) ForEach(callback func(document *GlobalActionDocument))

迭代

func (*GlobalActionObject) GetGlobalActionId

func (object *GlobalActionObject) GetGlobalActionId() (error, uint64)

获取全局活动id

func (*GlobalActionObject) Init

func (object *GlobalActionObject) Init(dbName, configCollectionName, leagueIdCollectionName, leagueCollectionName string)

初始化

func (*GlobalActionObject) RemoveGlobalAction

func (object *GlobalActionObject) RemoveGlobalAction(id uint64) error

删除全局活动

func (*GlobalActionObject) UpdateGlobalAction

func (object *GlobalActionObject) UpdateGlobalAction(id uint64, content []byte) error

更新全局活动

type HotWorldChatDocument

type HotWorldChatDocument struct {
	ID   uint32 "_id"
	Data []byte "hot_list"
}

世界热本话题文档

type IdDocument

type IdDocument struct {
	Id     uint64 "_id"
	NextId uint32 "next_id"
}

id

type LeagueBattleLogDocument

type LeagueBattleLogDocument struct {
	ID      uint64 "_id"
	Message []byte "data"
}

联盟战斗日志

type LeagueBattleLogObject

type LeagueBattleLogObject struct {
	DBObject
	LeagueBattleLogCollectionName string
}

联盟战斗日志对象

var (
	LeagueBattleLog *LeagueBattleLogObject
)

func (*LeagueBattleLogObject) GetLeagueBattleLogById

func (this *LeagueBattleLogObject) GetLeagueBattleLogById(lid uint64) (error, *LeagueBattleLogDocument)

获取联盟战斗日志

func (*LeagueBattleLogObject) Init

func (object *LeagueBattleLogObject) Init(dbName, LeagueBattleLogCollectionName string)

初始化

func (*LeagueBattleLogObject) RemoveLeagueBattleLog

func (object *LeagueBattleLogObject) RemoveLeagueBattleLog(id uint64) error

删除联盟数据

func (*LeagueBattleLogObject) UpsertLeagueBattleLog

func (object *LeagueBattleLogObject) UpsertLeagueBattleLog(id uint64, update interface{}) error

更新

type LeagueBusinessHistoryDocument

type LeagueBusinessHistoryDocument struct {
	Id   uint64 "_id"
	Data []byte "data"
}

联盟交易历史文档

func (*LeagueBusinessHistoryDocument) ToPB

转换为PB结构

type LeagueBusinessHistoryObject

type LeagueBusinessHistoryObject struct {
	DBObject
	// contains filtered or unexported fields
}

联盟交易历史对象

var (
	LeagueBusinessIncomeHistory  *LeagueBusinessHistoryObject
	LeagueBusinessOutcomeHistory *LeagueBusinessHistoryObject
)

func (*LeagueBusinessHistoryObject) ForEach

func (object *LeagueBusinessHistoryObject) ForEach(callback func(document *LeagueBusinessHistoryDocument))

迭代

func (*LeagueBusinessHistoryObject) GetHistory

func (object *LeagueBusinessHistoryObject) GetHistory(id uint64, callback func(err error, document *LeagueBusinessHistoryDocument))

获取联盟交易历史数据

func (*LeagueBusinessHistoryObject) Init

func (object *LeagueBusinessHistoryObject) Init(dbName, collectionName string)

初始化

func (*LeagueBusinessHistoryObject) UpsertHistory

func (object *LeagueBusinessHistoryObject) UpsertHistory(leagueId uint64, data interface{}) error

添加联盟交易历史数据

type LeagueChatDocument

type LeagueChatDocument struct {
	LeagueID  uint64 "_id"
	ChatTitle []byte "chat_title"
}

联盟聊天文档

type LeagueCityDocument

type LeagueCityDocument struct {
	ID           uint32 "_id"
	ActivityInfo []byte "war_info"
}

type LeagueCityObject

type LeagueCityObject struct {
	DBObject
	LeagueCityCollectionName string //奇迹战
}

活动

var (
	LeagueCityActivity *LeagueCityObject
)

func (*LeagueCityObject) GetLeagueCityActivity

func (this *LeagueCityObject) GetLeagueCityActivity() (error, *LeagueCityDocument)

func (*LeagueCityObject) Init

func (object *LeagueCityObject) Init(dbName, miracleWarCollectionName string)

初始化

func (*LeagueCityObject) UpsertLeagueCityActivity

func (object *LeagueCityObject) UpsertLeagueCityActivity(update interface{}) error

更新

type LeagueCupDocument

type LeagueCupDocument struct {
	ID   uint64 "_id"
	Data []byte "data"
}

type LeagueCupObject

type LeagueCupObject struct {
	DBObject
	TableName string
}

活动

var (
	LeagueCup *LeagueCupObject
)

func (*LeagueCupObject) Get

func (this *LeagueCupObject) Get(lid uint64) (error, *LeagueCupDocument)

func (*LeagueCupObject) Load

func (object *LeagueCupObject) Load(callback func(document *LeagueCupDocument))

迭代

func (*LeagueCupObject) Upsert

func (object *LeagueCupObject) Upsert(id uint64, update interface{}) error

更新

type LeagueDocument

type LeagueDocument struct {
	Id   uint64 "_id"
	Data []byte "data"
}

联盟数据文档

func (*LeagueDocument) ToPB

转换为PB结构

type LeagueIdDocument

type LeagueIdDocument struct {
	Id     uint64 "_id"
	NextId uint32 "next_id"
}

联盟id文档

type LeagueObject

type LeagueObject struct {
	DBObject
	// contains filtered or unexported fields
}

联盟对象

var (
	League *LeagueObject
)

func (*LeagueObject) ForEach

func (object *LeagueObject) ForEach(callback func(document *LeagueDocument))

迭代

func (*LeagueObject) GetGlobalLeagueId

func (object *LeagueObject) GetGlobalLeagueId() (error, uint64)

获取全局联盟id

func (*LeagueObject) Init

func (object *LeagueObject) Init(dbName, configCollectionName, leagueIdCollectionName, leagueCollectionName string)

初始化

func (*LeagueObject) RemoveLeagueData

func (object *LeagueObject) RemoveLeagueData(id uint64) error

删除联盟数据

func (*LeagueObject) UpdateLeague

func (object *LeagueObject) UpdateLeague(id uint64, content []byte) error

更新联盟

type MailDocument

type MailDocument struct {
	Id               uint64 "_id"
	Type             uint32 "type"
	TimeStamp        uint64 "timestamp"
	SenderId         uint64 "sender_id"
	ReceiverId       uint64 "receiver_id"
	SenderName       string "sender_name"
	Title            []byte "title"
	Content          []byte "content"
	TitleTips        []byte "title_tips"
	ContentTips      []byte "content_tips"
	TargetId         int32  "target_id"
	OtherId          uint64 "other_id"
	OtherName        string "other_name"
	OtherAvatar      string "other_avatar"
	NPCId            uint64 "npc_id"
	Reward           []byte "reward"
	Detail           []byte "detail"
	Battle           []byte "battle"
	Read             bool   "read"
	Kept             bool   "kept"
	Locked           bool   "locked"
	Removed          bool   "removed"
	ServerId         uint32 "server_id"
	GiftPackId       int32  "gift_pack_id"
	MailSource       int32  "mail_source"
	IsMiracleWarGift bool   "miracle_war_gift"
	TitleID          int32  "title_id"
	RewardSource     int32  "reward_source"
}

邮件文档

type MailIdDocument

type MailIdDocument struct {
	Id     uint64 "_id"
	NextId uint32 "next_id"
}

邮件id

type MailObject

type MailObject struct {
	DBObject
	// contains filtered or unexported fields
}

邮件

var (
	Mail         *MailObject
	EveryOneMail *MailObject
)

func (*MailObject) DeleteById

func (object *MailObject) DeleteById(id uint64) error

func (*MailObject) ForEach

func (object *MailObject) ForEach(callback func(document *MailDocument))

全局邮件表迭代

func (*MailObject) GetGlobalMailId

func (object *MailObject) GetGlobalMailId() (error, uint64)

得到一个新的全局邮件id(直接写进数据库,然后拿出来用)

func (*MailObject) GetMailById

func (object *MailObject) GetMailById(mailId uint64) (error, *MailDocument)

获取邮件详情

func (*MailObject) Init

func (object *MailObject) Init(dbName, configCollectionName, mailIdCollectionName, mailsCollectionName string)

初始化

func (*MailObject) UpsertMailWithId

func (object *MailObject) UpsertMailWithId(id uint64, update interface{}) error

更新

type MiracleWarDocument

type MiracleWarDocument struct {
	ID      uint32 "_id"
	WarInfo []byte "war_info"
	City1   []byte "eastcity"
	City2   []byte "southcity"
	City3   []byte "westcity"
	City4   []byte "northcity"
}

type MiracleWarObject

type MiracleWarObject struct {
	DBObject
	// contains filtered or unexported fields
}

活动

var (
	MiracleWar *MiracleWarObject
)

func (*MiracleWarObject) GetMiracleWar

func (this *MiracleWarObject) GetMiracleWar() (error, *MiracleWarDocument)

func (*MiracleWarObject) Init

func (object *MiracleWarObject) Init(dbName, miracleWarCollectionName string)

初始化

func (*MiracleWarObject) RemoveAll

func (object *MiracleWarObject) RemoveAll() error

func (*MiracleWarObject) UpsertMiracleWar

func (object *MiracleWarObject) UpsertMiracleWar(update interface{}) error

更新

type MonsterAtkCityObject

type MonsterAtkCityObject struct {
	DBObject
	// contains filtered or unexported fields
}

联盟对象

var (
	MstAtk *MonsterAtkCityObject
)

func (*MonsterAtkCityObject) ForEach

func (object *MonsterAtkCityObject) ForEach(callback func(document *MonsterAtkDocument))

迭代

func (*MonsterAtkCityObject) Get

func (*MonsterAtkCityObject) Init

func (object *MonsterAtkCityObject) Init(dbName, leagueCollectionName string)

func (*MonsterAtkCityObject) Remove

func (object *MonsterAtkCityObject) Remove(id uint64) error

func (*MonsterAtkCityObject) RemoveAll

func (object *MonsterAtkCityObject) RemoveAll() error

func (*MonsterAtkCityObject) Update

func (object *MonsterAtkCityObject) Update(id uint64, content []byte) error

type MonsterAtkDocument

type MonsterAtkDocument struct {
	Id   uint64 "_id"
	Data []byte "data"
}

联盟数据文档

func (*MonsterAtkDocument) ToPB

type OfflineUserDocument

type OfflineUserDocument struct {
	ID      uint64 "_id"
	EndTime int64  "endtime"
}

type OfflineUserObject

type OfflineUserObject struct {
	DBObject
	// contains filtered or unexported fields
}

活动

var (
	OfflineUser *OfflineUserObject
)

func (*OfflineUserObject) ForEach

func (object *OfflineUserObject) ForEach(callback func(document *OfflineUserDocument))

全局活动表迭代

func (*OfflineUserObject) Init

func (object *OfflineUserObject) Init(dbName, collectionName string)

初始化

func (*OfflineUserObject) Remove

func (object *OfflineUserObject) Remove(id uint64)

func (*OfflineUserObject) UpsertActivityWithId

func (object *OfflineUserObject) UpsertActivityWithId(id uint64, update interface{}) error

更新

type PrepareForWarDocument

type PrepareForWarDocument struct {
	ID   uint32 "_id"
	Data []byte "data"
}

type PrepareForWarObject

type PrepareForWarObject struct {
	DBObject
	// contains filtered or unexported fields
}
var (
	PrepareForWar *PrepareForWarObject
)

func (*PrepareForWarObject) Get

func (*PrepareForWarObject) Init

func (object *PrepareForWarObject) Init(dbName, collectionName string)

初始化

func (*PrepareForWarObject) UpserPrepareForWar

func (object *PrepareForWarObject) UpserPrepareForWar(id uint32, update interface{}) error

更新

type PrepareForWarRankDocument

type PrepareForWarRankDocument struct {
	ID   uint32 "_id"
	Data []byte "data"
}

type PrepareForWarRankObject

type PrepareForWarRankObject struct {
	DBObject
	// contains filtered or unexported fields
}
var (
	PrepareForWarRank *PrepareForWarRankObject
)

func (*PrepareForWarRankObject) ForEach

func (object *PrepareForWarRankObject) ForEach(callback func(document *PrepareForWarRankDocument))

全局活动表迭代

func (*PrepareForWarRankObject) Init

func (object *PrepareForWarRankObject) Init(dbName, collectionName string)

初始化

func (*PrepareForWarRankObject) RemoveById

func (object *PrepareForWarRankObject) RemoveById(id uint32)

func (*PrepareForWarRankObject) UpserPrepareForWarRank

func (object *PrepareForWarRankObject) UpserPrepareForWarRank(id uint32, update interface{}) error

更新

type PrisonMessageDocument

type PrisonMessageDocument struct {
	ID      uint64 "_id"
	Message []byte "data"
}

监狱留言板

type PrisonMessageObject

type PrisonMessageObject struct {
	DBObject
	// contains filtered or unexported fields
}

监狱留言板对象

var (
	PrisonMessage *PrisonMessageObject
)

func (*PrisonMessageObject) GetPrisonMessageById

func (this *PrisonMessageObject) GetPrisonMessageById(lid uint64) (error, *PrisonMessageDocument)

获取监狱留言板

func (*PrisonMessageObject) Init

func (object *PrisonMessageObject) Init(dbName, prisonMessageCollectionName string)

初始化

func (*PrisonMessageObject) RemovePrisonMessage

func (object *PrisonMessageObject) RemovePrisonMessage(id uint64) error

删除联盟数据

func (*PrisonMessageObject) UpsertPrisonMessage

func (object *PrisonMessageObject) UpsertPrisonMessage(id uint64, update interface{}) error

更新

type RankingDocument

type RankingDocument struct {
	ID    uint64 "_id"
	Value uint64 "value"
}

type RankingDocumentArray

type RankingDocumentArray []RankingDocument

type RankingObject

type RankingObject struct {
	DBObject
	// contains filtered or unexported fields
}
var (
	CommanderKilledRanking      *RankingObject
	CommanderLevelRanking       *RankingObject
	LeagueKilledRanking         *RankingObject
	LeaguePowerRanking          *RankingObject
	MainCityLevelRanking        *RankingObject
	UserPowerRanking            *RankingObject
	BountyRanking               *RankingObject
	CommanderAirShipStarRanking *RankingObject
	WorldSituationLeagueRanking *RankingObject
	HeroKilledRanking           *RankingObject
	GatherRanking               *RankingObject
	MacPlayerRanking            *RankingObject
	MacLeagueRanking            *RankingObject
	Ranking                     = make(map[string]*RankingObject, 0)
)

func (*RankingObject) Delete

func (object *RankingObject) Delete(id uint64) error

func (*RankingObject) ForEach

func (object *RankingObject) ForEach(callback func(document *RankingDocument))

迭代

func (*RankingObject) Init

func (object *RankingObject) Init(dbName, collectionName string)

func (*RankingObject) RemoveAll

func (object *RankingObject) RemoveAll() error

func (*RankingObject) UpsertValue

func (object *RankingObject) UpsertValue(id, value uint64) error

更新

type ReportDocument

type ReportDocument struct {
	ID         string "_id"
	Uid        uint64 "uid"
	TargetUid  uint64 "target_uid"
	ReportType uint32 "type"
	Content    string "content"
	Timestamp  uint64 "timestamp"
}

type ReportObject

type ReportObject struct {
	DBObject
	// contains filtered or unexported fields
}
var (
	Report *ReportObject
)

func (*ReportObject) Init

func (this *ReportObject) Init(dbName, reportCollectionName string)

初始化

func (*ReportObject) UpdateReport

func (this *ReportObject) UpdateReport(id string, update interface{}) error

更新热本话题

type SaveCloseTime

type SaveCloseTime struct {
	CloseTime uint64
	Index     int32 "_id"
}

type ServerCloseTime

type ServerCloseTime struct {
	DBObject
	CloseTimeTable string
}
var (
	DbSvrCloseTime *ServerCloseTime
)

func (*ServerCloseTime) GetLastCloseTime

func (this *ServerCloseTime) GetLastCloseTime() (error, uint64)

func (*ServerCloseTime) Init

func (object *ServerCloseTime) Init(dbName, tableShoutdown string)

初始化

func (*ServerCloseTime) UpsertSvrCloseTime

func (object *ServerCloseTime) UpsertSvrCloseTime(closeTime uint64) error

更新

type ServerGolbal

type ServerGolbal struct {
	Data  string
	Index int32 "_id"
}

type ServerListDocument

type ServerListDocument struct {
	ID   int64  "_id"
	Data []byte "data"
}

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 SessionDocument

type SessionDocument struct {
	UserId     uint64 "_id"
	Sessionkey string "skey"
	Ftime      uint64 "ftime"
}

type SessionManager

type SessionManager struct {
	DBObject
	// contains filtered or unexported fields
}
var (
	Session *SessionManager
)

func (*SessionManager) Delete

func (object *SessionManager) Delete(id uint64) error

删除联盟数据

func (*SessionManager) ForEach

func (object *SessionManager) ForEach(callback func(document *SessionDocument))

迭代

func (*SessionManager) Init

func (object *SessionManager) Init(dbName, collectionName string)

* @brief 初始化

func (*SessionManager) Update

func (object *SessionManager) Update(userId uint64, value string, ftime uint64) error

* @brief 更新所有

type StarPioneerDocument

type StarPioneerDocument struct {
	ID            int64  "_id"
	SyncPowerTime uint64 "sync_power_time"
	RankTime      uint64 "rank_time"
}

type StarPioneerObject

type StarPioneerObject struct {
	DBObject
	// contains filtered or unexported fields
}
var (
	StarPioneerDBObject *StarPioneerObject
)

func (*StarPioneerObject) Get

func (object *StarPioneerObject) Get() (error, *StarPioneerDocument)

func (*StarPioneerObject) Init

func (object *StarPioneerObject) Init(dbName, collectionName string)

* @brief 初始化

func (*StarPioneerObject) UpsertWithId

func (object *StarPioneerObject) UpsertWithId(update interface{}) error

更新

type StrongestCommanderDocument

type StrongestCommanderDocument struct {
	ID   uint32 "_id"
	Data []byte "data"
}

type StrongestCommanderObject

type StrongestCommanderObject struct {
	DBObject
	// contains filtered or unexported fields
}
var (
	StrongestCommander *StrongestCommanderObject
)

func (*StrongestCommanderObject) Get

func (*StrongestCommanderObject) Init

func (object *StrongestCommanderObject) Init(dbName, collectionName string)

初始化

func (*StrongestCommanderObject) UpserStrongestCommander

func (object *StrongestCommanderObject) UpserStrongestCommander(id uint32, update interface{}) error

更新

type StrongestCommanderRankDocument

type StrongestCommanderRankDocument struct {
	ID   uint32 "_id"
	Data []byte "data"
}

type StrongestCommanderRankObject

type StrongestCommanderRankObject struct {
	DBObject
	// contains filtered or unexported fields
}
var (
	StrongestCommanderRank *StrongestCommanderRankObject
)

func (*StrongestCommanderRankObject) ForEach

func (object *StrongestCommanderRankObject) ForEach(callback func(document *StrongestCommanderRankDocument))

全局活动表迭代

func (*StrongestCommanderRankObject) Init

func (object *StrongestCommanderRankObject) Init(dbName, collectionName string)

初始化

func (*StrongestCommanderRankObject) RemoveById

func (object *StrongestCommanderRankObject) RemoveById(id uint32)

func (*StrongestCommanderRankObject) UpserStrongestCommanderRank

func (object *StrongestCommanderRankObject) UpserStrongestCommanderRank(id uint32, update interface{}) error

更新

type TransferBattleDocument

type TransferBattleDocument struct {
	ID   uint32 "_id"
	Data []byte "data"
}

type TransferBattleObject

type TransferBattleObject struct {
	DBObject
	// contains filtered or unexported fields
}
var (
	TransferBattle *TransferBattleObject
)

func (*TransferBattleObject) Get

func (*TransferBattleObject) Init

func (object *TransferBattleObject) Init(dbName, collectionName string)

初始化

func (*TransferBattleObject) UpserTransferBattle

func (object *TransferBattleObject) UpserTransferBattle(id uint32, update interface{}) error

更新

type TransferBattleRankDocument

type TransferBattleRankDocument struct {
	ID   uint64 "_id"
	Data []byte "data"
}

type TransferBattleRankObject

type TransferBattleRankObject struct {
	DBObject
	// contains filtered or unexported fields
}
var (
	TransferBattlePrepareUserSubRank     *TransferBattleRankObject
	TransferBattlePrepareUserTotalRank   *TransferBattleRankObject
	TransferBattlePrepareLeagueSubRank   *TransferBattleRankObject
	TransferBattlePrepareLeagueTotalRank *TransferBattleRankObject
)

func (*TransferBattleRankObject) ForEach

func (object *TransferBattleRankObject) ForEach(callback func(document *TransferBattleRankDocument))

全局活动表迭代

func (*TransferBattleRankObject) Init

func (object *TransferBattleRankObject) Init(dbName, collectionName string)

初始化

func (*TransferBattleRankObject) RemoveAll

func (object *TransferBattleRankObject) RemoveAll()

func (*TransferBattleRankObject) RemoveById

func (object *TransferBattleRankObject) RemoveById(id uint32)

func (*TransferBattleRankObject) UpserTBRank

func (object *TransferBattleRankObject) UpserTBRank(id uint64, update interface{})

type TransferBattleUserBackUpDocument

type TransferBattleUserBackUpDocument struct {
	ID                 uint64 "_id"
	Activity           []byte "activity"
	StrongestCommander []byte "strongestcommander"
	WorldSituation     []byte "worldsituation"
	PrepareForWar      []byte "prepareforwar"
	SevenDayTask       []byte "sevendaytask"
}

type TransferBattleUserBackupObject

type TransferBattleUserBackupObject struct {
	DBObject
	// contains filtered or unexported fields
}
var (
	TransferBattleUserBackup *TransferBattleUserBackupObject
)

func (*TransferBattleUserBackupObject) Get

func (*TransferBattleUserBackupObject) Init

func (object *TransferBattleUserBackupObject) Init(dbName, collectionName string)

初始化

func (*TransferBattleUserBackupObject) UpserTransferBattle

func (object *TransferBattleUserBackupObject) UpserTransferBattle(id uint64, update interface{}) error

更新

type WarCityDocument

type WarCityDocument struct {
	ID      uint32 "_id"
	WarInfo []byte "war_info"
}

type WarCityObject

type WarCityObject struct {
	DBObject
	WarCityCollectionName string
}

活动

var (
	WarCity *WarCityObject
)

func (*WarCityObject) Del

func (object *WarCityObject) Del(id uint32) error

func (*WarCityObject) ForEach

func (object *WarCityObject) ForEach(callback func(document *WarCityDocument))

迭代

func (*WarCityObject) GetWarCity

func (this *WarCityObject) GetWarCity(cityid uint32) *Protocol.ST_CityWar_PB

func (*WarCityObject) Init

func (object *WarCityObject) Init(dbName, miracleWarCollectionName string)

初始化

func (*WarCityObject) RemoveAll

func (object *WarCityObject) RemoveAll() error

func (*WarCityObject) Upsert

func (object *WarCityObject) Upsert(id uint32, update interface{}) error

更新

type WorldChatDocument

type WorldChatDocument struct {
	TitleID        uint64 "_id"
	Time           uint64 "timestamp"
	ReplyCount     uint32 "reply_count"
	PraiseCount    uint32 "praise_count"
	ChatTitle      []byte "chat_title"
	ReplyList      []byte "reply_list"
	FollowUserList []byte "follow_user_list"
	PraiseUserList []byte "praise_user_list"
	HotInfo        []byte "hot_info"
}

世界聊天消息文档

type WorldChatIdDocument

type WorldChatIdDocument struct {
	Id     uint64 "_id"
	NextId uint64 "next_id"
}

世界聊天消息ID文档

type WorldChatObject

type WorldChatObject struct {
	DBObject
	// contains filtered or unexported fields
}
var (
	WorldChat *WorldChatObject
)

func (*WorldChatObject) ForeachLeagueChat

func (this *WorldChatObject) ForeachLeagueChat(callback func(doc *LeagueChatDocument))

获取联盟聊天

func (*WorldChatObject) GetHotWorldChat

func (this *WorldChatObject) GetHotWorldChat() (error, *HotWorldChatDocument)

获取热本话题

func (*WorldChatObject) GetLeagueChatById

func (this *WorldChatObject) GetLeagueChatById(lid uint64) (error, *LeagueChatDocument)

获取联盟聊天

func (*WorldChatObject) GetWorldChatById

func (this *WorldChatObject) GetWorldChatById(titleId uint64) (error, *WorldChatDocument)

根据ID获取世界聊天消息

func (*WorldChatObject) GetWorldChatID

func (this *WorldChatObject) GetWorldChatID() (error, uint64)

获取世界聊天ID

func (*WorldChatObject) GetWorldChatWX

func (this *WorldChatObject) GetWorldChatWX() (error, *WorldChatWXDocument)

获取世界微信聊天消息

func (*WorldChatObject) GetWorldChatsByIds

func (this *WorldChatObject) GetWorldChatsByIds(ids []uint64, res interface{}) error

根据idx列表获取世界聊天消息

func (*WorldChatObject) GetWorldChatsByTime

func (this *WorldChatObject) GetWorldChatsByTime(timestamp uint64, skip, limit int, res interface{}) error

根据消息时间获取世界聊天消息

func (*WorldChatObject) Init

func (this *WorldChatObject) Init(dbName, worldChatIdCollectionName, worldChatCollectionName, hotWorldChaCollectionName, leagueChatCollectionName, worldChatWXCollectionName string)

初始化

func (*WorldChatObject) RemoveWorldChatById

func (this *WorldChatObject) RemoveWorldChatById(id uint64) error

根据ID删除世界聊天数据

func (*WorldChatObject) UpdateHotWorldChat

func (this *WorldChatObject) UpdateHotWorldChat(update interface{}) error

更新热本话题

func (*WorldChatObject) UpdateLeagueChat

func (this *WorldChatObject) UpdateLeagueChat(lid uint64, update interface{}) error

更新联盟聊天

func (*WorldChatObject) UpdateWorldChatWX

func (this *WorldChatObject) UpdateWorldChatWX(update interface{}) error

跟新世界微信聊天消息

func (*WorldChatObject) UpdateWorldChatWithId

func (this *WorldChatObject) UpdateWorldChatWithId(titleId uint64, update interface{}) error

根据ID更新世界聊天消息

type WorldChatWXDocument

type WorldChatWXDocument struct {
	ID        uint64 "_id"
	ChatTitle []byte "chat_title"
}

世界微信聊天

type WorldDataDocument

type WorldDataDocument struct {
	Id   uint64 "_id"
	Data []byte "data"
}

func (*WorldDataDocument) ToPB

type WorldDataDocumentList

type WorldDataDocumentList []WorldDataDocument

type WorldDataIdDocument

type WorldDataIdDocument struct {
	Id     uint64 "_id"
	NextId uint64 "next_id"
}

type WorldDataObject

type WorldDataObject struct {
	DBObject
	// contains filtered or unexported fields
}
var (
	WorldData *WorldDataObject
)

func (*WorldDataObject) ForEach

func (object *WorldDataObject) ForEach(callback func(document *WorldDataDocument))

迭代

func (*WorldDataObject) GetGlobalWorldDataId

func (object *WorldDataObject) GetGlobalWorldDataId() (error, uint64)

获取全局联盟id

func (*WorldDataObject) Init

func (object *WorldDataObject) Init(dbName, configCollectionName, worldDataIdCollectionName, worldDataCollectionName string)

func (*WorldDataObject) RemoveAllWorldData

func (object *WorldDataObject) RemoveAllWorldData() error

func (*WorldDataObject) RemoveWorldData

func (object *WorldDataObject) RemoveWorldData(id uint64) error

删除世界数据

func (*WorldDataObject) UpdateWorldData

func (object *WorldDataObject) UpdateWorldData(id uint64, content []byte) error

更新世界数据

type WorldSituationDocument

type WorldSituationDocument struct {
	ID   uint32 "_id"
	Data []byte "data"
}

type WorldSituationObject

type WorldSituationObject struct {
	DBObject
	// contains filtered or unexported fields
}
var (
	WorldSituation *WorldSituationObject
)

func (*WorldSituationObject) ForEach

func (object *WorldSituationObject) ForEach(callback func(document *WorldSituationDocument))

迭代

func (*WorldSituationObject) Get

func (*WorldSituationObject) Init

func (object *WorldSituationObject) Init(dbName, collectionName string)

初始化

func (*WorldSituationObject) UpserWorldSituation

func (object *WorldSituationObject) UpserWorldSituation(id uint32, update interface{}) error

更新

type WorldSituationRankSnapshotDocument

type WorldSituationRankSnapshotDocument struct {
	ID   uint32 "_id"
	Data []byte "data"
}

type WorldSituationRankSnapshotObject

type WorldSituationRankSnapshotObject struct {
	DBObject
	// contains filtered or unexported fields
}
var (
	WorldSituationRankSnapshot *WorldSituationRankSnapshotObject
)

func (*WorldSituationRankSnapshotObject) ForEach

func (object *WorldSituationRankSnapshotObject) ForEach(callback func(document *WorldSituationRankSnapshotDocument))

迭代

func (*WorldSituationRankSnapshotObject) Init

func (object *WorldSituationRankSnapshotObject) Init(dbName, collectionName string)

初始化

func (*WorldSituationRankSnapshotObject) UpserWorldSituationRankSnapshot

func (object *WorldSituationRankSnapshotObject) UpserWorldSituationRankSnapshot(id uint32, update interface{}) error

更新

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL