Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type UserSchema ¶
type UserSchema struct { ID interface{} `bson:"_id,omitempty" json:"_id,omitempty"` Email string ` bson:"email" json:"email"` Password []byte `json:"password,omitempty" json:"password,omitempty"` }
UserSchema Document
func (UserSchema) CompareHashAndPassword ¶
func (schema UserSchema) CompareHashAndPassword(hashedPassword, password []byte) bool
CompareHashAndPassword compares a bcrypt hashed password with its possible plaintext equivalent. Returns true on success, or false on failure.
func (UserSchema) HashPassword ¶
func (schema UserSchema) HashPassword(password string) []byte
HashPassword hashes a passwrd from string and updates it
Click to show internal directories.
Click to hide internal directories.