Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SignupRequest ¶
type SignupRequest struct { ID primitive.ObjectID `bson:"_id" json:"_id"` Username string `bson:"username" json:"username"` Email string `bson:"email" json:"email"` Password string `bson:"password" json:"password"` Role string `bson:"role" json:"role"` }
func (*SignupRequest) IsCorrectPassword ¶
func (s *SignupRequest) IsCorrectPassword(password string) bool
Compares hashedpassword from db to provided password
func (*SignupRequest) RequiredFields ¶
func (s *SignupRequest) RequiredFields() error
RequiredFields checks that the required field are not empty
func (*SignupRequest) Validate ¶
func (s *SignupRequest) Validate() error
Click to show internal directories.
Click to hide internal directories.