services

package
v0.0.0-...-ad3f63c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 3, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

services/user_service.go

Index

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 (service *UserService) GetAllUsers(ctx context.Context, page, pageSize int) ([]models.User, error)

func (*UserService) GetUserByID

func (service *UserService) GetUserByID(ctx context.Context, userId string) (*models.User, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL