database

package
v0.0.0-...-6a7d8d9 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddFreeGameParams

type AddFreeGameParams struct {
	StoreID      string
	Title        string
	Description  string
	Url          string
	ThumbnailUrl string
	StartDate    pgtype.Timestamptz
	EndDate      pgtype.Timestamptz
}

type AddTokenPriceParams

type AddTokenPriceParams struct {
	Updated pgtype.Timestamptz
	Price   int64
}

type DBTX

type DBTX interface {
	Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
	Query(context.Context, string, ...interface{}) (pgx.Rows, error)
	QueryRow(context.Context, string, ...interface{}) pgx.Row
}

type EgsFreeGame

type EgsFreeGame struct {
	ID           int64
	StoreID      string
	Title        string
	Description  string
	Url          string
	ThumbnailUrl string
	StartDate    pgtype.Timestamptz
	EndDate      pgtype.Timestamptz
}

type GetAllTokenPricesSinceRow

type GetAllTokenPricesSinceRow struct {
	Price   int64
	Updated pgtype.Timestamptz
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) AddFreeGame

func (q *Queries) AddFreeGame(ctx context.Context, arg AddFreeGameParams) (EgsFreeGame, error)

func (*Queries) AddTokenPrice

func (q *Queries) AddTokenPrice(ctx context.Context, arg AddTokenPriceParams) (WowTokenPrice, error)

func (*Queries) GetAllFreeGames

func (q *Queries) GetAllFreeGames(ctx context.Context) ([]EgsFreeGame, error)

func (*Queries) GetAllTokenPrices

func (q *Queries) GetAllTokenPrices(ctx context.Context) ([]WowTokenPrice, error)

func (*Queries) GetAllTokenPricesSince

func (q *Queries) GetAllTokenPricesSince(ctx context.Context, updated pgtype.Timestamptz) ([]GetAllTokenPricesSinceRow, error)

func (*Queries) GetCurrentFreeGames

func (q *Queries) GetCurrentFreeGames(ctx context.Context) ([]EgsFreeGame, error)

func (*Queries) GetLatestTokenPrice

func (q *Queries) GetLatestTokenPrice(ctx context.Context) (WowTokenPrice, error)

func (*Queries) WithTx

func (q *Queries) WithTx(tx pgx.Tx) *Queries

type WowTokenPrice

type WowTokenPrice struct {
	ID      int64
	Updated pgtype.Timestamptz
	Price   int64
}

Jump to

Keyboard shortcuts

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