background

package
v0.0.0-...-c0093cc Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RefreshGame

func RefreshGame(ctx context.Context, apiGame *bgg.GameItem,
	familyBacklog map[int64]bool, db *sql.DB, clock Clock) (*postgres.Game, error)

func SeedBGGGameIds

func SeedBGGGameIds() []int64

func UpdateEventsFromGencon

func UpdateEventsFromGencon(db *sql.DB, sourceFile string)

func UpdateGamesFromBGG

func UpdateGamesFromBGG(ctx context.Context, db *sql.DB, api bgg.BGGClient, clock Clock)

Types

type Clock

type Clock interface {
	Now() time.Time
	Sleep(d time.Duration)
}

type GameCache

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

func NewGameCache

func NewGameCache(db *sql.DB) *GameCache

func (*GameCache) FindGame

func (gc *GameCache) FindGame(name string) *postgres.Game

func (*GameCache) PeriodicallyUpdate

func (gc *GameCache) PeriodicallyUpdate()

func (*GameCache) UpdateCache

func (gc *GameCache) UpdateCache() error

type RealClock

type RealClock struct{}

func (RealClock) Now

func (RealClock) Now() time.Time

func (RealClock) Sleep

func (RealClock) Sleep(d time.Duration)

Jump to

Keyboard shortcuts

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