player

package
v1.1.33 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2023 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 PlayerMetadataRepository added in v1.1.27

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

func NewPlayerMetadataRepository added in v1.1.27

func NewPlayerMetadataRepository(db *sql.DB, dbtype types.DatabaseType) *PlayerMetadataRepository

func (*PlayerMetadataRepository) GetPlayerMetadata added in v1.1.27

func (r *PlayerMetadataRepository) GetPlayerMetadata(name string) ([]*PlayerMetadata, error)

func (*PlayerMetadataRepository) SetPlayerMetadata added in v1.1.27

func (r *PlayerMetadataRepository) SetPlayerMetadata(md *PlayerMetadata) error

type PlayerRepository

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

func NewPlayerRepository

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

func (*PlayerRepository) CreateOrUpdate added in v1.1.27

func (r *PlayerRepository) CreateOrUpdate(p *Player) error

func (*PlayerRepository) GetPlayer

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

func (*PlayerRepository) RemovePlayer added in v1.1.27

func (r *PlayerRepository) RemovePlayer(name string) error

Jump to

Keyboard shortcuts

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