Documentation ¶
Index ¶
- type User
- func (u *User) CheckPassword(hashedPassword string, password string) error
- func (u *User) Create(db *gorm.DB) (*User, error)
- func (u *User) Delete(db *gorm.DB, id uint64) error
- func (u *User) FindAll(db *gorm.DB) (*[]User, error)
- func (u *User) FindByEmail(db *gorm.DB, email string) (*User, error)
- func (u *User) FindById(db *gorm.DB, id uint64) (*User, error)
- func (u *User) GetJwtToken() (string, error)
- func (u *User) Update(db *gorm.DB, id uint64) (*User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type User ¶
type User struct { ID uint64 `json:"id" gorm:"primaryKey;autoIncrement"` UserName string `json:"username" gorm:"type:varchar(255);not null"` Email string `json:"email" gorm:"type:varchar(255);unique; not null"` Password string `json:"password" gorm:"type:varchar(60); not null"` CreatedAt *string `json:"created_at,omitempty" gorm:"type:varchar(10)"` }
func (*User) CheckPassword ¶
func (*User) GetJwtToken ¶
Click to show internal directories.
Click to hide internal directories.