package
Version:
v1.0.5
Opens a new window with list of versions in this module.
Published: Nov 17, 2021
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type CustomUser struct {
Model
PID int64 `gorm:"primaryKey,autoIncrement" json:"p_id"`
Email string `json:"email"`
PwdHash string `json:"-"`
}
type Model struct {
ID uint `gorm:"primaryKey" json:"id"`
CreatedAt *time.Time `json:"created_at"`
UpdatedAt *time.Time `json:"updated_at"`
DeletedAt gorm.DeletedAt `gorm:"index" json:"deleted_at"`
}
gorm.Model base structure
type User struct {
Model
Username string `json:"username"`
Email string `json:"email"`
PasswordHash string `json:"-"`
}
type UserPointerFields struct {
Model
Username *string `json:"username"`
PasswordHash *string `json:"-"`
}
type UserWithInvalidIDField struct {
Username string `json:"username"`
PasswordHash string `json:"-"`
}
type UserWithInvalidPasswordHashField struct {
Model
Username string `json:"username"`
}
type UserWithInvalidUsernameField struct {
Model
PasswordHash string `json:"-"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.