GameDB

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MAIL_TABLE_COUNT = 1 << 8
	MAIL_TABLE_MASH  = MAIL_TABLE_COUNT - 1
)

Variables

This section is empty.

Functions

func Initialize

func Initialize()

初始化

Types

type ConfigDocument

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

配置

type DBObject

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

数据库父类

type IdDocument

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

id

type MailDocument

type MailDocument struct {
	Id        uint64 "_id"
	TimeStamp uint64 "timestamp"
	Removed   bool   "removed"
	Data      []byte "data"
}

邮件文档

type MailObject

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

邮件

var (
	Mail             *MailObject
	MailTableNameMap = make(map[int]string, MAIL_TABLE_COUNT)
)

func (*MailObject) GetMailById

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

获取邮件详情

func (*MailObject) Init

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

初始化

func (*MailObject) UpsertMailWithId

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

更新

Jump to

Keyboard shortcuts

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