gamedb

package
v0.0.0-...-8d9cb7d Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LOBBY_COLLECT string = "__lobbys"
	ROOM_COLLECT         = "__rooms"
)

Variables

This section is empty.

Functions

func CreateLobby

func CreateLobby(entity interface{}) error

func CreateRoom

func CreateRoom(entity interface{}, lobbyid string) error

func Cxt

func Cxt() context.Context

func DeleteLobby

func DeleteLobby(filter map[string]interface{}) error

func DeleteRoom

func DeleteRoom(filter map[string]interface{}, lobbyid string) error

func DeleteRooms

func DeleteRooms(filter map[string]interface{}, lobbyid string) error

func FindBalanceNode

func FindBalanceNode(lobbyid string) (string, error)

func FindBalanceRoom

func FindBalanceRoom(entity interface{}, lobbyid string) error

func FindLobby

func FindLobby(filter map[string]interface{}, entity interface{}) error

func FindLobbyRoomsPeerCount

func FindLobbyRoomsPeerCount(lobbyid string) (int, error)

func FindRoom

func FindRoom(filter map[string]interface{}, entity interface{}, lobbyid string) error

func FindRooms

func FindRooms(filter map[string]interface{}, entities interface{}, lobbyid string) error

func InitMongo

func InitMongo(mongoConf string) error

func LobbyCol

func LobbyCol() *mongo.Collection

func RoomCol

func RoomCol(lobbyid string) *mongo.Collection

func UpdateLobby

func UpdateLobby(filter map[string]interface{}, data map[string]map[string]interface{}) error

func UpdateRoom

func UpdateRoom(entity interface{}, filter map[string]interface{}, lobbyid string) error

Types

type BalanceResult

type BalanceResult struct {
	Id  string `bson:"_id"`
	Num int    `bson:"num"`
}

Jump to

Keyboard shortcuts

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