Documentation ¶
Overview ¶
services/user_service.go
Index ¶
- type UserService
- func (service *UserService) CreateUser(ctx context.Context, user models.User) (*mongo.InsertOneResult, error)
- func (service *UserService) GetAllUsers(ctx context.Context, page, pageSize int) ([]models.User, error)
- func (service *UserService) GetUserByID(ctx context.Context, userId string) (*models.User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UserService ¶
type UserService struct {
UserRepo *repository.UserRepository
}
func NewUserService ¶
func NewUserService(userRepo *repository.UserRepository) *UserService
func (*UserService) CreateUser ¶
func (service *UserService) CreateUser(ctx context.Context, user models.User) (*mongo.InsertOneResult, error)
func (*UserService) GetAllUsers ¶
func (*UserService) GetUserByID ¶
Click to show internal directories.
Click to hide internal directories.