Documentation ¶
Index ¶
- func MigratePlayerDB(db *sql.DB, dbtype types.DatabaseType) error
- type Player
- type PlayerInventories
- type PlayerInventoryItems
- type PlayerMetadata
- type PlayerMetadataRepository
- type PlayerRepository
- func (r *PlayerRepository) Count() (int64, error)
- func (r *PlayerRepository) CreateOrUpdate(p *Player) error
- func (r *PlayerRepository) DeleteAll() error
- func (r *PlayerRepository) Export(z *zip.Writer) error
- func (r *PlayerRepository) GetPlayer(name string) (*Player, error)
- func (r *PlayerRepository) Import(z *zip.Reader) error
- func (r *PlayerRepository) RemovePlayer(name string) error
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 PlayerInventoryItems ¶
type PlayerMetadata ¶
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) Export ¶ added in v1.1.39
func (r *PlayerMetadataRepository) Export(z *zip.Writer) error
func (*PlayerMetadataRepository) GetPlayerMetadata ¶ added in v1.1.27
func (r *PlayerMetadataRepository) GetPlayerMetadata(name string) ([]*PlayerMetadata, error)
func (*PlayerMetadataRepository) Import ¶ added in v1.1.39
func (r *PlayerMetadataRepository) Import(z *zip.Reader) 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) Count ¶ added in v1.1.42
func (r *PlayerRepository) Count() (int64, error)
func (*PlayerRepository) CreateOrUpdate ¶ added in v1.1.27
func (r *PlayerRepository) CreateOrUpdate(p *Player) error
func (*PlayerRepository) DeleteAll ¶ added in v1.1.43
func (r *PlayerRepository) DeleteAll() error
func (*PlayerRepository) Export ¶ added in v1.1.39
func (r *PlayerRepository) Export(z *zip.Writer) error
func (*PlayerRepository) GetPlayer ¶
func (r *PlayerRepository) GetPlayer(name string) (*Player, error)
func (*PlayerRepository) Import ¶ added in v1.1.39
func (r *PlayerRepository) Import(z *zip.Reader) error
func (*PlayerRepository) RemovePlayer ¶ added in v1.1.27
func (r *PlayerRepository) RemovePlayer(name string) error
Click to show internal directories.
Click to hide internal directories.