sqlc

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2026 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 {
	ID            string         `json:"id"`
	Avatar        sql.NullString `json:"avatar"`
	Name          string         `json:"name"`
	Email         sql.NullString `json:"email"`
	CreatedAt     string         `json:"created_at"`
	UpdatedAt     string         `json:"updated_at"`
	Disabled      int32          `json:"disabled"`
	EmailVerified int32          `json:"email_verified"`
}

type DBTX

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

type GetUserByEmailRow

type GetUserByEmailRow struct {
	ID            string         `json:"id"`
	Avatar        sql.NullString `json:"avatar"`
	Name          string         `json:"name"`
	Email         sql.NullString `json:"email"`
	CreatedAt     string         `json:"created_at"`
	UpdatedAt     string         `json:"updated_at"`
	Disabled      int32          `json:"disabled"`
	Email_2       sql.NullString `json:"email_2"`
	EmailVerified int32          `json:"email_verified"`
}

type GetUserByIDRow

type GetUserByIDRow struct {
	ID            string         `json:"id"`
	Avatar        sql.NullString `json:"avatar"`
	Name          string         `json:"name"`
	Email         sql.NullString `json:"email"`
	CreatedAt     string         `json:"created_at"`
	UpdatedAt     string         `json:"updated_at"`
	Disabled      int32          `json:"disabled"`
	Email_2       sql.NullString `json:"email_2"`
	EmailVerified int32          `json:"email_verified"`
}

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) error

Email OTP User queries

func (*Queries) GetUserByEmail

func (q *Queries) GetUserByEmail(ctx context.Context, email sql.NullString) (GetUserByEmailRow, error)

func (*Queries) GetUserByID

func (q *Queries) GetUserByID(ctx context.Context, id string) (GetUserByIDRow, error)

func (*Queries) UpdateUserEmail

func (q *Queries) UpdateUserEmail(ctx context.Context, arg UpdateUserEmailParams) error

func (*Queries) WithTx

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

type UpdateUserEmailParams

type UpdateUserEmailParams struct {
	ID            string         `json:"id"`
	Email         sql.NullString `json:"email"`
	EmailVerified int32          `json:"email_verified"`
	UpdatedAt     string         `json:"updated_at"`
}

type User

type User struct {
	ID            string         `json:"id"`
	Avatar        sql.NullString `json:"avatar"`
	Name          string         `json:"name"`
	Email         sql.NullString `json:"email"`
	CreatedAt     string         `json:"created_at"`
	UpdatedAt     string         `json:"updated_at"`
	Disabled      int32          `json:"disabled"`
	EmailVerified int32          `json:"email_verified"`
}

type Verification

type Verification struct {
	ID          string `json:"id"`
	Identifier  string `json:"identifier"`
	Token       string `json:"token"`
	Type        string `json:"type"`
	ExpiresAt   string `json:"expires_at"`
	CreatedAt   string `json:"created_at"`
	Attempts    int32  `json:"attempts"`
	MaxAttempts int32  `json:"max_attempts"`
}

Jump to

Keyboard shortcuts

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