Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConnectToDB ¶
func GeneratePassword ¶
func GetPostsByUserID ¶
Types ¶
type User ¶
type User struct { ID int `gorm:"primary_key"` Username string `gorm:"type:varchar(64)"` Email string `gorm:"type:varchar(120)"` PasswordHash string `gorm:"type:varchar(128)"` Posts []Post Followers []*User `gorm:"many2many:follower;association_jointable_foreignkey:follower_id"` }
func GetUserByUsername ¶
func (*User) SetPassword ¶
Click to show internal directories.
Click to hide internal directories.