mysql

package
v0.0.0-...-1f8218d Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package mysql allows to interact with a MySQL database.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ScoreStore

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

ScoreStore is a score store.

func NewScoreStore

func NewScoreStore(db *sql.DB) (*ScoreStore, error)

NewScoreStore creates a new score store.

func (*ScoreStore) Add

func (s *ScoreStore) Add(ctx context.Context, scr *clong.Score) error

Add adds a new score to the DB.

func (*ScoreStore) ListAll

func (s *ScoreStore) ListAll(ctx context.Context) ([]*clong.Score, error)

ListAll retrieves all scores from the DB.

func (*ScoreStore) RemoveAll

func (s *ScoreStore) RemoveAll(_ context.Context) error

RemoveAll removes all scores from the DB.

Jump to

Keyboard shortcuts

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