Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Database *gorm.DB
Functions ¶
func CloseConnection ¶
func CloseConnection()
func CreateConnection ¶
func CreateConnection()
func CreateTable ¶
func CreateTable()
func EncryptPassword ¶
Types ¶
type User ¶
type User struct { Id int64 Username string `gorm:"unique;not null"` Password string `gorm:"not null"` Email string `gorm:"unique;not null"` Role int Level int CreatedAt time.Time }
func GetUserByEmail ¶
func GetUserById ¶
func GetUserByUsername ¶
func (*User) EncryptPassword ¶
func (this *User) EncryptPassword()
Click to show internal directories.
Click to hide internal directories.