player

package
v1.1.26 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MigratePlayerDB

func MigratePlayerDB(db *sql.DB, dbtype types.DatabaseType) error

Types

type Player

type Player struct {
	Name             string  `json:"name"`
	Pitch            float64 `json:"pitch"`
	Yaw              float64 `json:"yaw"`
	PosX             float64 `json:"posx"`
	PosY             float64 `json:"posy"`
	PosZ             float64 `json:"posz"`
	HP               int     `json:"hp"`
	Breath           int     `json:"breath"`
	CreationDate     int64   `json:"creation_date"`
	ModificationDate int64   `json:"modification_date"`
}

type PlayerInventories

type PlayerInventories struct {
	Player   string `json:"player"`
	InvID    int    `json:"inv_id"`
	InvWidth int    `json:"inv_width"`
	InvName  string `json:"inv_name"`
	InvSize  int    `json:"inv_size"`
}

type PlayerInventoryItems

type PlayerInventoryItems struct {
	Player string `json:"player"`
	InvID  int    `json:"inv_id"`
	SlotID int    `json:"slot_id"`
	Item   string `json:"item"`
}

type PlayerMetadata

type PlayerMetadata struct {
	Player   string `json:"player"`
	Metadata string `json:"metadata"`
	Value    string `json:"value"`
}

type PlayerRepository

type PlayerRepository interface {
	GetPlayer(name string) (*Player, error)
}

func NewPlayerRepository

func NewPlayerRepository(db *sql.DB, dbtype types.DatabaseType) PlayerRepository

type PlayerSqliteRepository

type PlayerSqliteRepository struct {
	// contains filtered or unexported fields
}

func (*PlayerSqliteRepository) GetPlayer

func (r *PlayerSqliteRepository) GetPlayer(name string) (*Player, error)

Jump to

Keyboard shortcuts

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