Documentation ¶
Overview ¶
This file is in core bc GenUUID generates UUID that are needed for core models
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type User ¶
type User struct { ID string `bson:"_id"` Email string `bson:"email"` Password UserPassword `bson:"password"` CreatedAt int64 `bson:"created_at"` // unix timestamp }
User describes a user entity
type UserPassword ¶
UserPassword describes user's password data
func (*UserPassword) Init ¶
func (up *UserPassword) Init(password string) error
Init generates salt and hash with given password and fills corresponding fields.
func (*UserPassword) Validate ¶
func (up *UserPassword) Validate(password string) error
Validate checks if the given password is the one that is stored.
Click to show internal directories.
Click to hide internal directories.