models

package
v0.0.0-...-22dfa01 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *gorm.DB

Functions

func ConnectDataBase

func ConnectDataBase()

func LoginCheck

func LoginCheck(username string, password string) (string, error)

func VerifyPassword

func VerifyPassword(password, hashedPassword string) error

Types

type User

type User struct {
	gorm.Model
	Username string `gorm:"size:255;not null;unique" json:"username"`
	Password string `gorm:"size:255;not null;" json:"password"`
}

func GetUserByID

func GetUserByID(uid uint) (User, error)

func (*User) BeforeSave

func (u *User) BeforeSave() error

func (*User) PrepareGive

func (u *User) PrepareGive()

func (*User) SaveUser

func (u *User) SaveUser() (*User, error)

Jump to

Keyboard shortcuts

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