internal

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Audit

type Audit struct {
	ID        int64     `json:"id"`
	Action    string    `json:"action"`
	MatchID   int64     `json:"match_id"`
	Detail    string    `json:"detail"`
	CreatedAt time.Time `json:"created_at"`
}

type CreateAuditParams

type CreateAuditParams struct {
	Action    string    `json:"action"`
	MatchID   int64     `json:"match_id"`
	Detail    string    `json:"detail"`
	CreatedAt time.Time `json:"created_at"`
}

type CreateMatchParams

type CreateMatchParams struct {
	White     string    `json:"white"`
	Black     string    `json:"black"`
	Result    string    `json:"result"`
	Opening   *string   `json:"opening"`
	Moves     int64     `json:"moves"`
	PlayedAt  time.Time `json:"played_at"`
	CreatedAt time.Time `json:"created_at"`
}

type CreatePlayerParams added in v0.0.3

type CreatePlayerParams struct {
	Name     string    `json:"name"`
	Rating   int64     `json:"rating"`
	Title    *string   `json:"title"`
	JoinedAt time.Time `json:"joined_at"`
}

type DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type Match

type Match struct {
	ID        int64     `json:"id"`
	White     string    `json:"white"`
	Black     string    `json:"black"`
	Result    string    `json:"result"`
	Opening   *string   `json:"opening"`
	Moves     int64     `json:"moves"`
	PlayedAt  time.Time `json:"played_at"`
	CreatedAt time.Time `json:"created_at"`
}

type Player added in v0.0.3

type Player struct {
	Name     string    `json:"name"`
	Rating   int64     `json:"rating"`
	Title    *string   `json:"title"`
	JoinedAt time.Time `json:"joined_at"`
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) CreateAudit

func (q *Queries) CreateAudit(ctx context.Context, arg CreateAuditParams) (int64, error)

Code generated by entlite. DO NOT EDIT. SQLC compatible query definitions Audit CRUD operations

func (*Queries) CreateMatch

func (q *Queries) CreateMatch(ctx context.Context, arg CreateMatchParams) (int64, error)

Match CRUD operations

func (*Queries) CreatePlayer added in v0.0.3

func (q *Queries) CreatePlayer(ctx context.Context, arg CreatePlayerParams) error

Player CRUD operations

func (*Queries) DB

func (q *Queries) DB() DBTX

DB returns the handle this Queries was constructed with.

func (*Queries) DeleteAllMatch added in v0.0.3

func (q *Queries) DeleteAllMatch(ctx context.Context) error

func (*Queries) DeleteMatch

func (q *Queries) DeleteMatch(ctx context.Context, id int64) error

func (*Queries) GetMatchById added in v0.0.6

func (q *Queries) GetMatchById(ctx context.Context, id int64) (Match, error)

func (*Queries) GetPlayerByName added in v0.0.5

func (q *Queries) GetPlayerByName(ctx context.Context, name string) (Player, error)

func (*Queries) ListAllAudit

func (q *Queries) ListAllAudit(ctx context.Context) ([]Audit, error)

func (*Queries) ListAllMatch

func (q *Queries) ListAllMatch(ctx context.Context) ([]Match, error)

func (*Queries) ListAllPlayer added in v0.0.3

func (q *Queries) ListAllPlayer(ctx context.Context) ([]Player, error)

func (*Queries) WithTx

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

Jump to

Keyboard shortcuts

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