store

package
v0.0.0-...-d091464 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store is a backend database used for persistent storage of game data.

func New

func New(cfg *config.Config) (*Store, error)

New creates a new persistent storage provider.

func (*Store) Close

func (s *Store) Close() error

Close cleans up resources used by the persistent store provider.

func (*Store) LoadItemAttributes

func (s *Store) LoadItemAttributes() ([]*model.ItemAttributes, error)

LoadItemAttributes loads information about all equipment items.

func (*Store) LoadPlayer

func (s *Store) LoadPlayer(username string) (*model.Player, error)

LoadPlayer loads information about a player.

func (*Store) Migrate

func (s *Store) Migrate() error

Migrate runs migrations against the backend persistent store.

func (*Store) SavePlayer

func (s *Store) SavePlayer(p *model.Player) error

SavePlayer saves data about a player.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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