stats

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBStore

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

A ListStatStore stores "list-based" statistics (for example, lists of player bingos).

func NewDBStore

func NewDBStore(p *pgxpool.Pool) (*DBStore, error)

func (*DBStore) AddListItem

func (s *DBStore) AddListItem(ctx context.Context, gameID string, playerID string, statType int,
	time int64, item entity.ListDatum) error

XXX: This should be a transaction that queues up many inserts. Fix before beta.

func (*DBStore) Disconnect

func (s *DBStore) Disconnect()

func (*DBStore) GetListItems

func (s *DBStore) GetListItems(ctx context.Context, statType int, gameIds []string, playerID string) ([]*entity.ListItem, error)

GetListItems gets list items for a stat type, a list of game IDs, and an optional player ID. XXX: This function will need to be modified a bit to work with a player ID of "opponent" -- that is when we want to get user list stats for arbitrary opponents.

Jump to

Keyboard shortcuts

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