users_gen

package
v0.0.0-...-7c98acb Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 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 CreateUserParams

type CreateUserParams struct {
	ID           string
	SteamID      uint64
	Name         string
	Admin        bool
	PasswordHash []byte
}

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 Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) CreateUser

func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams) (sql.Result, error)

func (*Queries) GetUser

func (q *Queries) GetUser(ctx context.Context, id string) (User, error)

func (*Queries) GetUserBySteamID

func (q *Queries) GetUserBySteamID(ctx context.Context, steamID uint64) (User, error)

func (*Queries) GetUsers

func (q *Queries) GetUsers(ctx context.Context, userIds []string) ([]User, error)

func (*Queries) WithTx

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

type User

type User struct {
	ID           string
	SteamID      uint64
	Name         string
	Admin        bool
	CreatedAt    time.Time
	UpdatedAt    time.Time
	PasswordHash []byte
}

Jump to

Keyboard shortcuts

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