db

package
v0.0.0-...-28a10b4 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrPasswordIncorrect = errors.New("password is incorrect")
View Source
var ErrPasswordMissing = errors.New("password is missing")

Functions

func GetCurrentTime

func GetCurrentTime(ctx context.Context, db pgxutil.DB) (time.Time, error)

GetCurrentTime returns the current time from the database.

func SetUserPassword

func SetUserPassword(ctx context.Context, db pgxutil.DB, userID uuid.UUID, password string) error

SetUserPassword sets the password for a user.

func ValidateUserPassword

func ValidateUserPassword(ctx context.Context, db pgxutil.DB, userID uuid.UUID, password string) error

Types

type User

type User struct {
	ID       uuid.UUID
	Username string
}

func GetUserByUsername

func GetUserByUsername(ctx context.Context, db pgxutil.DB, username string) (*User, error)

Jump to

Keyboard shortcuts

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