internal

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 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 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 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) DB

func (q *Queries) DB() DBTX

DB returns the handle this Queries was constructed with.

func (*Queries) DeleteMatch

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

func (*Queries) GetMatchByID

func (q *Queries) GetMatchByID(ctx context.Context, id int64) (Match, 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) 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