db

package
v0.0.0-...-4cc0970 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KenoData

type KenoData interface {
	GetGame(gameId int) keno.Game
	GetCard(cardId int) keno.Card
	GetGamesBetween(startId int, endId int) []keno.Game
}

This interface allows accessing the PG database And pulling games and cards into useable structs in our program

type PgPool

type PgPool struct {
	Pool *pgxpool.Pool
}

func NewPgPool

func NewPgPool() *PgPool

Bail out on failure to connext for now

func (*PgPool) GetCard

func (pool *PgPool) GetCard(cardId int) (keno.Card, error)

func (*PgPool) GetGame

func (pool *PgPool) GetGame(gameID int) (keno.Game, error)

func (*PgPool) GetGamesBetween

func (pool *PgPool) GetGamesBetween(startId, endId int) ([]keno.Game, error)

Jump to

Keyboard shortcuts

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