Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type UserBio ¶
type UserBio struct {
// contains filtered or unexported fields
}
UserBio : user's biography
type UserModel ¶
type UserModel struct { ID primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"` Email string `bson:"email" json:"email" binding:"required"` Bio UserBio `bson:"bio" json:"bio" binding:"omitempty"` Password string `bson:"password" json:"password" binding:"required"` Type string `bson:"type" json:"type" binding:"required"` Demo bool `bson:"demo" json:"demo" binding:"required"` Securities []primitive.ObjectID `bson:"securities,omitempty" json:"securities"` Trade []primitive.ObjectID `bson:"trade" json:"trade"` Stock []primitive.ObjectID `bson:"stock" json:"stock"` }
UserModel : user's model
func (*UserModel) CheckPassword ¶
CheckPassword : check if login password matches hashed password
func (*UserModel) HashPassword ¶
HashPassword : generate password hash
Click to show internal directories.
Click to hide internal directories.