dbmgr

package
v1.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// center
	C_tabname_svrlist  = "svrlist"
	C_tabname_userinfo = "userinfo"
	C_tabname_userload = "userload"
	C_tabname_seqid    = "seqid"
	C_tabname_names    = "names"
)
View Source
const (
	C_player_name_maxlen = 18
)

Variables

View Source
var (
	DBCenter *db.Database
)

Functions

func Center_AllocUserDB

func Center_AllocUserDB() string

func Center_ChangeName

func Center_ChangeName(oldname, newname string) bool

func Center_GenUserId

func Center_GenUserId(dbname string) string

func Center_GetServerMergeName

func Center_GetServerMergeName(svr0 string) string

func Center_GetServerUserLimit

func Center_GetServerUserLimit(svr0 string) int32

func Center_IncUserLoad

func Center_IncUserLoad(dbname string)

func Center_InsertName

func Center_InsertName(name string) bool

func DatabaseClose

func DatabaseClose()

func DatabaseOpen

func DatabaseOpen()

Types

type UserInfo

type UserInfo struct {
	UserId   string    `bson:"_id"`
	AuthId   string    `bson:"authid"`
	Svr0     string    `bson:"svr0"`
	Svr      string    `bson:"svr"`
	Sdk      string    `bson:"sdk"`
	Plat     string    `bson:"plat"`
	DevId    string    `bson:"devid"`
	IP       string    `bson:"ip"`
	CreateTs time.Time `bson:"cts"`
	BanTs    time.Time `bson:"ban_ts"`
	Name     string    `bson:"name"`
	Lv       int32     `bson:"lv"`
	Vip      int32     `bson:"vip"`
	Tutorial int32     `bson:"tut"`
}

func Center_GetUserInfo

func Center_GetUserInfo(auth_id string, sdk string, svr0 string, on_create func(*UserInfo)) (*UserInfo, bool)

func Center_GetUserInfoById

func Center_GetUserInfoById(user_id string) *UserInfo

Jump to

Keyboard shortcuts

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