Documentation ¶
Index ¶
- func Hash(password string) ([]byte, error)
- func VerifyPassword(hashedPassword, password string) error
- type Post
- type User
- func (u *User) DeleteAUser(db *gorm.DB, uid int) (int64, error)
- func (u *User) FindAllUsers(db *gorm.DB) (*[]User, error)
- func (u *User) FindUserByID(db *gorm.DB, uid int) (*User, error)
- func (u *User) Prepare()
- func (u *User) SaveUser(db *gorm.DB) error
- func (u *User) UpdateAUser(db *gorm.DB, uid int) (*User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func VerifyPassword ¶
Types ¶
type Post ¶
type Post struct { PostID int `gorm:"primary_key;auto_increment"` PostName string `gorm:"size:40;not null;unique"` SubjectID int `gorm:"not null"` IsDeleted bool `gorm:"default:false" json:"_"` CreatedBy int `json:"_"` CreatedOn time.Time `gorm:"default:CURRENT_TIMESTAMP" json:"_"` UpdatedBy int `json:"_"` UpdatedOn time.Time `gorm:"default:CURRENT_TIMESTAMP" json:"_"` }
type User ¶
type User struct { UserId int `gorm:"primary_key;auto_increment"` UserName string `gorm:"size:40;not null;unique"` Email string `gorm:"size:50;not null;unique"` RoleId int `gorm:"not null"` Password string `gorm:"size:100;not null;" json:"_"` IsDeleted bool `gorm:"default:false" json:"_"` CreatedBy int `json:"_"` CreatedOn time.Time `gorm:"default:CURRENT_TIMESTAMP" json:"_"` UpdatedBy int `json:"_"` UpdatedOn time.Time `gorm:"default:CURRENT_TIMESTAMP" json:"_"` }
Click to show internal directories.
Click to hide internal directories.