generated

package
v0.0.0-...-9a1086c Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2025 License: MIT Imports: 2 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 {
	Name           string
	Email          string
	Username       string
	HashedPassword string
}

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 FindUserByEmailRow

type FindUserByEmailRow struct {
	ID             int32
	HashedPassword string
}

type FindUserByUsernameRow

type FindUserByUsernameRow struct {
	ID             int32
	HashedPassword string
}

type Querier

type Querier interface {
	CreateUser(ctx context.Context, arg *CreateUserParams) (int32, error)
	FindUserByEmail(ctx context.Context, email string) (*FindUserByEmailRow, error)
	FindUserByID(ctx context.Context, id int32) (int32, error)
	FindUserByUsername(ctx context.Context, username string) (*FindUserByUsernameRow, error)
}

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) (int32, error)

func (*Queries) FindUserByEmail

func (q *Queries) FindUserByEmail(ctx context.Context, email string) (*FindUserByEmailRow, error)

func (*Queries) FindUserByID

func (q *Queries) FindUserByID(ctx context.Context, id int32) (int32, error)

func (*Queries) FindUserByUsername

func (q *Queries) FindUserByUsername(ctx context.Context, username string) (*FindUserByUsernameRow, error)

func (*Queries) WithTx

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

type User

type User struct {
	ID             int32
	Name           string
	Email          string
	Username       string
	HashedPassword string
}

Jump to

Keyboard shortcuts

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