Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type User ¶
type User struct { ID string `json:"id,omitempty" bson:"_id,omitempty"` Email string `json:"email" binding:"required" validate:"required" bson:"email"` UserName string `json:"userName" binding:"required" validate:"required" bson:"user_name"` CountryId string `json:"countryId" binding:"required" validate:"required" bson:"country_id"` Password string `json:"password" binding:"required" validate:"required" bson:"password"` CreatedAt time.Time `json:"createdAt" bson:"created_at,omitempty"` UpdatedAt time.Time `json:"updatedAt" bson:"updated_at,omitempty"` DeletedAt time.Time `json:"deletedAt" bson:"deleted_at,omitempty"` }
func (*User) HashPassword ¶
func (*User) PasswordMatch ¶
type UserRepository ¶
type UserRepository interface { InsertUser(ctx context.Context, user User) (err error) FindUserById(ctx context.Context, id string) (user *User, err error) FindUserByEmail(ctx context.Context, email string) (user *User, err error) UpdateUser(ctx context.Context, user User) (err error) DeleteUser(ctx context.Context, id string) (err error) }
Click to show internal directories.
Click to hide internal directories.