user

package
v0.0.0-...-aaffb5d Latest Latest
Warning

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

Go to latest
Published: May 20, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCredentials = errors.New("Invalid username or password")
View Source
var ErrMissingCredentials = errors.New("Missing username and/ or password")
View Source
var ErrUnexpected = errors.New("Internal server error")

Functions

func Create

func Create(username string, email string, password string, status bool) (err error)

func GetUserData

func GetUserData(userId int, includeInactive bool) (userData user_structs.UserData, err error)

func Login

func Login(username string, password string) (token string, err error)

func SetLastLogin

func SetLastLogin(userId int, lastLoginTime time.Time) (err error)

func UpdateSessionToken

func UpdateSessionToken(userId int) (token string, err error)

func ValidateSession

func ValidateSession(oldToken string, refresh bool) (newToken string, userId int, err error)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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