Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository interface { CreateUser(User) (*User, *response.BaseResponse) Get(User) (*User, *response.BaseResponse) Update(User) (*User, *response.BaseResponse) ResetPassword(string) *response.BaseResponse }
type Service ¶
type Service interface { CreateUser(User) (*User, *response.BaseResponse) Get(User) (*User, *response.BaseResponse) Update(User) (*User, *response.BaseResponse) ResetPassword(string) *response.BaseResponse }
func NewUserService ¶
func NewUserService(repository Repository) Service
type User ¶
type User struct { Id primitive.ObjectID `json:"id" bson:"_id,omitempty"` FirstName string `json:"first_name" bson:"first_name"` LastName string `json:"last_name" bson:"last_name"` Email string `json:"email" bson:"email"` ProfilePicture string `json:"profile_picture" bson:"profile_picture"` Password string `json:"password" bson:"password"` Token string `json:"token" bson:"token"` RefreshToken string `json:"refresh_token" bson:"refresh_token"` }
func (*User) IsValidPassword ¶
func (user *User) IsValidPassword(password string) *response.BaseResponse
func (*User) ValidateUserCreation ¶
func (user *User) ValidateUserCreation() *response.BaseResponse
func (*User) ValidateUserLogin ¶
func (user *User) ValidateUserLogin() *response.BaseResponse
Click to show internal directories.
Click to hide internal directories.