database

package
v0.0.0-...-aa25481 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckObjectIsPlanet

func CheckObjectIsPlanet(db *sql.DB, id int64) (bool, error)

func CloseDB

func CloseDB(db *sql.DB)

func ConnectDB

func ConnectDB(cfg mysql.Config) (*sql.DB, error)

func ConnectDBWithRetries

func ConnectDBWithRetries() *sql.DB

func GetPLayerIdForUser

func GetPLayerIdForUser(userId int64) (string, error)

func GetPlanetIDs

func GetPlanetIDs(db *sql.DB) (map[int64]struct{}, error)

func GetPlayerOwnedShips

func GetPlayerOwnedShips(db *sql.DB, playerId string) (map[int64]struct{}, error)

func GetUserPassword

func GetUserPassword(db *sql.DB, username string) (int64, string, error)

func InsertObject

func InsertObject(db *sql.DB, x int64, y int64) (int64, error)

func InsertUser

func InsertUser(db *sql.DB, username string, password string) error

func IsObjectOwnedByPlayer

func IsObjectOwnedByPlayer(db *sql.DB, playerId int64, objectId int64) (bool, error)

func ProcessRename

func ProcessRename(db *sql.DB, id int64, name string) error

func ReplaceAttackCommand

func ReplaceAttackCommand(db *sql.DB, id int64, commandType string, target int64) error

func ReplaceConstructCommand

func ReplaceConstructCommand(db *sql.DB, id int64, commandType string, class int64) error

func ReplaceDecommissionCommand

func ReplaceDecommissionCommand(db *sql.DB, id int64, commandType string) error

func ReplaceMoveCommand

func ReplaceMoveCommand(db *sql.DB, id int64, commandType string, target int64) error

func ReplaceRepairCommand

func ReplaceRepairCommand(db *sql.DB, id int64, commandType string) error

func ReplaceTradeCommand

func ReplaceTradeCommand(db *sql.DB, id int64, commandType string, target int64, resource int64, amount int64) error

func StopCommand

func StopCommand(db *sql.DB, id int64) error

func TestDB

func TestDB(db *sql.DB) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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