Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateHandler ¶
func CreateHandler(w http.ResponseWriter, r *http.Request)
CreateHandler add new user to database.
Types ¶
type UserModel ¶
type UserModel struct { ID uint64 `gorm:"auto_increment;primary_key"` Username string `gorm:"column:username"` Email string `gorm:"column:email"` Bio string `gorm:"column:bio; size:1024"` Image *string `gorm:"column:image"` PasswordHash string `gorm:"column:password; not null"` }
UserModel this should only be used for database concerns.
func FindOneUser ¶
FindOneUser input the condition and It will return UserModel.
type UserRegistration ¶
type UserRegistration struct { ID uint64 `json:"-"` Username string `json:"username"` Email string `json:"email"` Bio string `json:"bio"` Image string `json:"image"` Password string `json:"password"` PasswordConfirmation string `json:"passwordConfirmation"` }
UserRegistration holds data for saving a new user within database.
Click to show internal directories.
Click to hide internal directories.