Documentation
¶
Index ¶
Constants ¶
View Source
const ( UserTokenTable = "user_tokens" MethodVerified = "verified" MethodForgot = "forgot" )
View Source
const UserTable = "users"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ForgotPassForm ¶
type ForgotPassForm struct {
Email string `form:"email" validate:"required,max=100,email" json:"email"`
}
type ReSendVerificationForm ¶
type ReSendVerificationForm struct {
Email string `form:"email" validate:"required,max=100,email" json:"email"`
}
type ResetPassForm ¶
type ResetPassForm struct { Token string `form:"token" validate:"required,min=5,max=5" json:"-"` Email string `form:"email" validate:"required,max=100,email" json:"email"` Password string `form:"password" validate:"required,max=100" json:"-"` Confirm string `form:"confirm" validate:"required,max=100,eqfield=Password" json:"-"` }
type UpdatePasswordForm ¶
type User ¶
type User struct { ID uint `gorm:"column:id;primaryKey;autoIncrement" json:"id"` Name string `gorm:"column:name" json:"name"` Email string `gorm:"column:email" json:"email"` Password string `gorm:"column:password" json:"-"` Gender string `gorm:"column:gender" json:"gender"` Image string `gorm:"column:image" json:"image"` VerifiedAt time.Time `gorm:"column:verified_at;default:null" json:"-"` CreatedAt time.Time `gorm:"column:created_at" json:"-"` UpdatedAt time.Time `gorm:"column:updated_at" json:"-"` Token string `gorm:"-" json:"token,omitempty"` }
func SetUserData ¶
type UserLoginForm ¶
type UserRegisterForm ¶
type UserRegisterForm struct { Name string `form:"name" validate:"required,max=100" json:"name"` Email string `form:"email" validate:"required,max=100,email" json:"email"` Password string `form:"password" validate:"required,max=100" json:"-"` Confirm string `form:"confirm" validate:"required,max=100,eqfield=Password" json:"-"` Gender string `form:"gender" validate:"required,oneof=male female" json:"gender"` }
type UserToken ¶
type UserToken struct { ID uint `gorm:"column:id;primaryKey;autoIncrement" json:"id"` UserID uint `gorm:"column:user_id" json:"name"` Method string `gorm:"column:method" json:"method"` Token string `gorm:"column:token" json:"-"` Expired time.Time `gorm:"column:expired" json:"expired"` CreatedAt time.Time `gorm:"column:created_at" json:"-"` UpdatedAt time.Time `gorm:"column:updated_at" json:"-"` }
type UserUpdateProfileForm ¶
Click to show internal directories.
Click to hide internal directories.