Help us shape the future of Go! Take the 2026 Go Developer Survey

internal

package
v0.0.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateBulkUserParams

type CreateBulkUserParams struct {
	Email       string          `json:"email"`
	Name        string          `json:"name"`
	Age         sql.NullInt32   `json:"age"`
	Password    string          `json:"password"`
	ApiKey      []byte          `json:"api_key"`
	IsActive    bool            `json:"is_active"`
	LoginCount  int64           `json:"login_count"`
	Rating      float64         `json:"rating"`
	Preferences json.RawMessage `json:"preferences"`
	CreatedAt   time.Time       `json:"created_at"`
	UpdatedAt   time.Time       `json:"updated_at"`
}

type CreateUserParams

type CreateUserParams struct {
	Email       string          `json:"email"`
	Name        string          `json:"name"`
	Age         sql.NullInt32   `json:"age"`
	Password    string          `json:"password"`
	ApiKey      []byte          `json:"api_key"`
	IsActive    bool            `json:"is_active"`
	LoginCount  int64           `json:"login_count"`
	Rating      float64         `json:"rating"`
	Preferences json.RawMessage `json:"preferences"`
	CreatedAt   time.Time       `json:"created_at"`
	UpdatedAt   time.Time       `json:"updated_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 ListActiveParams added in v0.0.4

type ListActiveParams struct {
	IsActive bool  `json:"is_active"`
	Offset   int32 `json:"offset"`
	Limit    int32 `json:"limit"`
}

type ListUserFilterByAgeNameParams

type ListUserFilterByAgeNameParams struct {
	MinAge sql.NullInt32 `json:"min_age"`
	MaxAge sql.NullInt32 `json:"max_age"`
	Name   string        `json:"name"`
	Offset int32         `json:"offset"`
	Limit  int32         `json:"limit"`
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) CreateBulkUser

func (q *Queries) CreateBulkUser(ctx context.Context, arg CreateBulkUserParams) (int32, error)

func (*Queries) CreateUser

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

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

func (*Queries) DB

func (q *Queries) DB() DBTX

DB returns the handle this Queries was constructed with.

func (*Queries) DeleteAllUser

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

func (*Queries) DeleteUser

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

func (*Queries) GetUserByEmail

func (q *Queries) GetUserByEmail(ctx context.Context, email string) (User, error)

Look up a user by email address

func (*Queries) GetUserByID

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

func (*Queries) ListActive

func (q *Queries) ListActive(ctx context.Context, arg ListActiveParams) ([]User, error)

func (*Queries) ListAllUser

func (q *Queries) ListAllUser(ctx context.Context) ([]User, error)

func (*Queries) ListUserFilterByAgeName

func (q *Queries) ListUserFilterByAgeName(ctx context.Context, arg ListUserFilterByAgeNameParams) ([]User, error)

func (*Queries) UpdateUser

func (q *Queries) UpdateUser(ctx context.Context, arg UpdateUserParams) (User, error)

func (*Queries) WithTx

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

type UpdateUserParams

type UpdateUserParams struct {
	Email       string                `json:"email"`
	Name        string                `json:"name"`
	Age         sql.NullInt32         `json:"age"`
	Password    sql.NullString        `json:"password"`
	IsActive    sql.NullBool          `json:"is_active"`
	LoginCount  sql.NullInt64         `json:"login_count"`
	Rating      sql.NullFloat64       `json:"rating"`
	Preferences pqtype.NullRawMessage `json:"preferences"`
	UpdatedAt   time.Time             `json:"updated_at"`
	ID          int32                 `json:"id"`
}

type User

type User struct {
	ID          int32           `json:"id"`
	Email       string          `json:"email"`
	Name        string          `json:"name"`
	Age         sql.NullInt32   `json:"age"`
	Password    string          `json:"password"`
	ApiKey      []byte          `json:"api_key"`
	IsActive    bool            `json:"is_active"`
	LoginCount  int64           `json:"login_count"`
	Rating      float64         `json:"rating"`
	Preferences json.RawMessage `json:"preferences"`
	CreatedAt   time.Time       `json:"created_at"`
	UpdatedAt   time.Time       `json:"updated_at"`
}

Jump to

Keyboard shortcuts

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