storage

package
v0.0.0-...-479bf75 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 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 CreateUserParams

type CreateUserParams struct {
	Username     string
	PasswordHash string
	Email        string
	Profile      pqtype.NullRawMessage
}

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 Exercise

type Exercise struct {
	ID        int32
	WorkoutID sql.NullInt32
	Name      sql.NullString
}

type Image

type Image struct {
	ID     int32
	UserID sql.NullInt32
	Url    sql.NullString
}

type ListUsersRow

type ListUsersRow struct {
	ID       int32
	Username string
	Email    string
	Profile  pqtype.NullRawMessage
}

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

func (*Queries) DeleteUser

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

func (*Queries) GetUser

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

func (*Queries) ListUsers

func (q *Queries) ListUsers(ctx context.Context) ([]ListUsersRow, error)

func (*Queries) UpdateUser

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

func (*Queries) WithTx

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

type Set

type Set struct {
	ID          int32
	ExerciseID  sql.NullInt32
	Repetitions sql.NullInt32
	Weight      sql.NullFloat64
}

type UpdateUserParams

type UpdateUserParams struct {
	ID       int32
	Username string
	Email    string
	Profile  pqtype.NullRawMessage
}

type User

type User struct {
	ID           int32
	Username     string
	Email        string
	PasswordHash string
	Profile      pqtype.NullRawMessage
}

type Workout

type Workout struct {
	ID     int32
	UserID sql.NullInt32
	Date   sql.NullString
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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