package
Version:
v0.0.0-...-11fc6bb
Opens a new window with list of versions in this module.
Published: Sep 8, 2019
License: GPL-3.0
Opens a new window with license information.
Imports: 10
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
DeleteUser deletes the user
type BaseModel struct {
Id uint64 `gorm:"primary_key;AUTO_INCREMENT;column:id" json:"-"`
CreatedAt time.Time `gorm:"column:createdAt" json:"-"`
UpdatedAt time.Time `gorm:"column:updatedAt" json:"-"`
DeletedAt *time.Time `gorm:"column:deletedAt" sql:"index" json:"-"`
}
type Token struct {
Token string `json:"token"`
}
Token represents a JSON web token.
type UserInfo struct {
Id uint64 `json:"id"`
Username string `json:"username"`
SayHello string `json:"sayHello"`
Password string `json:"password"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
}
type UserModel struct {
BaseModel
Username string `json:"username" gorm:"column:username;not null" binding:"required" validate:"min=1,max=32"`
Password string `json:"password" gorm:"column:password;not null" binding:"required" validate:"min=5,max=128"`
}
Compare with the plain text password
Create a new user account
Encrypt the user password
Update an user account info
Source Files
¶
Click to show internal directories.
Click to hide internal directories.