Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UserService ¶
type UserService interface { // GetAll retrieves all users GetAllUsers(ctx context.Context) ([]model.User, error) // GetUserByID retrieves a user by ID and verifies the password GetUserByID(ctx context.Context, id string) (*model.User, error) // CreateUser hashes the user's password and stores the user in the repository CreateUser(ctx context.Context, user *model.User) error // UpdateUser hashes the new password if it's provided, then updates the user UpdateUser(ctx context.Context, user *model.User) error // DeleteUser removes a user by ID DeleteUser(ctx context.Context, id string) error }
func NewUserService ¶
func NewUserService(repo repository.UserRepository) UserService
Click to show internal directories.
Click to hide internal directories.