Documentation ¶
Index ¶
- type Driver
- type SQLite3Driver
- func (s *SQLite3Driver) Close() error
- func (s *SQLite3Driver) LoadItemAttributes() ([]*model.ItemAttributes, error)
- func (s *SQLite3Driver) LoadPlayer(username string) (*model.Player, error)
- func (s *SQLite3Driver) Migration() (database.Driver, error)
- func (s *SQLite3Driver) SavePlayer(p *model.Player) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Driver ¶
type Driver interface { // Migration returns a handle to the underlying store for use with migrations. Migration() (database.Driver, error) // LoadItemAttributes loads information about all item attributes. LoadItemAttributes() ([]*model.ItemAttributes, error) // SavePlayer saves data about a player. SavePlayer(p *model.Player) error // LoadPlayer loads data about a player with a username. LoadPlayer(username string) (*model.Player, error) // Close cleans up resources used by the driver. Close() error }
Driver is an interface for a driver that interfaces with a backend database.
func NewSQLite3Driver ¶
func NewSQLite3Driver(cfg *config.SQLite3DatabaseConfig) (Driver, error)
NewSQLite3Driver creates a new SQLite3 database driver.
type SQLite3Driver ¶
type SQLite3Driver struct {
// contains filtered or unexported fields
}
SQLite3Driver is a driver that interfaces with a SQLite3 database.
func (*SQLite3Driver) Close ¶
func (s *SQLite3Driver) Close() error
Close cleans up resources used by the SQLite3 driver.
func (*SQLite3Driver) LoadItemAttributes ¶
func (s *SQLite3Driver) LoadItemAttributes() ([]*model.ItemAttributes, error)
LoadItemAttributes loads information about all item attributes from a SQLite3 database.
func (*SQLite3Driver) LoadPlayer ¶
func (s *SQLite3Driver) LoadPlayer(username string) (*model.Player, error)
LoadPlayer loads information about a player from a SQLite3 database.
func (*SQLite3Driver) Migration ¶
func (s *SQLite3Driver) Migration() (database.Driver, error)
Migration returns a handle to the underlying store for use with SQLite3 migrations.
func (*SQLite3Driver) SavePlayer ¶
func (s *SQLite3Driver) SavePlayer(p *model.Player) error
SavePlayer updates a player's information in a SQLite3 database.
Click to show internal directories.
Click to hide internal directories.