users

package
v0.0.0-...-c1885e1 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPasswordHash

func CheckPasswordHash(password, hash string) bool

func GetUserIdByUsername

func GetUserIdByUsername(username string) (int, error)

func HashPassword

func HashPassword(password string) (string, error)

Types

type User

type User struct {
	ID       string `json:"id"`
	Username string `json:"name"`
	Password string `json:"password"`
}

func (*User) Authenticate

func (user *User) Authenticate() bool

func (*User) Create

func (user *User) Create()

type WrongUsernameOrPasswordErr

type WrongUsernameOrPasswordErr struct{}

func (*WrongUsernameOrPasswordErr) Error

Jump to

Keyboard shortcuts

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