Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type AuthIdentity ¶
type AuthInfo ¶
type AuthInfo struct {
PhoneVerificationCode string
PhoneVerificationCodeExpiry *time.Time
PhoneConfirmedAt *time.Time
UnconfirmedPhone string // only use when changing phone number
EmailConfirmedAt *time.Time
UnconfirmedEmail string // only use when changing email
SignInCount uint
SignLogs []SignLog
}
type AvatarImageStorage ¶
type Controller ¶
type Controller struct {
}
Controller User Controller
func (Controller) AddCredit ¶
func (Controller) AddCredit(w http.ResponseWriter, req *http.Request)
func (Controller) Orders ¶
func (Controller) Orders(w http.ResponseWriter, req *http.Request)
func (Controller) Profile ¶
func (Controller) Profile(w http.ResponseWriter, req *http.Request)
func (Controller) Update ¶
func (Controller) Update(w http.ResponseWriter, req *http.Request)
type User ¶
type User struct {
gorm.Model
Email string `form:"email"`
Password string
Name string `form:"name"`
Gender string
Role string
Birthday *time.Time
Balance float32
DefaultBillingAddress uint `form:"default-billing-address"`
DefaultShippingAddress uint `form:"default-shipping-address"`
Addresses []Address
Avatar AvatarImageStorage
// Confirm
ConfirmToken string
Confirmed bool
// Recover
RecoverToken string
RecoverTokenExpiry *time.Time
// Accepts
AcceptPrivate bool `form:"accept-private"`
AcceptLicense bool `form:"accept-license"`
AcceptNews bool `form:"accept-news"`
}
func (User) AvailableLocales ¶
func (User) DisplayName ¶
Click to show internal directories.
Click to hide internal directories.