Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PublicUser ¶
type User ¶
type User struct { ID uint64 `gorm:"primary_key;auto_increment" json:"id"` FirstName string `gorm:"size:100;not null;" json:"first_name"` LastName string `gorm:"size:100;not null;" json:"last_name"` Email string `gorm:"size:100;not null;unique" json:"email"` Password string `gorm:"size:100;not null;" json:"password"` CreatedAt time.Time `gorm:"default:CURRENT_TIMESTAMP" json:"created_at"` UpdatedAt time.Time `gorm:"default:CURRENT_TIMESTAMP" json:"updated_at"` DeletedAt *time.Time `json:"deleted_at,omitempty"` }
func (*User) PublicUser ¶
func (u *User) PublicUser() interface{}
So that we dont expose the user's email address and password to the world
Click to show internal directories.
Click to hide internal directories.