stats

package
Version: v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2020 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ListStatStore

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

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

func NewListStatStore

func NewListStatStore(dbURL string) (*ListStatStore, error)

func (*ListStatStore) AddListItem

func (l *ListStatStore) AddListItem(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 (*ListStatStore) Disconnect

func (l *ListStatStore) Disconnect()

func (*ListStatStore) GetListItems

func (l *ListStatStore) GetListItems(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.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL