models

package
v0.0.0-...-0090429 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateUser

func CreateUser(user User) error

CreateUser inserts a new user into the database

func RegisterUser

func RegisterUser(db *sql.DB, w http.ResponseWriter, r *http.Request)

func VerifyUser

func VerifyUser(email string) error

VerifyUser sets a user as verified

Types

type User

type User struct {
	UserID       string
	Email        string
	PasswordHash string
	OTP          string
	IsVerified   bool
	CreatedAt    time.Time
	UpdatedAt    time.Time
}

func GetUserByEmail

func GetUserByEmail(email string) (User, error)

GetUserByEmail retrieves a user by their email

Jump to

Keyboard shortcuts

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