repository

package
v0.0.0-...-56beac2 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBetterDataAlreadyExists = errors.New("better data already exists")
	ErrLimit                   = errors.New("limit error")
)

Functions

This section is empty.

Types

type GameRepository

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

func NewGameRepository

func NewGameRepository(db *sql.DB) *GameRepository

func (*GameRepository) GetByID

func (g *GameRepository) GetByID(ctx context.Context, id string) (*domain.Game, error)

type LeaderboardDataRepository

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

func NewLeaderboardDataRepository

func NewLeaderboardDataRepository(db *sql.DB) *LeaderboardDataRepository

func (*LeaderboardDataRepository) GetByUID

func (ld *LeaderboardDataRepository) GetByUID(
	ctx context.Context,
	uid string,
	offset int,
	count int,
) ([]domain.LeaderboardData, error)

func (*LeaderboardDataRepository) GetPlayerPosition

func (ld *LeaderboardDataRepository) GetPlayerPosition(ctx context.Context, lid string, pid string) (int, error)

func (*LeaderboardDataRepository) Insert

func (ld *LeaderboardDataRepository) Insert(ctx context.Context, lid string, pid string, v1 int, v2 int, v3 int) error

type PlayerRepository

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

func NewPlayerRepository

func NewPlayerRepository(db *sql.DB) *PlayerRepository

func (*PlayerRepository) GetByUID

func (p *PlayerRepository) GetByUID(ctx context.Context, uid string) (*domain.Player, error)

func (*PlayerRepository) Insert

func (p *PlayerRepository) Insert(ctx context.Context, player *domain.Player) error

func (*PlayerRepository) Update

func (p *PlayerRepository) Update(ctx context.Context, player *domain.Player) error

Jump to

Keyboard shortcuts

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